I have to show that $g: [-\pi, \pi] \to \mathbb R$ is even when: it is continuous, $g(\pi) = g(-\pi)$, and when for all $n \in \mathbb N$:
$$\int_{-\pi}^{\pi}g(t)\sin(nt)\mathrm dt = 0.$$
My attempt: I know that if $g$ is odd:
$$g(x) = \frac{g(x) - g(-x)}{2},$$
then
$$\int_{-\pi}^{\pi}g(t)\sin(nt)\mathrm dt =\int_{-\pi}^{\pi}g(t)\sin(nt)\mathrm dt - \int_{-\pi}^{\pi}g(-t)\sin(nt)\mathrm dt = 0.$$
Hence,
$$\int_{-\pi}^{\pi}g(t)\sin(nt)dt =\int_{-\pi}^{\pi}g(-t)\sin(nt)\mathrm dt$$
But I can not prove that $g$ is even... I was following a hint. Thanks.
Hint: use the Fourier series of the function g(t), it is the sum of even functions and so is even.