<s>[INST] How to evaluate $\int_0^a\frac{x^4}{(a^2+x^2)^4}dx$? I have to evaluate 

$$\int_0^a\frac{x^4}{(a^2+x^2)^4}\,{\rm d}x$$

I tried to substitute $x=a\tan\theta$ which then simplifies to
$$\frac1{a^5}\int_0^\frac\pi4\sin^4\theta\cos^2\theta\, {\rm d}\theta$$.
Now,its quite hectic to solve this. Is there any other method out?
 [/INST] This is a rather standard rational function integral, and we only have to decompose it into partial fractions.
To have lighter calculations, we'll set $T=a^2+x^2$. Then
$$x^4=T^2-2a^2x^2-a^4=T^2-2a^2T+a^4$$
which yields the decomposition
\begin{align}
\frac{x^4}{(a^2+x^2)^4}&=\frac{T^2-2a^2T+a^4}{T^4}=\frac1{T^2}-\frac{2a^2}{T^3}+\frac{a^4}{T^4}\\
&=\frac1{(a^2+x^2)^2}-\frac{2a^2}{(a^2+x^2)^3}+\frac{a^4}{(a^2+x^2)^4}.
\end{align}
Now the integrals $\;I_n=\int\frac{\mathrm d x}{(a^2+x^2)^n}$ can be computed recursively, from
\begin{cases}
I_1=\dfrac1a\arctan \dfrac xa, \\
I_{n+1}=\dfrac1{2na^2}\dfrac x{(a^2+x^2)^n}+\dfrac{2n-1}{2na^2} I_n.
\end{cases}
The recurrence relation can be obtained with an integration by parts of $I_n$.
</s>