Prove that $ f(x) $ has at least two real roots in $ (0,\pi) $ Let $ f $ be a continuous function defined on $ [0,\pi] $. Suppose that 


  $$ \int_{0}^{\pi}f(x)\sin {x} dx=0,   \int_{0}^{\pi}f(x)\cos {x} dx=0 $$


Prove that $ f(x) $ has at least two real roots in $ (0,\pi) $
Here is one root: 
Let $F(x) = \int_{0}^x f(t) \sin t dt$. Then $F(0)=0$ and $F(\pi)=\int_{0}^\pi f(t)\sin tdt=0$. So by the intermediate value theorem, there exists $0&lt;c&lt;\pi$ such that
$$
0=F'(c) = f(c)\sin c.
$$
But since $\sin c\neq 0$, we get that $f(c)=0$.
This statement is not true. Actually, we should prove that $$\int_0^\pi f(x)[\cos x-\sin x]dx=0$$Now, define $$f(x)=\begin{cases}a\left(e-e^{4x\over \pi}\right)+1&amp;,\quad 0\le x\le {\pi\over 4}\\1&amp;,\quad {\pi\over 4}&lt;x\le \pi\end{cases}$$where $a\ge 0$. It is clear that $f(x)\ge 1$ over $[0,\pi]$ for all $a\ge 0$ hence it has no root. However, by defining $$I=\int_0^\pi f(x)[\cos x-\sin x]dx$$we immediately conclude that $I=-2&lt;0$ for $a=0$ and $\lim_{a\to \infty } I=\infty$. Based on intermediate value theorem and since $I$ is continuous w.r.t. $a$, there is a value for $a$ for which $I=0$, hence the statement is not true.

Here is a sketch of the two functions using Python: