<s>[INST] How to calculate $\int \frac{dx}{(a^2 + x^2)^2}$? I'm trying to use a trig substitution but I'm stuck. Here's what I did so far: 
$$\int \frac{dx}{(a^2 + x^2)^2}$$
Let $x = a\sin \theta, dx = a\cos \theta d\theta$
$$\int \frac{a cos\theta d\theta}{(a^2 + a^2 sin^2 \theta)^2} = \int \frac{a\cos \theta d\theta}{(a^2(1+sin^2\theta))^2} $$
$$\int \frac{a\cos \theta d\theta}{(a^2 \cos^2\theta)^2} =\int \frac{d\theta}{a^3cos^3\theta}  $$
I don't know what to do anymore
 [/INST] For any $A>0$ we have 
$$ \int\frac{dx}{A+x^2}=C+\frac{1}{\sqrt{A}}\arctan\frac{x}{\sqrt{A}}$$
hence by differentiating both sides with respect to $A$ we get
$$ \int \frac{dx}{(x^2+A)^2} = D+\frac{x}{2A(x^2+A)}+\frac{1}{2A\sqrt{A}}\arctan\frac{x}{\sqrt{A}} $$
and now we just have to evaluate both sides at $A=a^2$.
</s>