$\int x^2 \frac{\left(x \sec ^2 x+\tan x\right)}{(x \tan x+1)^2} d x=$
Answer & explanation
Correct answer: option 2
Let $I=\int x^2 \frac{x \sec ^2 x+\tan x}{(x \tan x+1)^2} d x$. Then,
$I=\int x^2 \frac{1}{(x \tan x+1)^2} d(x \tan x+1)$
$\Rightarrow I=\frac{-x^2}{(x \tan x+1)}+2 \int \frac{x}{(x \tan x+1)} d x$
$\Rightarrow I=\frac{-x^2}{(x \tan x+1)}+2 \int \frac{x \cos x}{(x \sin x+\cos x)} d x$
$\Rightarrow I=\frac{-x^2}{(x \tan x+1)}+2 \ln |x \sin x+\cos x|+C$