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 $\displaystyle x = \tan(z) $
$\displaystyle z = \arctan(x) $
$\displaystyle \frac{dz}{dx} = \frac{1}{x^2+1}$
$\displaystyle dx = x^2+1dz = \tan^2(z)+1dz $
$\displaystyle \int{z^2 \tan(z)(\tan^2(z)+1)\,dz}$
$\displaystyle \int{z^2 \tan^3(z)+z^2\tan^2(z)\,dz}$
$\displaystyle \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!
You're right, you can use integration by parts.
Let $\displaystyle u = (\arctan{x})^2 \implies du = \frac{2\arctan{x}}{x^2 + 1}$
and $\displaystyle dv = x \implies v = \frac{x^2}{2}$.
Remembering that $\displaystyle \int{u\,dv} = uv - \int{v\,du}$ we get
$\displaystyle \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
$\displaystyle \frac{x^2\arctan{x}}{x^2 + 1} = \arctan{x} - \frac{\arctan{x}}{x^2 + 1}$ to give
$\displaystyle \frac{(x\arctan{x})^2}{2} - \int{\frac{x^2\arctan{x}}{x^2 + 1}\,dx}$
$\displaystyle = \frac{(x\arctan{x})^2}{2}- \int{\arctan{x}\,dx} - \int{(\arctan{x})\frac{1}{x^2 + 1}\,dx}$.
Then use the substitution $\displaystyle z = \arctan{x}$ to get
$\displaystyle \frac{(x\arctan{x})^2}{2}- x\arctan{x}$
$\displaystyle - \frac{1}{2}\log{(1 + x^2)} - \int{z \,dz}$
Can you go from here?