Integral of $x^2/(x^2 + \alpha^2)^2$ I want to find the indefinite integral 
$$\int\frac{x^2}{(x^2 + \alpha^2)^2}\,dx.$$
The answer (from Mathematica) is
$$-\frac{x}{2(x^2+\alpha^2)} + \frac{1}{2\alpha}\tan^{-1}\left(\frac{x}{\alpha}\right).$$
I can tell from the answer that there must be some integration by parts and some sort of trig substitution, but I can't seem to get it to work. Any ideas?

The usual method of trigonometrical substitution would suggest to put 
\begin{align*}
x&=a\cdot \tan\theta\\
dx&=a\cdot \sec^2\theta\,d\theta
\end{align*}
and go on. We obtain
\begin{align*}
\int \dfrac{x^2}{(x^2+a^2)^2}\,dx&=\int \dfrac{a^2\tan^2\theta}{(a^2\tan^2\theta+a^2)^2}\,a\sec^2\theta\,d\theta\\
&=\int \dfrac{a^2\tan^2\theta}{(a^2(1+\tan^2\theta))^2}\,a\,\sec^2\theta\,d\theta\\
&=\int \dfrac{a^3\tan^2\theta \sec^2\theta}{a^4(\sec^2\theta)^2}\,d\theta\\
&=\int \dfrac{\tan^2\theta}{a\sec^2\theta}\,d\theta\\
&=\dfrac{1}{a}\int \dfrac{\dfrac{\sin^2\theta}{\cos^2\theta}}{\dfrac{1}{\cos^2\theta}}d\theta\\
&=\dfrac{1}{a}\int \sin^2\theta\,d\theta\\
&=\dfrac{1}{a}\int \dfrac{1-cos(2\theta)}{2},d\theta\\
&=\dfrac{1}{2a}\theta - \dfrac{1}{4a}\sin(2\theta)+C.
\end{align*}
To recover the original variables we do:
\begin{align*}
\tan\theta=\dfrac{x}{a} &\Rightarrow \sin\theta=\dfrac{x}{\sqrt{x^2+a^2}} \text{ and } \cos\theta=\dfrac{a}{\sqrt{x^2+a^2}}\\
&\Rightarrow \sin(2\theta)=2\sin\theta\cos\theta=\dfrac{2ax}{x^2+a^2}\\
&\\
\tan\theta=\dfrac{x}{a} &\Rightarrow \theta=arctan\left(\dfrac{x}{a}\right)
\end{align*}
Obtaining the following:
\begin{align*}
\int \dfrac{x^2}{(x^2+a^2)}\,dx&=-\dfrac{1}{4a}\sin(2\theta) + \dfrac{1}{2a}\theta + C\\
&=-\dfrac{1}{4a}\dfrac{2ax}{x^2+a^2}+\dfrac{1}{2a}\arctan\left(\dfrac{x}{a}\right)+C\\
&=-\dfrac{x}{2(x^2+a^2)}+\dfrac{1}{2a}\arctan\left(\dfrac{x}{a}\right)+C
\end{align*}
