$\int\frac1{(x^2+1)^2}\ dx$ by partial fraction decomposition Is there any possible way to calculate the integral of $\frac{1}{(x^2+1)^2}$ by partial fraction decomposition? I do not know the formulas for the trigonometric method.
Thank you!
 A: Up to my knowledge no.
I see 3 ways : 


*

*a change of variables : $x = \tan t$,

*modify the numerator $\frac{1}{(1+x^2)^2} = \frac{1+x^2-x^2}{(1+x^2)^2} = \frac{1}{(1+x^2)} + \frac{x}{2}\frac{-2x}{(1+x^2)^2} = \arctan'(x) + \frac{x}{2}\left(\frac{1}{1+x^2}\right)'$ and integrate by part the second quantity,

*method by residues theorem.


To integrate by parts, use : $\int u'v = uv - \int uv'$ with $u = \frac{1}{1+x^2}$ and $v=\frac{x}{2}$, thus
$$
\begin{array}{rcl}
\displaystyle\int\frac{1}{(1+x^2)^2}\mathrm{d}x &=& \displaystyle\int \arctan'(x) + \frac{x}{2}\left(\frac{1}{1+x^2}\right)'\mathrm{d}x\\
& =& \displaystyle \arctan(x) + \frac{1}{2}\frac{x}{1+x^2} - \frac{1}{2}\int \frac{1}{1+x^2}\mathrm{d}x\\
&=& \displaystyle\frac{1}{2} \left(\arctan(x) + \frac{x}{1+x^2}\right) + \mathsf{cte}
\end{array}
$$
A: When you let $x=\tan\theta$, and $dx=\dfrac{d\theta}{\cos^2\theta}$
$$\int\dfrac{1}{(1+x^2)^2}dx=\int\dfrac{1}{(1+\tan^2\theta)^2\cos^2\theta}d\theta=\int\dfrac{\cos^4\theta}{\cos^2\theta}d\theta=\int\cos^2\theta d\theta\\=\dfrac{\theta}{2}+\dfrac{\sin^2\theta}{4}+C=\dfrac{\arctan x}{2}+\dfrac{x}{2(1+x^2)}+C$$
A: $$\Re\frac1{(x+i)^2}=\Re\frac{(x-i)^2}{(x+i)^2(x-i)^2}=\frac{x^2-1}{(x^2+1)^2}=\frac1{x^2+1}-\frac2{(x^2+1)^2}$$
and by integration,
$$\Re\frac{-1}{x+i}=\arctan x-2\int\frac{dx}{(x^2+1)^2}.$$
Hence
$$2\int\frac{dx}{(x^2+1)^2}=\arctan x+\frac{x}{x^2+1}.$$
A: Hermite's algorithm essentially does what you want.  You can read about it here.  Rather than replicate that work...
Observe 
$$  \frac{1}{(x^2+1)^2} = \frac{(1/2)(1-x^2)}{(x^2+1)^2} + \frac{1/2}{x^2+1}  $$
and
$$  \frac{\mathrm{d}}{\mathrm{d}x} \frac{x}{x^2+1} = \frac{1-x^2}{(x^2 +1)^2}  \text{.}  $$
Another way to get to the second fact is to use https://math.stackexchange.com/a/68512/123905 .
Therefore, \begin{align*}
\int \frac{1}{(x^2+1)^2} \,\mathrm{d}x
    &= \frac{1}{2} \int \frac{1-x^2}{(x^2+1)^2} + \frac{1}{x^2+1} \,\mathrm{d}x  \\
    &= \frac{1}{2}\left( \int \frac{1-x^2}{(x^2+1)^2}  \,\mathrm{d}x + \int \frac{1}{x^2+1} \,\mathrm{d}x \right)  \\
    &= \frac{1}{2}\left( \frac{x}{x^2+1} + \tan^{-1}x + C \right)  \\
    &= \frac{1}{2}\left( \frac{x}{x^2+1} + \tan^{-1}x \right) + C  \text{.}
\end{align*}
