Đặt : t= tan\(\frac{x}{2}->dx=\frac{2dt}{1+t^2}\)
Khi đó \(I=\int\frac{4\frac{dt}{1+t^2}}{\frac{4t}{1+t^2}-\frac{1-t^2}{1+t^2}+1}=\int\frac{2dt}{t^2+2t}=\int\left(\frac{1}{t}-\frac{1}{t+2}\right)dt\)
\(ln\left|\frac{1}{t+2}\right|+C=ln\left|\frac{tan\frac{x}{2}}{tan\frac{x}{2}+2}\right|+C\)