# How do you evaluate the integral int arctanx/x^2?

Jun 20, 2017

$- \arctan \frac{x}{x} + \ln \left\mid x \right\mid - \frac{1}{2} \ln \left\mid {x}^{2} + 1 \right\mid + C$

#### Explanation:

$I = \int \arctan \frac{x}{x} ^ 2 \mathrm{dx}$

Use integration by parts. Let:

$u = \arctan x \text{ "=>" } \mathrm{du} = \frac{1}{{x}^{2} + 1} \mathrm{dx}$

$\mathrm{dv} = \frac{1}{x} ^ 2 \mathrm{dx} \text{ "=>" } v = - \frac{1}{x}$

Then:

$I = u v - \int v \mathrm{du}$

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

Performing partial fractions:

$\frac{1}{x \left({x}^{2} + 1\right)} = \frac{A}{x} + \frac{B x + C}{{x}^{2} + 1}$

$1 = A \left({x}^{2} + 1\right) + \left(B x + C\right) x$

$1 = {x}^{2} \left(A + B\right) + x \left(C\right) + A$

Comparing coefficients,

$\left\{\begin{matrix}A + B = 0 \\ C = 0 \\ A = 1\end{matrix}\right.$

So $B = - 1$ as well, giving the decomposition:

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

So:

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

$I = - \arctan \frac{x}{x} + \ln \left\mid x \right\mid - \frac{1}{2} \int \frac{2 x}{{x}^{2} + 1} \mathrm{dx}$

$I = - \arctan \frac{x}{x} + \ln \left\mid x \right\mid - \frac{1}{2} \ln \left\mid {x}^{2} + 1 \right\mid + C$