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?

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 \, .
$$
