<s>[INST] How to integrate fraction Hi can anybody give me some hint how to integrate this type of fractions
$$\int \frac{1}{(x^2 +a)^2} dx $$ where $ a \in \mathbb N $
Thanks
 [/INST] Take the integral
$$\int \frac{dx}{x^2+a^2}$$
and we do an integration by parts:
$$\int 1\cdot\frac{dx}{x^2+a^2}=\frac{x}{x^2+a^2}+2\int\frac{x^2dx}{(x^2+a^2)^2}$$
for the last integral we add and subtract $1$ in the numerator and we find
$$\int\frac{dx}{(x^2+a^2)^2}=\frac 1 2\left(\int \frac{dx}{x^2+a^2}+\frac{x}{x^2+a^2}\right)$$
Notice that $$\int \frac{dx}{x^2+a^2}=\frac 1 a \arctan \left(\frac x a\right)+C$$
</s>