I have a problem like this:
Let $f:[-a,a]\to\mathbb R$ be a continuous function where $a>0$. If $f$ satisfies that $$\int_{-a}^a f(x)g(x)dx=0$$ for every integrable even function $g:[-a,a]\to\mathbb R,$ show that $f$ is an odd function.
My attempt:
Since $f(x)g(x)$ is integrable on $[-a,a]$ then the integral can be written as $$\int_{-a}^0 f(x)g(x)dx+\int_0^a f(x)g(x)dx=0$$Since $g(x)$ is even, then we have
$$\int_{-a}^0f(-x)g(x)dx+\int_0^af(x)g(x)dx=0.$$ This is where I get stuck. There was a hint that says obtain the integral equation $f(x)+f(-x)$ but I'm not sure what to do next. Any help is appreciated. Thanks.