Metric completion of polynomial function space Take the vector space of all polynomial functions from $\Bbb R$ to $\Bbb R$ with an inner product
$$\langle f,g \rangle = \int_{-\infty}^{\infty} f(x)g(x)\sigma(x)dx$$
where $\sigma$ is a positive, smooth function such that for all natural numbers $n$
$$\lim_{|x| \to \infty} \sigma(x)x^n=0.$$
(For example, $\sigma (x)$ could be $e^{-x^2}$.)
Producing a metric from this inner product in the usual way turns the space of polynomial functions into a metric space. I think I can show that this metric space is not complete. For instance, I believe the exponential function is a limit that does not exist in the space. What I am not certain of is how to go about finding the completion of this space.
So my question is: what is the completion of this space?
I have a feeling that it is something like the space of all functions which are square-integrable, do not go to infinity faster than $\sigma$ goes to zero, and are equal to their Taylor series on all of $\Bbb R$... but I don't know how to show that.
Thanks!
 A: In the case of $e^{-x^{2}}$, you have an answer, but a general answer is non-trivial. In the case of $\sigma(x)=e^{-x^{2}}$, Hermite polynomials give you the answer:
$$
              H_n(x) = (-1)^{n}C_ne^{x^{2}}\frac{d^{n}}{dx^{n}}e^{-x^{2}}
$$
You have
$$
    \int_{-\infty}^{\infty}H_{n}(x)H_{m}(x)e^{-x^{2}}dx =0,\;\;\; n \ne m.
$$
By choosing positive constants $C_n$ appropriately, $\{ H_n \}_{n=0}^{\infty}$ becomes an orthonormal set with respect to the weighted inner product. For any $f \in L^{2}(\mathbb{R})$, it is known that $\{ h_n=e^{-x^{2}/2}H_{n}\}$ is an orthonormal basis of $L^{2}(\mathbb{R})$. Therefore, if $f \in L^{2}(\mathbb{R})$, then
$$
          \int_{-\infty}^{\infty}|f-\sum_{n=0}^{N}(f,h_n)h_n|^{2}dx
     =\int_{-\infty}^{\infty}|fe^{x^{2}/2}-\sum_{n}^{N}(f,h_n)H_n|^{2}e^{-x^{2}}dx\rightarrow 0
$$
as $N\rightarrow \infty$. So the completion of the space with weight $\sigma(x)=e^{-x^{2}}$ is $e^{x^{2}/2}L^{2}(\mathbb{R})$, which is as nice as you can reasonably expect. The completion $X$ of your space is isometrically isomorphic to $L^{2}$ under the map $U : L^{2}(\mathbb{R})\rightarrow X$ defined by $Uf=e^{x^{2}/2}f$. Proving the completeness of the Hermite functions $\{ h_n \}$ is not a simple matter, and, for an arbitrary weight $\sigma$, I don't think things turn out so nice. I wish I had a reference for you, but I don't. You might try searching "orthogonal polynomials" for references.
