Indefinite integration of $\ln(1+x^2)\arctan x$ We need to evaluate $$\int \ln(1+x^2)\arctan x \, \mathrm{d}x$$
My thoughts were to set $u = \arctan x \implies x = \tan u$ so that our integral is transformed to $$\int 2u \sec^2 u \ln \sec u \, \mathrm{d}u$$
Am I on the right path? How do I continue from here? Are there alternative ways of doing this? 

We integrate by parts. First we find $\int \arctan x\, dx$.
$$\int \arctan x\, dx = (\arctan x)(x)-\int \frac{x}{x^2+1}\, dx$$
$$=(\arctan x)(x)-\frac{1}{2}\int \frac{d\left(x^2+1\right)}{x^2+1}=(\arctan x)(x)-\frac{1}{2}\ln(x^2+1)+C$$
$$\int \left(\ln\left(1+x^2\right)\right)\left(\arctan x\, dx\right)$$
$$=\ln\left(1+x^2\right)\left((\arctan x)(x)-\frac{1}{2}\ln(x^2+1)\right)-$$
$$-\int \left(\frac{2x}{1+x^2}\right)\left((\arctan x)(x)-\frac{1}{2}\ln(x^2+1)\right)\, dx$$
It's enough to find:
$$\int \left(\frac{2x}{1+x^2}\right)\left((\arctan x)(x)-\frac{1}{2}\ln(x^2+1)\right)\, dx=$$
$$=2\int \arctan x\, dx -2\int \frac{1}{1+x^2}\arctan x\, dx-\int \frac{x\ln\left(x^2+1\right)}{x^2+1}\, dx$$
We have $3$ integrals. We know the $1$st one. The $2$nd one is:
$$\int \frac{1}{1+x^2}\arctan x\, dx=\int \arctan x\, d(\arctan x)=\frac{(\arctan x)^2}{4}+C$$
The $3$rd one is:
$$\int \frac{x\ln\left(x^2+1\right)}{x^2+1}\, dx=\frac{1}{2}\int \frac{\ln(x^2+1)}{x^2+1}\, d\left(x^2+1\right)$$
$$=\frac{1}{2}\int \ln\left(x^2+1\right)\, d\left(\ln\left(x^2+1\right)\right)$$
$$=\frac{\left(\ln\left(x^2+1\right)\right)^2}{4}+C$$
