For $2\pi-$periodic and continuous $f$, does $\int_{-\pi}^{\pi} f(x) \cos (nx) = 0$ for $n = 0, 1, 2 \dots$ imply $f$ is odd? Similarly, does $\int_{-\pi}^{\pi} f(x) \sin (nx) = 0$ for $n = 0, 1, 2 \dots$ imply $f$ is even?
Motivation. If we are given $f$ is $2\pi$ periodic and we are given both conditions, we can show that $f \equiv 0$ by considering a sequence of trigonometric polynomials which converge uniformly to $f$. Can we get this same result by showing that the first individually shows that $f$ is odd and the second that $f$ is even so that we get $f \equiv 0$?