Let $f(x)$ be a real-valued function on $\mathbb{R}$ such that $x^nf(x), n=0,1,2,\ldots$ are Lebesgue integrable.
Suppose $\int_{-\infty}^\infty x^n f(x) dx=0$ for all $n=0,1,2,\ldots. $
Does it follow that $f(x)=0$ almost everywhere?
Let $f(x)$ be a real-valued function on $\mathbb{R}$ such that $x^nf(x), n=0,1,2,\ldots$ are Lebesgue integrable.
Suppose $\int_{-\infty}^\infty x^n f(x) dx=0$ for all $n=0,1,2,\ldots. $
Does it follow that $f(x)=0$ almost everywhere?
No. This can be seen via Fourier transform.
Let $f$ be such that for the Fourier transform $\hat f$ it holds that for all $n$ \begin{equation*} \hat f^{(n)}(0) = 0. \end{equation*} Note that this does not imply that $f$ itself is zero since there are infinitely flat functions. By using the rules for Fourier transforms and derivatives you see that $\int x^n f(x) dx = 0$ for all $n$.
One application of such functions with infinitely many vanishing moment is the construction of infinitely regualel orthonomal wavelet bases (see, e.g., the Meyer wavelet).