$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.
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.