# Thread: An interesting indefinite integral

1. ## An interesting indefinite integral

solve $\int \left[ \frac{ \arctan(x) }{ x - \arctan(x) } \right]^2 ~dx$

2. Originally Posted by simplependulum
solve $\int \left[ \frac{ \arctan(x) }{ x - \arctan(x) } \right]^2 ~dx$

Spoiler:

$
\frac{1 + x \tan^{-1}x}{\tan^{-1}x - x}
$

3. let $\tan^{-1} x = t.$ then your integral becomes: $I=\int \frac{t^2 \sec^2t}{(\tan t - t)^2} \ dt=\int \frac{t^2}{(\sin t - t\cos t)^2} \ dt=\int \frac{t}{\sin t} \cdot \frac{t \sin t}{(\sin t - t \cos t)^2} \ dt.$ now put $u=\frac{t}{\sin t}$ and $\frac{t \sin t}{(\sin t - t \cos t)^2} \ dt = dv.$

then $du = \frac{\sin t - t \cos t}{\sin^ 2 t} \ dt,$ and $v=\frac{-1}{\sin t - t\cos t}.$ thus integration by parts gives us: $I=\frac{-t}{(\sin t - t \cos t) \sin t} + \int \frac{dt}{\sin^2 t}=\frac{-t}{(\sin t - t \cos t)\sin t } - \cot t + C. \ \ \ \ \ \ \ \ \ (1)$

to write the answer in terms of $x,$ we have: $\cot t = \frac{1}{x}$ and $\frac{-t}{ (\sin t - t \cos t)\sin t}=\frac{-t(1 + \cot^2 t)}{1 -t \cot t}=\frac{-(1+x^2)\tan^{-1} x}{x(x - \tan^{-1} x)}.$ put these two in (1) and simplify to get the answer that

danny and Maple already gave us.

4. Wonderful !