Find $\int \frac 1 {(x^2 +a^2)^2} dx $. I am trying to integrate $\int \frac 1 {(x^2+a^2)^2} \ dx$.  The only thing that I can think to try is substitution, $u=x^2+a^2$ so that $\frac{du}{dx}=2x \Rightarrow du = 2x\ dx = 2\sqrt{u-a^2}\ du$ and then the integral becomes
$$ \int \frac{1}{u^2} (2\sqrt{u-a^2} \ du) $$
which does not seem productive.
I could try perhaps to separate with integration by parts, setting $u = \frac{1}{x^2 +a^2}$ and $dv = \frac{dx}{x^2+a^2}$.  Then we obtain $\frac{du}{dx} = -\frac{1}{(x^2+a^2)^2}(2x)$ and $v = \frac 1 a \tan^{-1}(x/a)$.  Then the integral becomes
$$ \begin{align*}
uv - \int v \ du &= \left(\frac{1}{x^2 +a^2}\right)\left(\frac 1 a \tan^{-1}(x/a)\right) - \int \left(\frac 1 a \tan^{-1}(x/a)\right) \left( -\frac{1}{(x^2+a^2)^2}(2x) \right) \ du
\end{align*}$$
but this also looks like it's headed nowhere good.  Advice?
 A: hint
Write the integral as
$$\frac{1}{a^2}\int \frac{a^2+x^2-x^2}{(a^2+x^2)^2}dx$$
$$\frac{1}{a^2}\Bigl(\int\frac{dx}{a^2+x^2}-\frac 12\int x\frac{2xdx}{(a^2+x^2)^2}
\Bigr)$$
Put $ x=at $ for the first integral and use by parts for the second.
A: As Oiler has mentioned in the comments, setting $x=a\tan\theta$ is the best approach because we can use the identity $\tan^2\theta + 1 = \sec^2\theta$ to our advantage:
$$
(x^2+a^2)^2=(a^2\tan^2\theta+a^2)^2=(a^2\sec^2\theta)^2=a^4\sec^4\theta \, .
$$
Since $dx=a\sec^2\theta \, d\theta$, the integral becomes
\begin{align}
\int \frac{a\sec^2\theta \, d\theta}{a^4\sec^4\theta}&=\frac{1}{a^3}\int\frac{d\theta}{\sec^2\theta} \\
&= \frac{1}{a^3} \int \cos^2\theta \, d\theta \, .
\end{align}
From here you can use integration by parts or, more simply, use the identity
$$
\cos(2\theta)=2\cos^2\theta - 1 \, .
$$
A: Another thing you can do is to compute first
$$
\int\frac{\text{d}x}{a^2+x^2}
$$
and i'm sure you can compute it.
Then you can use integration by parts on this previous integral, that will make $\displaystyle \frac{1}{\left(a^2+x^2\right)^2}$ appear.
A: If you do $x=ay$ and $\mathrm dx=a\,\mathrm dy$, your integral becomes$$\int\frac a{(a^2y+a^2)^2}\,\mathrm dy=\frac1{a^3}\int\frac1{(y^2+1)^2}\,\mathrm dy.$$On the other hand\begin{align}\int\frac1{(y^2+1)^2}\,\mathrm dy&=\int\frac1{y^2+1}\,\mathrm dy-\int\frac{y^2}{(y^2+1)^2}\,\mathrm dy\\&=\arctan(y)-\frac12\int\frac{2y}{(y^2+1)^2}y\,\mathrm dy\\&=\arctan(y)-\frac12\left(-\frac y{y^2+1}+\int\frac1{y^2+1}\,\mathrm dy\right)\\&=\frac12\arctan(y)+\frac12\frac y{y^2+1}\\&=\frac12\arctan\left(\frac xa\right)+\frac12\frac{ax}{x^2+a^2},\end{align}and therefore$$\int\frac1{(x^2+a^2)^2}\,\mathrm dx=\frac1{2a^3}\arctan\left(\frac xa\right)+\frac1{2a^2}\frac x{x^2+a^2}.$$
