Đặt \(t=\tan\frac{x}{2}\rightarrow dx=\frac{2dt}{1+t^2}\)
Khi đó : \(I=\int\frac{4\frac{dt}{1+t^2}}{\frac{4}{1+t^2}-\frac{1-t^2}{1+t^2}+1}=\int\frac{2dt}{1+2t^2}=\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\)