Question: How can we solve $\displaystyle\int\frac{1}{(x^2+1)^2}dx$ for Riemanian integration and Lebesgue integration mode?

Answer: 
**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 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.