Integration of $x^2\cdot\frac{x\sec^2x+\tan x}{(x\tan x+1)^2}$ Integrate 
$$\int x^2\cdot\dfrac{x\sec^2x+\tan x}{(x\tan x+1)^2}dx$$
So what is did is integration by parts taking $x^2$ as $u$ and the other part as $v$ . Now I got to use it again which then eventually leads to (integral of $\dfrac1{x\tan x+1}dx $). Can someone help me?

$x \tanx + 1 = t$ 
$$\int x^2\cdot\dfrac{x\sec^2x+\tan x}{(x\tan x+1)^2}dx$$
$$=\int \frac{x^2}{t^2}dt = x^2* (-1/t) + \int (2x/t)dt$$ (By parts)
$$ = x^2(-1/t) + 2x \ln|t| -2(t \ln|t|-t) + C$$ (By parts again)
