Which condition ensures that function is identically zero? Let $f:[-\pi,\pi] \rightarrow R $  be continuous. Pick out cases which imply $f\equiv0$ $$(a)  \int_{-\pi}^{\pi} x^n f(x) dx=0 ,\quad\forall n\geq0 \\(b)\int_{-\pi}^{\pi} f(x) cos(nx) dx=0 ,\quad\forall n\geq0\\(c)\int_{-\pi}^{\pi}f(x) sin(nx) dx=0 ,\quad\forall n\geq1.$$ The question is asked in NBHM(India) examination. My doubt here is that if we put $f(x)=1$ in (b) and (c) then the integrals vanish. And (a) seems possible choice but answer key says that all options are correct. Please correct where I am making mistake or the answers are wrong. Thank you for help. 

You are right. (b) and (c) do not imply that $f\equiv0$.
Suppose that (a) holds. Then we have $\int_{-\pi}^{\pi} p(x) f(x) dx=0$ for all polynomials $p$.
Since f is continuous, by the approximation theorem of Weierstraß there is a sequence $(p_n)$ of polynomials such that $(p_n)$ converges uniformly t0 $f$ on $[- \pi, \pi]$. Hence $(p_nf)$ converges uniformly t0 $f^2$ on $[- \pi, \pi]$. Therefore
$\int_{-\pi}^{\pi} p_n(x) f(x) dx \to \int_{-\pi}^{\pi}  f^2(x) dx$.
Thus we get $\int_{-\pi}^{\pi}  f^2(x) dx=0$. Since $f$ is continuous, we derive $f\equiv0$
