Show that Polynomials Are Complete on the Real Line Consider the Hilbert Space of weighted-square-integrable functions f(x):
$$
\begin{equation}
\int_{-\infty}^{\infty}\frac{f(x)^2}{e^{x}+e^{-x}}dx<\infty.
\end{equation}
$$
Note this integral is taken over the real line in both directions, and the weighting is roughly exponential.  Hilbert Polynomials are complete using a different weighting, while Laguerre polynomials use a similar exponential weighting, but only on the positive real line.
What is a simple proof or reference that polynomials are complete in this space?  
 A: Disclaimer: The following proof is not completely elementary and uses methods from complex analysis as well as the Fourier transform, but at least it does the job:
Assume that the polynomials are not dense in your $L^{2}$-space.
This implies the existence of $f\neq0$ in your $L^{2}$space for
which
$$
\int_{\mathbb{R}}\frac{f\left(x\right)\cdot x^{n}}{e^{x}+e^{-x}}\, dx=0\qquad\forall n\in\mathbb{N}_{0}.
$$
Now consider the function
$$
\Gamma:\left\{ s\in\mathbb{C}\mid-\frac{1}{2}<\text{Re}\left(s\right)<\frac{1}{2}\right\} \to\mathbb{C},s\mapsto\int_{\mathbb{R}}e^{sx}\cdot\frac{f\left(x\right)}{e^{x}+e^{-x}}\, dx.
$$
Note that $\Gamma$ is well-defined because of
\begin{eqnarray*}
\int_{\mathbb{R}}\left|e^{sx}\cdot\frac{f\left(x\right)}{e^{x}+e^{-x}}\right|\, dx & \leq & \sqrt{\int_{\mathbb{R}}\frac{\left|f\left(x\right)\right|^{2}}{e^{x}+e^{-x}}\, dx}\cdot\sqrt{\int_{\mathbb{R}}\frac{\left|e^{sx}\right|^{2}}{e^{x}+e^{-x}}\, dx}\\
 & = & \sqrt{\int_{\mathbb{R}}\frac{\left|f\left(x\right)\right|^{2}}{e^{x}+e^{-x}}\, dx}\cdot\sqrt{\int_{\mathbb{R}}\frac{e^{2\text{Re}\left(sx\right)}}{e^{x}+e^{-x}}\, dx}\\
 & \leq & \sqrt{\int_{\mathbb{R}}\frac{\left|f\left(x\right)\right|^{2}}{e^{x}+e^{-x}}\, dx}\cdot\sqrt{\int_{\mathbb{R}}e^{\left(2\left|\text{Re}\left(s\right)\right|-1\right)\left|x\right|}\, dx}<\infty.
\end{eqnarray*}
Also observe that we can bound the integrand on each strip $\left\{ s\in\mathbb{C}\mid-c<{\rm Re}\left(s\right)<c\right\} $,
with $c\in\left(0,\frac{1}{2}\right)$, by $\frac{e^{2c\left|x\right|}\cdot\left|f\left(x\right)\right|}{e^{x}+e^{-x}}$
independently(!) of $s$ in that strip, so that standard arguments
yield continuity of $\Gamma$.
Now, let $\gamma:\left[a,b\right]\to U$ be a closed (piecewise) $C^{1}$-curve
in $U:=\left\{ s\in\mathbb{C}\mid-\frac{1}{2}<{\rm Re}\left(s\right)<\frac{1}{2}\right\} $.
Then
\begin{eqnarray*}
\int_{\gamma}\Gamma\left(z\right)\, dz & = & \int_{a}^{b}\Gamma\left(\gamma\left(t\right)\right)\cdot\gamma'\left(t\right)\, dt\\
 & = & \int_{a}^{b}\int_{\mathbb{R}}e^{\gamma\left(t\right)\cdot x}\cdot\frac{f\left(x\right)}{e^{x}+e^{-x}}\cdot\gamma'\left(t\right)\, dx\, dt\\
 & \overset{\left(\ast\right)}{=} & \int_{\mathbb{R}}\int_{a}^{b}e^{\gamma\left(t\right)\cdot x}\cdot\gamma'\left(t\right)\, dt\cdot\frac{f\left(x\right)}{e^{x}+e^{-x}}\, dx\\
 & = & \int_{\mathbb{R}}\int_{\gamma}e^{xz}\, dz\cdot\frac{f\left(x\right)}{e^{x}+e^{-x}}\, dx\\
 & = & 0.
\end{eqnarray*}
In the last step, we used that $z\mapsto e^{xz}$ is an entire function
so that $\int_{\gamma}e^{xz}\, dz$ vanishes by Cauchy's integral
theorem. The application of Fubini's theorem in $\left(\ast\right)$
is justified because of
\begin{eqnarray*}
\int_{\mathbb{R}}\int_{a}^{b}\left|e^{\gamma\left(t\right)\cdot x}\cdot\gamma'\left(t\right)\cdot\frac{f\left(x\right)}{e^{x}+e^{-x}}\right|\, dt\, dx & = & \int_{a}^{b}\int_{\mathbb{R}}\left|e^{\gamma\left(t\right)\cdot x}\cdot\gamma'\left(t\right)\cdot\frac{f\left(x\right)}{e^{x}+e^{-x}}\right|\, dx\, dt\\
 & \leq & \left\Vert \gamma'\right\Vert _{\sup}\cdot\left(b-a\right)\cdot\int_{\mathbb{R}}\frac{e^{2c\left|x\right|}\left|f\left(x\right)\right|}{e^{x}+e^{-x}}\, dx,
\end{eqnarray*}
where $c>0$ is chosen with $\left|{\rm Re}\left(\gamma\left(t\right)\right)\right|\leq c<\frac{1}{2}$
for all $t\in\left[a,b\right]$ (such a $c$ exists, because $\gamma\left(\left[a,b\right]\right)\subset U$
is compact). Note that Tonelli's theorem is always applicable for
non-negative (measurable) functions.
By Morera's theorem, we conclude that $\Gamma$ is holomorphic on
$U$. But for $\left|s\right|<\frac{1}{4}$, we have
$$
\sum_{n=0}^{\infty}\frac{\left|\left(sx\right)\right|^{n}}{n!}=e^{\left|sx\right|}\leq e^{\frac{1}{4}\left|x\right|}
$$
with $\int_{\mathbb{R}}\frac{e^{\frac{1}{4}\left|x\right|}\left|f\left(x\right)\right|}{e^{x}+e^{-x}}\, dx<\infty$
(as above), so that dominated convergence yields
\begin{eqnarray*}
\Gamma\left(s\right) & = & \int_{\mathbb{R}}e^{sx}\cdot\frac{f\left(x\right)}{e^{x}+e^{-x}}\, dx\\
 & = & \int_{\mathbb{R}}\lim_{n\to\infty}\sum_{\ell=0}^{n}\frac{\left(sx\right)^{n}}{n!}\cdot\frac{f\left(x\right)}{e^{x}+e^{-x}}\, dx\\
 & = & \lim_{\ell\to\infty}\int_{\mathbb{R}}\left[\sum_{\ell=0}^{n}\frac{\left(sx\right)^{n}}{n!}\right]\cdot\frac{f\left(x\right)}{e^{x}+e^{-x}}\, dx=0.
\end{eqnarray*}
By the identity theorem for holomorphic functions, we conclude $\Gamma\equiv0$
and hence
$$
0=\Gamma\left(i\xi\right)=\int_{\mathbb{R}}e^{i\xi x}\cdot\frac{f\left(x\right)}{e^{x}+e^{-x}}\, dx,
$$
so that the Fourier transform of the $L^{1}$-function(!) $x\mapsto\frac{f\left(x\right)}{e^{x}+e^{-x}}$
vanishes, which implies $\frac{f\left(x\right)}{e^{x}+e^{-x}}\equiv0$ (a.e.)
and hence $f\equiv0$ (a.e.), a contradiction.
