Prove $f(x)\equiv C$ $f(x)\in C[a,b]$.For any $g(x) \in C[a,b]$ ,which has the property that $\int_a^b g(x) dx=0$,$\int_a^b f(x)g(x) dx=0$.
Prove:$f(x)\equiv C$,$C$ is a constant.
I haven't any ideas yet.
I'm thinking about using the Fourier series,would it work?
 A: Let assume that, without loss of generality, $[a,b]=[0,2\pi]$. It follows from your condition, the for any $n\ge 1$
$$\int_0^{2\pi} f(x)\sin nx\,dx = \int_0^{2\pi} f(x)\cos nx\,dx = 0$$
What claims Fejer-Lebesgue theorem is that arithmetic mean of partial sums converges uniformly to a function:
$$\sigma_n(f,x) = \frac{1}{n+1}\sum_{k=0}^{n}S_n(f,x) \rightrightarrows f(x)$$
Take as $g(x)$ (it is justified because of the firs two equations)
$$g(x) = \sigma_n(f,x) - \int_0^{2\pi} f(x)\,dx$$
Now, since
$$\int_0^{2\pi} f(x)g(x)\,dx = \int_0^{2\pi} f(x)\sigma_n(f,x) - \left(\int_0^{2\pi} f(x)\,dx\right)^2 = 0$$
and from the uniform convergence of $\sigma_n$, we get
$$\int_0^{2\pi} f^2(x)\,dx = \left(\int_0^{2\pi} f(x)\,dx\right)^2$$
A: Put $\displaystyle I=\int_a^b f(x)dx$. Then $\displaystyle g=f-\frac{I}{b-a}$ is such that $\displaystyle \int_a^b g(x)dx=0$. 
Hence $\displaystyle \int_a^b f(x)g(x)dx=0$ and :
$$\int_a^b (f(x)-\frac{I}{b-a})^2dx=\int_a^b f(x)g(x)dx-\frac{I}{b-a}\int_a^b g(x)dx=0$$
And we are done. 
A: I'm thinking about using the Fourier series,is That right?
Without loss of generality，prove: in $[0,l]$，$f(x)\equiv C$.
let $g(x)=f(\mid x\mid)$
use Fourier series,we get：
\begin{aligned}
g(x)&={a_0 \over 2}+\sum_{n=1}^{\infty} a_n \cos {n \pi x \over l}\\
a_0&=\int_{-l}^l g(x) dx \\
a_n&={1 \over l}\int_{-l}^l g(x)\cos {n \pi x \over l} dx\\
&={2 \over l}\int_0^l g(x)\cos {n \pi x \over l} dx
\end{aligned}
It's easy to get $a_n=0$,s.t $g(x)\equiv {a_0 \over 2}$
