Let $f: [0, 1] \to \mathbb R$ be continuous. Suppose $\int_0^1 f(x)e^{-nx} dx = 0$ for all $n \in \mathbb N$. Prove $f$ is identically $0$.
my attempt \begin{equation} \int_0^1 f(x)e^{-nx} dx = \int^1_{e^{-1}} f(-\log t)t^{n-1} dt. \end{equation}
Since this integral is $0$ for any $n \in \mathbb N$, we have $\int^1_{e^{-1}} f(-\log t)p(t) dt = 0$ for any polynomial $p(x)$.
$g(t) = f(-\log t)$, being the composition of two functions that are continuous on their entire domains, is continuous.
Thus, by Weierstrass theorem, there exists a sequence of polynomial $(p_n(x))_{n=1}^\infty$ converging uniformly to $g(t)$. Hence for any $\epsilon > 0$, there exists $N \in \mathbb N$ such that for all $n \geq N$, $\|p_n(x) - g(x)\|_\infty < \epsilon$.
\begin{equation} \int_{e^{-1}}^1 g(t)^2 dt \leq \int_{e^{-1}}^1 g(t)|p_n(t) - g(t)| dt + \int_{e^{-1}}^1 g(t)|p_n(t)| dt < \epsilon \int_{e^{-1}}^1 g(t) dt \end{equation}
Evidently, since the last integral is a constant, the integral on the l.h.s. is $0$. Then by continuity of $g(t)^2$ (which trivially follows from that of $g(t)$), we have $g(t)^2$ and hence also $g(t)$ is $0$ on $[e^{-1}, 1]$. Hence $f(x)$ is identically $0$ on $[0, 1]$.
question
I wonder if the above proof is correct. I feel I might have missed some boundary conditions.
second question
I wonder, for this type of questions, is it the only standard approach to transform the integrand into some function times $t^n$ and then use Weierstrass? Thanks a lot.
I think it is not entirely correct. It is better if you have this instead: $$\int_{\text{e}^{-1}}^1\,\big(g(t)\big)^2\,\text{d}t=\int_{\text{e}^{-1}}^1\,g(t)\,\big(g(t)-p_n(t)\big)\,\text{d}t +\int_{\text{e}^{-1}}^1\,g(t)\,p_n(t)\,\text{d}t=\int_{\text{e}^{-1}}^1\,g(t)\,\big(g(t)-p_n(t)\big)\,\text{d}t\,.$$ (There is no reason why $\int_{\text{e}^{-1}}^1\,g(t)\,\left|p_n(t)\right|\,\text{d}t=0$ should hold. This function $\left|p_n\right|$ is not a polynomial.) This gives $$\int_{\text{e}^{-1}}^1\,\big(g(t)\big)^2\,\text{d}t\leq \left|\int_{\text{e}^{-1}}^1\,g(t)\,\big(g(t)-p_n(t)\big)\,\text{d}t\right|\leq \int_{\text{e}^{-1}}^1\,\big|g(t)\big|\,\big|g(t)-p_n(t)\big|\,\text{d}t\leq \epsilon\,\int_{\text{e}^{-1}}^1\,\big|g(t)\big|\,\text{d}t\,,$$ for $n\geq N$. As $\epsilon>0$ is arbitrary, we conclude that $$0\leq \int_{\text{e}^{-1}}^1\,\big(g(t)\big)^2\,\text{d}t\leq 0\,.$$ That is, $\displaystyle\int_{\text{e}^{-1}}^1\,\big(g(t)\big)^2\,\text{d}t=0$, yielding $g\equiv0$.
As for your second question, I am not sure what is standard here. I think that it is rare to find problems like this in which you can transform something into polynomials. Anyway, great attempt!