Hi, apologies if these questions are trivial and/or stupid.
Throughout, let $f$ be a Lebesgue measurable function.
QUESTION 1 (surely must be known?) If $$ \int_0^\infty t^r |f(t)| dt < \infty, \qquad \forall \\, r>0, $$ $$ \int_0^\infty t^n f(t) dt = 0, \qquad \forall \\, n=0,1,2,\ldots, $$ when must $f \equiv 0$ almost everywhere?
See below for more discussion: in view of Examples 1, 2 below, maybe decay rates on $\int_R^\infty |f(t)| dt$, or similar, as $R \to \infty$, are the natural thing to consider? In which case, can we get precise necessary and sufficient conditions?
QUESTION 2 (probably much harder; maybe unknown?) If instead we have only $\int_0^R |f(t)| dt < \infty$ for each $R>0$, and $$ \lim_{R \to \infty} \int_0^R t^n f(t) dt = 0, \qquad n=0,1,2,\ldots $$ when must $f \equiv 0$ almost everywhere? (I have very little idea about this).
I think these questions are clearly very natural, interesting, and important, but Googling etc. didn't work well (I tried "vanishing moments" and other phrases, but there's just too much stuff out there). Standard known examples/methods follow.
Example 1: if $f$ is compactly supported on $[a,b]$, say, then $f \equiv 0$ a.e. because polynomials are dense in $C[a,b]$.
Example 2: by taking imaginary parts of $\int_0^\infty t^{4n+3} \exp(-(1+i)t) dt \in \mathbb{R}$, we get $$ \int_0^\infty t^{4n+3} e^{-t} \sin t \\, dt = 0, $$ and so by substituting $t = x^{1/4}$, $$ \int_0^\infty x^n \exp(-x^{1/4}) \sin(x^{1/4}) dx = 0, \qquad n=0,1,2,\ldots $$
Alternative method for Example 1: consider the Laplace transform $F(z) = \int_0^\infty e^{-zt} f(t) dt$. In Example 1, $F$ is an entire function such that $F^{(n)}(0) = 0$ for all $n$, so $F \equiv 0$ and thus $f \equiv 0$ a.e. as required.
So, any condition on $f$ forcing $F$ to be analytic on some disc with centre $0$ is enough; but can we do better?
In Example 2, $f \in L^1(0,\infty)$ and so $F$ is bounded and analytic on $\{ \mathrm{Re}(z) > 0 \}$, and continuous on the boundary, with $\lim_{z \to 0} F^{(n)}(z) = 0$ for all $n$. But this is still not enough to force $F \equiv 0$.