Why is it implied that $f$ is an odd function if the integral from $[-t,t]$ of $f(x)g(x)= 0$? Let $f:[-t,t]\to\mathbb{R}$ be a continuous function where $t>0$. If
$\int_{-t}^{t} f(x)g(x)\,dx=0$, for every integrable even function $g:[-t,t]\to\mathbb{R}$, show that $f$ is an odd function.
Okay, so I've been messing around with this, and I think that it starts with assuming $g(x)$ is some generalized form of an even function. So, maybe $f(x)+f(-x)$? Then showing that for the product of the functions to tend to zero, $f(x)$ is some generalised form of an odd function? Maybe it should be $g(x) = (f(x)-f(-x))/2$ and $f(x) = (f(x)+f(-x))/2$?
 A: Consider a sequence of functions 
$$
g_{n,u}(x) = \left\{
  \begin{array}{ll}
    n/2 & :& x \in (u-1/n,u+1/n]\\
    0 & :& {\rm{otherwise}}
  \end{array}
\right.
$$
Then $\lim_{n\to \infty}\int_{-t}^t g_{n,u}(x)f(x)dx=f(u)$, when $u\in(-t,t)$.
Now let $g^*_{n,u}(t)=g_{n,-u}(t)+g_{n.u}(t)$, this is even and so:
$$\lim_{n\to \infty}\int_{-t}^t g^*_{n,u}(x)f(x)dx=f(-u)+f(u)=0, \ \ u\in(-t,t)$$
Which imples that $f(u)=-f(u)$ for $u\in (-t,t)$ and the same follows by continuity of $f$ at the end points of the interval, so $f(x)$ is an odd function on $[-t,t]$
A: Fix $x\in (0,t)$ and let $\delta>0$ be determined later. Take $\epsilon>0$ such that $(x-\epsilon, x+\epsilon)\subset (0,t)$ and $|f(x)-f(s)|<\delta$ for all $s\in (x-\epsilon, x+\epsilon)$, and $|f(s)-f(-x)|<\delta$ for all $s\in (-x-\epsilon, -x+\epsilon)$.
Now let $g$ be the indicator function on $(-x-\epsilon, -x+\epsilon)\sqcup(x-\epsilon, x+\epsilon)$. Then $$0=\int_{-t}^t f(s)g(s)ds = \int_{-x-\epsilon}^{-x+\epsilon}f(s)ds + \int_{x-\epsilon}^{x+\epsilon}f(s)ds.$$
It is bounded below by $$\int_{-x-\epsilon}^{-x+\epsilon}[f(-x)-\delta]ds + \int_{x-\epsilon}^{x+\epsilon}[f(x)-\delta]ds = 2\epsilon[f(-x)+f(x)-2\delta],$$ and is bounded above by $$\int_{-x-\epsilon}^{-x+\epsilon}[f(-x)+\delta]ds + \int_{x-\epsilon}^{x+\epsilon}[f(x)+\delta]ds = 2\epsilon[f(-x)+f(x)+2\delta].$$ Therefore $f(-x)+f(x)-2\delta\leq 0 \leq f(-x)+f(x)+2\delta$. Send $\delta\to 0$ and get $f(-x)+f(x)=0$ for all $x\in(0,t)$. By continuity of $f$, it is so for all $x\in[0,t]$.
