Giả sử:
$4\sin^2x+1=5\sin^2x+\cos ^2x$
$=(a\sin x+b\cos x)(\sqrt{3}\sin x+\cos x)+c(\sin^2a+\cos^2x) $ $=(a \sqrt{3}+c)\sin^2x+(a+b \sqrt{3})\sin x\cos x+(b+c)\cos^2x $
Đồng nhất đẳng thức ta có:
$\begin{cases}a \sqrt{3}+c=5 \\ a+b \sqrt{3}=0 \\b+c=1\end{cases} \Rightarrow \begin{cases}a=\sqrt{3} \\ b=-1 \\c=2\end{cases} $
Khi đó:
$f(x)=\sqrt{3}\sin x-\cos x+\frac{2}{\sqrt{3}\sin x +\cos x} $
Do đó:
$\int\limits f(x)dx=\int\limits (\sqrt{3}\sin x -\cos x)dx-\int\limits \frac{2dx}{\sqrt{3}\sin x +\cos x} $
$=-\sqrt{3}\cos x-\sin x-\frac{1}{2}\ln|\tan(\frac{x}{2}+\frac{\pi}{12} ) | +C $