# Apply Stone- Weierstrass Theorem [duplicate]

Suppose $f: [0,1]\to \mathbb R$ is continuous and $$\int_{0}^{1} f(x)e^{nx} \mathsf dx=0$$ for every $n$. Prove that $f(x)=0$ for all $x \in[0,1]$.

Since $f$ is continuous on $[0,1]$, by Stone-Weierstrass theorem, we can say that there exists a sequence of polynomials $P_n$ that converges uniformly to $f$ on $[0,1]$. What the next step?

## marked as duplicate by Winther, user940, Community♦Jul 9 '15 at 20:51

$$I_n = \int_{0}^{1}f(x)e^{nx}\,dx = \int_{1}^{e}f(\log x) x^{n-1}\,dx = 0\tag{1}$$ but since $L^2(1,e)$ has an orthogonal base given by polynomials (the properly shifted Legendre polynomials) the previous line implies $$\int_{1}^{e} f(\log x)^2\,dx = 0 \tag{2}$$ through Parseval's identity, from which $f\equiv 0$.