f is a continuous function. $ \int_0^\pi f (x) \sin x=\int_0^\pi f (x) \cos x=0 $.Prove that $f (x)$ has two roots in the interval $(0 ,\pi)$
Look that $\sin x>0$ over the whole interval and thus to make the integral $0$, we must have $f(x)<0$ at some point.But if we get a root, we may transform the origin to the root and then use the sign changing property of $\cos x$