Integrating $\frac{1}{(x^2+1)^2}$ How do I integrate $\frac{1}{(x^2+1)^2}$?
I've tried to use the fact that $\int \frac{1}{(x^2+1)}=Arctan(x)$ but I don't know how to. I think it's by parts. Tried using $u'=(x^2+1)^{-1}$ and $v=(x^2+1)^{-1}$ in the formula $\int u'v=vu-\int uv'$, but it doesn't seem to help...
 A: Hint
By part $$\int\frac{1}{x^2+1}\mathrm dx=\int \underbrace{1}_{=u'}\cdot \underbrace{\frac{1}{1+x^2}}_{=v}\mathrm dx$$
A: First consider
$$I = \int \frac{dx}{(x^2+1)^{2}}$$
and the substitution $x=\tan\theta$. This leads to $dx = sec^{2}\theta \, d\theta$ and $x^2 + 1 = sec^{2}\theta$ and
\begin{align}
I &= \int \frac{sec^{2}\theta}{sec^{4}\theta} \, d\theta \\
&= \int \frac{d\theta}{sec^{2}\theta} \\
&= \int \cos^{2}\theta \, d\theta \\
&= \frac{1}{2} \, \int \left( 1 + \cos(2\theta) \right) \, d\theta\\
&= \frac{1}{2} \, \left[ \theta + \frac{1}{2} \, \sin(2\theta) \right] + c_{0}
\end{align}
Upon backward substitution this becomes
\begin{align}
I = \frac{1}{2} \, \tan^{-1}(x) + \frac{1}{4} \, \sin(2 \, \tan^{-1}(x)) + c_{0}
\end{align}
A: You can use a triangle substitution where $x = tan(u)$. The integral will simplify to $\int \cos^2(u)du$.
A: Suppose $x=\tan \theta$. Then $dx=\sec^2\theta d\theta$. Substitute:
$$\int \cfrac{1}{(\tan^2\theta + 1)^2}\sec^2\theta d\theta$$
By $tan^2\theta + 1 = \sec^2\theta$:
$$\int \cfrac{1}{sec^2\theta} d\theta = \int \cos^2\theta d\theta=\cfrac{1}{2}\bigg(\theta + \sin\theta\cos\theta\bigg)+C$$
By triangles,
$$ = \cfrac{1}{2} \bigg(\tan^{-1}x + \sin(\tan^{-1}x)\cos(\tan^{-1}x)\bigg)+C= \cfrac{1}{2} \bigg(\tan^{-1}x + \cfrac{x}{x^2+1}\bigg)+C$$
