This is an exercise from Werner's Funktionalanalysis. I have to show that the linear span of the functions $f_n(x)=x^ne^{-x^2/2}, n\geq0$ is dense in $L^2(\mathbb{R})$. The book gives the hint to first show that the Fourier transform of $\overline{f(x)}e^{-x^2/2}$ vanishes if $\langle f,f_n\rangle=0$ for all $n$.
Now I don't see how this knowledge about the Fourier transform would help with the original statement. The $f_n$ obviously don't contain some orthogonal set, so even if I could conclude that $f=0$ from this I couldn't use some maximal orthogonal system argument for Hilbert spaces.
Also, I am unable to actually show the hint because for $f \in L^2(\mathbb{R})$ the formula for the Fourier transform does not hold and most of the nice properties of the Fourier transform I know are only valid for Schwartzfunctions.
So any kind of hint as to how this fits together would be helpful.