The Problem: Prove or disprove: if $\int_0^1f(t)t^{2n+1}dt=0$ for each integer $n\geq 0$, then $f=0$ on $[0 ,1]$. $f: \mathbb{R}\to\mathbb{R}$ is continuous.
And, a follow-up: What if "$n\geq0$" is replaced by "$n\geq1$"?
My conjecture is that $f=0$ on $[0, 1]$ in both cases.
My Attempt: Let $I_1$ be the union of all the intervals in $[0, 1]$ such that $f(x)>0$, and let $I_2$ be the union of all the intervals in $[0, 1]$ such that $f(x)<0$. Then we must have $$\int_{I_1}f(t)t^{2n+1}dt=-\int_{I_2}f(t)t^{2n+1}dt\quad(*)$$ for all $n\geq0$. (or $\geq1$)
As $n\to\infty$, the integrals on both sides of the equation $(*)$ will get smaller. Since $f(x)$ does not change and $t^{2n+1}$ changes unevenly, my intuition tells me that $(*)$ will fail to hold when $n$ becomes large enough; but I am unable to show that.
Any hint would be greatly appreciated.
Your conjecture is correct. Let us consider $g(t)=f(\sqrt{t})$, which is continuous over $[0,1]$.
In the first case, for any $n\in\mathbb{N}$ we have $$ \int_{0}^{1} g(t) t^n \,dt \stackrel{t\mapsto x^2}{=} 2\int_{0}^{1}f(x) x^{2n+1}\,dx = 0 \tag{1}$$ so $g$ is orthogonal to every polynomial. By the density of polynomials among the $C^0([0,1])$ functions we have that $g$ is orthogonal to itself, hence $g\equiv 0$ and $f\equiv 0$ as well.
In the second case (i.e. when $(1)$ holds only for $n\geq 1$) we have that $g(t)$ is orthogonal to every polynomial of the form $t\cdot p(t)$. By the Weierstrass approximation theorem we have that $g(t)$ is orthogonal to every function of the form $$ l_m(t)=\left\{\begin{array}{rcl} mt &\text{if}& 0\leq t \leq \frac{1}{m}\\ 1 &\text{if}& \frac{1}{m}\leq t\leq 1\end{array}\right.\quad\text{for some }m\in\mathbb{N}^+$$ since $l_m(t)/t$ is continuous over $[0,1]$. By the dominated/monotone convergence theorem $$ \int_{0}^{1} g(t)\,dt = \lim_{m\to +\infty} \int_{0}^{1} g(t) l_m(t)\,dt = 0 $$ so $g$ is orthogonal to the constant $1$ and we fall back into the previous case.
As pointed out in the comments, the entire exercise is a simple corollary of the Müntz–Szász theorem, since $$ \sum_{n\geq 0}\frac{1}{2n+1}\quad\text{and}\quad \sum_{n\geq 1}\frac{1}{2n+1} $$ are both divergent.