<s>[INST] Problem solving $\displaystyle\int\frac{1}{(x^2+1)^2}dx$, Riemann and Lebesgue How can we solve $\displaystyle\int\frac{1}{(x^2+1)^2}dx$ for Riemanian integration and Lebesgue integration mode?
 [/INST] Here is a partial fraction expansion that may be useful
$$\frac{1}{(1+x^2)^2} = \frac{1}{2} \frac{1}{1+x^2} - \frac{1}{2} \frac{x^2-1}{(1+x^2)^2}$$
Riemannian integral is easily obtained as 
$$\frac{1}{2} atan(x) + \frac{1}{2} \frac{x}{1+x^2}$$
Hope this helps
BTW: I followed the usual approach to partial fractions and then regrouped the terms into something nice.
</s>