<s>[INST] $\int\frac1{(x^2+1)^2}\ dx$ by partial fraction decomposition Is there any possible way to calculate the integral of $\frac{1}{(x^2+1)^2}$ by partial fraction decomposition? I do not know the formulas for the trigonometric method.
Thank you!
 [/INST] $$\Re\frac1{(x+i)^2}=\Re\frac{(x-i)^2}{(x+i)^2(x-i)^2}=\frac{x^2-1}{(x^2+1)^2}=\frac1{x^2+1}-\frac2{(x^2+1)^2}$$
and by integration,
$$\Re\frac{-1}{x+i}=\arctan x-2\int\frac{dx}{(x^2+1)^2}.$$
Hence
$$2\int\frac{dx}{(x^2+1)^2}=\arctan x+\frac{x}{x^2+1}.$$
</s>