If $f$ belongs to $C[0, \pi]$ and $f(0) = 0$. Determine the cases where the given condition implies that $f$ is identically zero.
Case 1 $\int_{0}^{\pi}\ x^nf(x) =0$ for all non negative integer n
Case 2 $\int_{0}^{\pi}f(x)\cos nx =0$ for all non negative integer n
Case 3 $\int_{0}^{\pi}f(x)\sin nx =0$ for all positive integer n
What I know is if $f(x)$ greater or equal to $0$ in the interval then $\int_{0}^{\pi}\ f(x) =0$ implies $f(x) = 0$.If I use Weierstrass approximation theorem I would get the first case done. But I can not understand how to proceed for last two cases. Can anyone help me out? For your information all the cases are true.
Case 2: Extend $f$ to $F$ on $[-\pi,\pi]$ so that $F$ is even. Then the evenness of $F(x)$ and $\cos nx$ shows
$$\int_{-\pi}^{\pi}F(x)\cos nx\,dx = 2\int_0^{\pi}f(x)\cos nx\,dx = 0$$
for $n=0,1,2,\dots.$ Now use the evenness of $F(x)$ and the oddness of $\sin nx$ to see $$\int_{-\pi}^{\pi}F(x)\sin nx\,dx = 0,$$ $n=1,2,\dots.$ Thus all of $F$'s Fourier coefficients are $0.$ By Parseval's theorem,
$$\int_{-\pi}^{\pi}|F(x)|^2\, dx = 0.$$
The continuity of $F$ then implies $F\equiv 0.$ Because $F=f$ on $[0,\pi],$ we have $f\equiv 0.$
Case 3: See if you can solve this case using ideas similar to the above.