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