$\int_0^1 f(x)e^{nx} \, dx=0$ for all $n \in \Bbb N\cup{\{0\}}$ implies $f(x) = 0$ $f$ is a continuous real valued function $f: [0,1] \to\mathbb R$ and
$\int_0^1 f(x)e^{nx} \, dx=0$ $\forall n \in N\cup{\{0\}} \implies f(x) = 0$ on the interval $[0,1]$
I am trying to prove this result. I have tried using Stone-Weirestrass with both polynomials and exponential functions; however, I cannot seem to prove it this way. Can someone offer a hint or suggestion.
 A: Hint:

*

*The function $x\mapsto e^x$ separates points of $[0,1]$. Hence, the collection of polynomials $\mathcal{P}$ on $e^x$ (including constants) form a dense set in $C([0,1])$ under the uniform norm.


*The conditions of the problem show that $\int^1_0 fp=0$ for any $p\in\mathcal{P}$. For any $g\in C([0,1])$ choose a sequence of polynomials $p_n\in\mathcal{P}$ that coverage to $g$ uniformly. Then
$$\Big|\int^1_0fg\Big|=\Big|\int^1_0fp_n-fg\Big|\leq\int^1_0|f||g-p_n|dx\leq \|f\|_u\|g-p_n\|_u\xrightarrow{n\rightarrow\infty}0$$
Which means that $\int^1_0fg=0$ for all $g\in C([0,1])$.


*Apply (2) to $g=f$ to conclude that $\int^1_0f^2=0$.


*Conclude that $f^2=0$. Suppose $f^2(x_0)>0 $ for some $x)\in[0,1]$. By continuity chose a small subinterval $V$ containing $x_0$ where $f^2>0$. Then $0<\int_Vf^2\leq \int^1_0 f^2=0$ contradiction!
See if you can fill in all the details.
A: We can do this with just the Weierstrass theorem and a change of variables. In the given integrals, let $x=\ln y.$ Then we see
$$\int_1^e f(\ln y)y^{n-1}\,dy = 0,\,n=0,1,\dots.$$
It follows that $\int_1^e f(\ln y)p(y)\,dy = 0$ for every polynomial $p.$ By Weierstrass, there is a sequnce $p_n$ of polynomials that converge to $f(\ln y)$ uniformly on $[1,e].$ In the usual way we then obtain
$$\int_1^e (f(\ln y))^2\,dy=0.$$
This implies $f(\ln y)\equiv 0.$ Hence $f\equiv 0.$
