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?
 A: Hint: Use the change of variables $x=\tan t$ to get

$$ \int \cos^2 t\, dt .$$

I think you can finish it.
Note: The following identity is useful

$$ \cos(2x)=2\cos^2 x - 1 .$$

A: A method worth looking at (now I do not know its ramifications for Riemannian Integration or Lebesgue Integration, someone else will need to explore that) is good old partial fractions from Calc 2:
$$(1 + x^2) = (1 + ix) (1 - ix)$$
$$ \int{\frac{1}{(1 + x^2)^2}} = \int{\frac{a_1}{1 + ix}} + \int{\frac{a_2}{1 + ix}} + \int{\frac{a_3}{1 - ix}} + \int{\frac{a_4}{1 - ix}}$$
Such that:
$$a_i = u_ix + v_i$$ 
The challenge then is to simplify the expression you get (which may involve a variety of complex logarithms) into something clean involving, preferably, inverse trig functions.
But of course, if Lebesgue and Riemman integration is only defined over $R$ then this is of no use to you.
A: 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.
