# How do you integrate (x*arctan(x))/(1+x^2)^2?

Oct 2, 2016

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

#### Explanation:

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

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

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

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

which by IBP

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

$= - \frac{1}{2} \left(\arctan \left(x\right) \frac{1}{1 + {x}^{2}} - \textcolor{b l u e}{\int \frac{1}{1 + {x}^{2}} ^ 2 \mathrm{dx}}\right) q \quad \square$

for the blue bit we say that $x = \tan \xi , \mathrm{dx} = {\sec}^{2} \xi \setminus d \xi$

So we have

$\int \frac{1}{1 + {\tan}^{2} \xi} ^ 2 {\sec}^{2} \xi \setminus d \xi = \int {\cos}^{2} \xi \setminus d \xi$

for this we use the double angle formula: $\cos 2 \gamma = 2 {\cos}^{2} \gamma - 1$ giving us:

$\frac{1}{2} \int \cos 2 \xi + 1 \setminus d \xi$

$= \frac{1}{2} \left(\frac{1}{2} \sin 2 \xi + \xi\right) + C$

$= \frac{1}{2} \left(\sin \xi \cos \xi + \xi\right) + C q \quad \triangle$

and if $\tan \xi = x$, then $\sin \xi = \frac{x}{\sqrt{{x}^{2} + 1}}$ and $\cos \xi = \frac{1}{\sqrt{{x}^{2} + 1}}$, just draw the right-angled triangle to see.

so $\triangle$ becomes

$= \frac{1}{2} \left(\frac{x}{{x}^{2} + 1} + \arctan x\right) + C q \quad \triangle$

So when we pop it back into $\square$ we get

= -1/2 ( arctan(x) (1)/(1+x^2) - (1/2 ( x/(x^2 +1) + arctan x ) + C )

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

Tidying up

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

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

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