Show that $f=0$ given $\int_{a}^{b} x^n\,f(x)\,dx=0$ 
Let $f:[a,b]\rightarrow \mathbb {R} $ a continious function such that $$ \int_{a}^{b} x^n\,f(x)\,dx=0$$ for all $n \in \mathbb N$.
Show that $f$ is identically $0$.

I notice that $f$ is bounded and it touches its bounds. But I don't  know how to continue.
 A: If $\int_{a}^{b} x^n f (x) \, dx=0$ for all $n \in \mathbb N$, then $\int_{a}^{b} p(x)f (x) \, dx=0$ for all polynomials $p$.
By the Weierstrass approximation theorem, this implies that $\int_{a}^{b} g(x)f (x) \, dx=0$ for all continuous functions $g : [a,b] \to \mathbb R$.
If $f$ is continuous, then taking $g=f$ gives $\int_{a}^{b} f(x)^2 \, dx=0$, which implies $f^2=0$, that is, $f=0$.
A: Assuming you mean for all $ n \geq 0 $ rather than some fixed $ n $, this is true. One possible proof is to first note that since this result holds for all $ n \geq 0 $, for any polynomial function $ p: [a,b] \to \mathbb R $, $ \int_a^b p(x) f(x) dx = 0 $. Using Stone-Weierstrass, we then have that for any continuous function $ g: [a, b] \to \mathbb R $, $ \int_a^b g(x) f(x) dx = 0 $. If $ f $ is itself continuous, then simply take $ g = f $ to conclude. If f is not continuous, then you can only conclude that $ f = 0 $ a.e., so I only know how do to this with Lebesgue integration.
In this case, we use the fact that for a function $ f \in L^1([-\pi, \pi]) $, if every Fourier coefficient $ a_n = \frac{1}{2 \pi} \int_{-\pi}^{\pi} f(x) e^{-inx} dx = 0 $ then $ f = 0 $ a.e. For a reference, this is Theorem 3.1 in chapter 4 of Stein and Shakarchi's Real Analysis. As $ \cos(nx) $ and $ \sin(nx) $ are continuous for all $ n \in \mathbb Z $, and as $ e^{inx} = \cos(nx) + i \sin(nx) $, we have that every Fourier coefficient of $ f $ is 0, so $ f = 0 $ a.e. by the theorem cited.
