Two continuous functions s.t. $\int_0^1f(x)x^ndx=\int_0^1g(x)x^ndx$ 
Prove that if $f: [0,1]\to \mathbb{R}$ and $g: [0,1]\to \mathbb{R}$ are continuous functions s.t.
  $$\int_0^1f(x)x^ndx=\int_0^1g(x)x^ndx$$
  for $n=1,2,...$
  then $f=g$.

I feel like I try to show that 
$$\int_0^1(f(x)-g(x))x^ndx=0$$ and denote the sequence $h_n(x)=(f(x)-g(x))x^n$. 
 A: Let $h(x)=x(f(x)-g(x))$.  Inasmuch as both $f(x)$ and $g(x)$ are continuous on $[0,1]$, then $h(x)$ is also continuous on $[0,1]$. 
From the Weierstrass Approximation Theorem, we know that for all $\varepsilon>0$, there exists a polynomial on $[0,1]$ such that 
$$|h(x)-p(x)|<\varepsilon$$
For a given $\varepsilon>0$ and corresponding approximating polynomial $p(x)$, we find 
$$\begin{align}
\require{cancel}
\int_0^1 h^2(x)\,dx&=\cancelto{0}{\int_0^1 h(x)p(x)\,dx}+\int_0^1 h(x)(h(x)-p(x))\,dx\\\\
&=\int_0^1 h(x)(h(x)-p(x))\,dx
\end{align}$$
Finally, we have the following estimate
$$\left|\int_0^1 h(x)(h(x)-p(x))\,dx\right|\le ||h||_\infty \epsilon$$
Since $\epsilon>0$ is arbitrary, and given that $h\in C[0,1]$ we conclude that $h(x)\equiv0$ and thus $f\equiv g$ for $0<x\le 1$.  Inasmuch as $f$ and $g$ are continuous on the closed interval, then $f\equiv g$ on $[0,1]$.
A: It is all about to show that 
\begin{align*}
\int_{0}^{1}f(x)x^{n}dx=0,~~~~n=1,2,...
\end{align*}
implies that $f=0$.
Consider $g(x)=xf(x)$, then 
\begin{align*}
\int_{0}^{1}g(x)x^{n}dx=0,~~~~n=0,1,2,...
\end{align*}
Then it is a standard exercise using Weierstrass Theorem to show that $g=0$, then for $x\ne 0$, $f(x)=0$. But then continuity of $f$ at $0$ gives that $f(0)=0$.
