# $\int \frac{x^{2} \arctan x}{1+x^{2}}dx$

So I have the integral

$$\int \frac{x^{2} \arctan x}{1+x^{2}}dx$$

how can I solve this integral without substituting $u=\arctan x$?

Because I think that if I do this, lets suppose that in the end I'll have as a solution $\tan u + \cos u$ when I replace $u$, it will look strange.

-
Welcome to MSE! It really helps if you could format your questions using MathJax. Regards –  Amzoti Jan 31 '13 at 18:03
The ironic thing is the only reasonable alternative to eliminate the arctangents, integration by parts, also uses the substitution $u=\tan^{-1}x$. –  Mike Jan 31 '13 at 22:06

Since

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

$$\int\frac{\arctan x}{1+x^2}dx=\int\arctan x\,\,d(\arctan x)=\frac{\arctan^2x}{2}+K$$

Thus, integrating by parts:

\begin{align*}u=\arctan x&;\;\;u'=\frac{1}{1+x^2}\\{}\\v'=\frac{x^2}{1+x^2}&;\;\;v=x-\arctan x\end{align*}

so

$$\int\frac{x^2\arctan^2 x}{1+x^2}dx=x\arctan x-\arctan^2x-\int \frac{x}{x^2+1}dx+\int\frac{\arctan x}{1+x^2}dx\,dx=$$

$$=x\arctan x-\frac{\arctan^2x}{2}-\frac{1}{2}\log(1+x^2)+C$$

-

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

Now, $$\int \arctan xdx =\arctan x\int dx-\int\left(\frac{d \arctan x}{dx}\int dx\right) dx$$ $$=x\arctan x-\int\frac{x}{1+x^2}dx$$ $$=x\arctan x-\frac12\log (1+x^2)+c_1 \text{ (Putting }1+x^2=z \text{ in the 2nd integral, so that } dz=2xdx )$$

Again, $$\int\frac{\arctan x}{1+x^2} dx=\int udu\text{ where } u=\arctan x,du=\frac{dx}{1+x^2}$$

So, $$\int\frac{\arctan x}{1+x^2} dx=\frac{u^2}2+c_2=\frac{(\arctan x)^2}2+c_2$$

Here $c_1,c_2$ are arbitrary constants for indefinite integral.

-
With $\tan(u)=x$, \begin{align} \int\frac{x^2\arctan(x)}{1+x^2}\mathrm{d}x &=\int\left(1-\frac1{1+x^2}\right)\arctan(x)\,\mathrm{d}x\\ &=\int\arctan(x)\,\mathrm{d}x-\int\frac1{1+x^2}\arctan(x)\,\mathrm{d}x\\ &=\int u\,\mathrm{d}\tan(u)-\int u\,\mathrm{d}u\\ &=u\tan(u)-\int\tan(u)\,\mathrm{d}u-u^2/2\\[4pt] &=u\tan(u)+\log|\cos(u)|-u^2/2+C\\[8pt] &=x\arctan(x)-\tfrac12\log(1+x^2)-\tfrac12\arctan(x)^2+C \end{align}