Integrals of a smooth function

Does there exist a smooth ($\mathcal C^\infty$) function $f \colon \mathbb R \to \mathbb R$ such that

$$\int_{-\infty}^\infty t^n f(t) \,\mathrm{d}t = \begin{cases} 1 & n = 0 \\ 0 & n \ge 1\end{cases}?$$

It certainly looks like an application of the Fourier transform and the following formula: if $$\hat f (\xi) = \int_{\mathbb R} f(x) \exp(-2\pi i x \xi) \,\mathrm{d}x,$$ then the Fourier transform of $x^n f(x)$ equals $$\frac{i^n}{2^n \pi^n} \frac{\mathrm{d}^n \hat f(\xi)}{\mathrm{d} \xi^n}.$$

How to proceed?

• this seems related to en.wikipedia.org/wiki/Moment_problem – Renart Nov 12 '16 at 10:57
• I suggest you read my comments at math.stackexchange.com/questions/886787/… – andre Nov 16 '16 at 18:54
• Looks like it should be possible to explicitly construct such a function with the help of the function $\phi(t) = e^{-t^{1/4}}sin(t^{1/4})$ whose moments vanish all together for the interval $[0,\infty)$. – andre Nov 16 '16 at 19:00

Yes, a function like that exists. You can also take it to be in the Schwartz space $\mathcal{S}$, using the Fourier transform.
Consider a smooth cutoff $g$, which is supported in $[-1,1]$, with $g(0)=1$ and $g^{(n)}(0)=0$ for all $n\geq 1$. Then $g$ belongs to $\mathcal{S}$, therefore there exists $f\in\mathcal{S}$ such that $\hat{f}=g$. Then, $$\int_{\mathbb R}f(t)\,dt=\int_{\mathbb R}f(t)e^{-2\pi it\cdot 0}\,dt=\hat{f}(0)=g(0)=1,$$ and also, for $n\geq 1$, $$\int_{\mathbb R}t^nf(t)\,dt=\int_{\mathbb R}t^nf(t)e^{-2\pi i\cdot 0}\,dt=\widehat{(t^nf(t))}(0)=\frac{i^n}{2^n\pi^n}(\hat{f})^{(n)}(0)=\frac{i^n}{2^n\pi^n}g^{(n)}(0)=0.$$