# How do you integrate int arctan(1/x) using integration by parts?

##### 1 Answer
Oct 17, 2016

See the explanation section below.

#### Explanation:

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

Let $\theta = \arctan \left(\frac{1}{x}\right)$.

This makes $\tan \theta = \frac{1}{x}$, so $\cot \theta = x$.

Furthermore, $\mathrm{dx} = - {\csc}^{2} \theta \text{ } d \theta$

The integral becomes:

$\int \theta \left(- {\csc}^{2} \theta\right) d \theta$

Let $u = \theta$ and $\mathrm{dv} = \left(- {\csc}^{2} \theta\right) d \theta$

So $\mathrm{du} = d \theta$ and $v = \cot \theta$

$u v - \int v \mathrm{du} = \theta \cot \theta - \int \cot \theta d \theta$

The integral can be found by substitution. We get
$\theta \cot \theta - \ln \left\mid \sin \right\mid \theta + C$

Using $\cot \theta = x$ and some trigonometry, we sind $\sin \theta = \frac{1}{\sqrt{{x}^{2} + 1}}$

Therefore

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

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