Evaluate $\int \frac{x^{2}}{\left(1+x^{2}\right)^{2}} d x$
Let, $x=\tan t$
Differentiating both side with respect to t
$\frac{d x}{d t}=\sec ^{2} t \Rightarrow d x=\sec ^{2} t d t$
$y=\int \frac{\tan ^{3} t}{\sec ^{4} t} \sec ^{2} t d t$
$y=\int \frac{\sin ^{3} t}{\cos t} d t$
$y=\int \frac{\left(1-\cos ^{2} t\right) \sin t}{\cos t} d t$
Again, let $\cos t=z$
Differentiating both side with respect to t
$\frac{d z}{d t}=-\sin t \Rightarrow-d z=\sin t d t$
$y=-\int \frac{\left(1-z^{2}\right)}{z} d z$
$y=-\int \frac{1}{z}-z d z$
Using formula $\int \frac{1}{z} d z=\ln z$ and $\int z^{n} d z=\frac{z^{n+1}}{n+1}$
$y=-\ln z+\frac{z^{2}}{2}+c$
Again, put $z=\cos t=\cos \left(\tan ^{-1} x\right)$
$y=-\ln \cos \left(\tan ^{-1} x\right)+\frac{\cos ^{2}\left(\tan ^{-1} x\right)}{2}+c$