<s>[INST] Find the indefinite integral $\int\frac{dx}{(x^2+2x+5)^2}$ I need help with the indefinite integral 
\begin{align}
& \int\frac{dx}{(x^2+2x+5)^2} \\[10pt]
= {} & \int\frac{dx}{((x+1)^2+4)^2} = \int\frac{du}{(u^2+4)^2} & & x+1=u,\quad du=dx \\[10pt]
= {} & \frac{1}{16} \int\frac{du}{(\frac{u^2}{4}+1)^2} \\[10pt]
= {} &  \frac 1 8 \int \frac{ds}{(s^2+1)^2} = \text{?} & & \frac u 2 = s, \quad 2\,ds=du
\end{align}
or maybe there is an easier way ? 
Any ideas ? thanks !
 [/INST] If you write $s = \tan(t)$ then you obtain $\sec^2(t)\,\mathrm{d}t = \mathrm{d} s$ and
$$
 \int \frac{1}{(1+s^2)^2}\,\mathrm{d}{s}=\int \cos^2(t)\,\mathrm{d}{t}
$$
you can then solve the second integral by using the double-angle formula for cosine.
</s>