<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] There is a reduction process. Apply integration by parts.
$$\int \frac{1}{1+x^2}\,dx=\frac{x}{1+x^2}-\int x \,d\frac{1}{1+x^2}$$
$$=\frac{x}{1+x^2}+2\int \frac{1}{1+x^2}\,dx-2\int \frac{1}{(1+x^2)^2}\,dx$$
And rearranging, 
$$2\int \frac{1}{(1+x^2)^2}\,dx=\frac{x}{1+x^2}+\int \frac{1}{1+x^2}\,dx$$
</s>