Find this maximum of this $\frac{\int_{0}^{\pi}f(x) \, dx}{\int_{0}^{\pi} f(x)\sin x\,dx}$ Question:

Assmue that $\int_0^\pi f(x)\,dx$ and $\int_0^\pi f(x)\sin x\,dx$ is convergence,and $f(x)>0,\forall x\in(0,\pi)$   Find this maximum as possible for all function $f$
  $$I=\dfrac{\int_0^\pi f(x)\,dx}{\int_0^\pi f(x)\sin{x}\,dx}$$

show that：
$$I\le\dfrac{4}{\pi}?$$
I think this problem is interesting,But I can't.

Hint: let
$$f_n(x):= n\chi_{(0,1/n)} + n^{-1}\chi_{[1/n,\pi]}, $$
with $\chi$ denoting the indicator (i.e. for any set $E$, $\chi_E=1$ on $E$, $\chi_E=0$ outside $E$).
You get
$$\int_0^\pi f_n(x)dx = 1+ (\pi-1/n)/n ,$$
while (for large $n$)
$$\int_0^\pi |f_n(x)\sin x| dx \leq n\int_0^{1/n} x dx +  (\pi-1/n)/n ... $$
