1. ## Integral problem with arctan

I need a help integrating:
$
\int Arctan^2xdx
$

Any ideas?

2. I'm not gettin' anything nice.

Could it be $\arctan x^2$? At least that is not so ugly.

3. Nah $\int Arctan x^2dx$ is easy :P. I need help with the other one and indeed it is an ugly one.
The best i got so far is this:

with partial intergration:

$u = (arctan x)^2, du = \frac{2(arctan x)}{(1 + x^2)}$
$dv = dx,v = x$

and im getting:

$\int arctan^2 x dx= x*(arctan^2 x) - \int\frac{2x*(arctan x)}{1 + x^2} dx$

Now im integrating $\int\frac{2x*(arctan x)}{1 + x^2}dx$ with partial:

$u = arctan x,du = \frac{1}{1 + x^2}$
$dv = \frac{2x}{1 + x^2},v = ln(1 + x^2)$

and im getting:

$\int\frac{2x*(arctan x)}{1 + x^2} dx
= ln(1 + x^2)*(arctan x) - \int\frac{ln(1 + x^2)}{1 + x^2} dx$

and im stuck at this last integral

4. The last integral hasn't elementary primitive. It's useless to keep workin' out this.

5. But is there another way to do it? without getting the logarithmic integral?
Maybe some different partial integration or something?

6. I don't think so. I put your integral to check it with a software and its answer involves complex numbers.

There're lots of definite integrals which don't have elementary primitives, but workin' with integration limits one can find a suitable answer. In this case, I tried with some boundary limits but nothing worked out.