Density of polynomials in exponentially-weighted $L^p$ spaces. Let $p\in [1,\infty)$ and consider the space Lebesgue space of real-valued functions $L^p(\mathbb{R}^d, e^{-\|x\|}\mathrm dx)$, where $\mathrm dx$ denotes the Lebesgue measure. I call a function $q:\mathbb R^d\to\mathbb R$ a polynomial if it is smooth with $n^{\mathrm{th}}$ derivative identically zero for some $n$.
Is it true that polynomial functions are dense in the above $L^p$ space? Even partial answers would be appreciated! Say by replacing the weighting with $e^{-\|x\|^{1+\varepsilon}}$.

An unsuccessful idea of mine was first to observe that continuous functions of compact support, $C_c$, are dense and that by SWT, we may approximate such functions uniformly on compact sets by polynomials. But I couldn't quite make that work as there is a battle between how well one can approximate continuous functions on compact sets by polynomials and the growth of said polynomials outside these compact sets.
 A: Edit: I misread the question. What's below is a proof that the polynomials are not dense in $L^p(e^{||x||}dt)$. Then at the bottom is a proof that the polynomials are dense in $L^p(e^{-||x||}dx)$ for $\le p<\infty$.
The polynomials are not dense in $L^p(e^{||x||}dx)$. Proof for $d=1$ that you can easily rewrite for $d\ge1$:
Say $\phi\in C^\infty_c(\mathbb R)$ is supported in $[1,2]$. There exists a Schwarz function $g$ with $\phi=\hat g$. Since every derivative of $\phi$ vanishes at the origin it follows that $$\int t^k g(t)\,dt=0,\quad k=0,1,\dots$$
Let $f(t) = e^{-|t|}g(t)$. Then $f\in L^q(e^{|t|}dt)$ for every $q\in[1,\infty]$ and $$\int p(t)f(t)e^{|t|}\,dt=0$$for every polynomial $p$; hence  the polynomials are not dense in $L^p(e^{|t|}dt)$.
Now for the actual question: Of course the polynomials are not dense in any interesting $L^\infty(\mu)$, since a uniform limit of polynomials is continuous.
Suppose $1\le p<\infty$. The polynomials are dense in $L^p(e^{-||x||}dx)$. Again we give the proof for $d=1$. Say $1/p+1/q=1$.
Note that unless otherwise specified the notation $L^p$ refers to the measure $e^{-|t|}dt$.
By Hahn-Banach it's enough to prove this:


If $f\in L^q$ and $\int t^kf(t)e^{-|t|}dt=0$ for $k=0,1,\dots$ then $f=0$.


So assume that $f\in L^q$ and $\int t^kf(t)e^{-|t|}dt=0$ for $k=0,1,\dots$ .
Recall or prove this:


If $\delta>0$ and $\int e^{\delta|t|}|F(t)|\,dt<\infty$ then the Fourier transform $\hat F$ extends to a holomorphic function in the strip $x+iy$, $|y|<\delta$.


Suppose that $0<\delta<1/p$ (recall that $p<\infty$ so $1/p>0$).
Then the function $e^{\delta|t|}\in L^p$, so $e^{\delta |t|}f(t)\in L^1$:
$$\int e^{\delta|t|}|f(t)|e^{-|t|}\,dt<\infty.$$
Let $F(t)=f(t)e^{-|t|}$. Then $\hat F$ is holomorphic in a horizontal strip, and the hypothesis $\int t^kf(t)e^{-|t|}dt=0$ shows that every derivative of $\hat F$ vanishes at the origin. Hence $\hat F=0$, so $F=0$, so $f=0$.
