# Math Help - tricky integral (by parts)

1. ## tricky integral (by parts)

integral of x(arctanx)^2

I started doing it by parts but it goes on forever! any ideas on how to solve would be great

2. Originally Posted by khood
integral of x(arctanx)^2

I started doing it by parts but it goes on forever! any ideas on how to solve would be great
Let $x = \tan(z)$

$z = \arctan(x)$

$\frac{dz}{dx} = \frac{1}{x^2+1}$

$dx = x^2+1dz = \tan^2(z)+1dz$

$\int{z^2 \tan(z)(\tan^2(z)+1)\,dz}$

$\int{z^2 \tan^3(z)+z^2\tan^2(z)\,dz}$

$\int{z^2( \tan^3(z)+\tan^2(z))\,dz}$

There's still going to be a lot of integration by parts, but it's easier now, at least!

3. thanks

4. Originally Posted by khood
integral of x(arctanx)^2

I started doing it by parts but it goes on forever! any ideas on how to solve would be great
You're right, you can use integration by parts.

Let $u = (\arctan{x})^2 \implies du = \frac{2\arctan{x}}{x^2 + 1}$

and $dv = x \implies v = \frac{x^2}{2}$.

Remembering that $\int{u\,dv} = uv - \int{v\,du}$ we get

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

To evaluate this integral, you'd need to long divide, to get

$\frac{x^2\arctan{x}}{x^2 + 1} = \arctan{x} - \frac{\arctan{x}}{x^2 + 1}$ to give

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

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

Then use the substitution $z = \arctan{x}$ to get

$\frac{(x\arctan{x})^2}{2}- x\arctan{x}$
$- \frac{1}{2}\log{(1 + x^2)} - \int{z \,dz}$

Can you go from here?