Primitive of Arctangent of x over a over x squared

Theorem

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

Proof

With a view to expressing the primitive in the form:

$\displaystyle \int u \frac {\mathrm d v}{\mathrm d x} \ \mathrm d x = u v - \int v \frac {\mathrm d u}{\mathrm d x} \ \mathrm d x$

let:

 $\displaystyle u$ $=$ $\displaystyle \arctan \frac x a$ $\displaystyle \implies \ \$ $\displaystyle \frac {\mathrm d u} {\mathrm d x}$ $=$ $\displaystyle \frac a {x^2 + a^2}$ Derivative of $\arctan \dfrac x a$

and let:

 $\displaystyle \frac {\mathrm d v} {\mathrm d x}$ $=$ $\displaystyle \frac 1 {x^2}$ $\displaystyle \implies \ \$ $\displaystyle v$ $=$ $\displaystyle \frac {-1} x$ Primitive of Power

Then:

 $\displaystyle \int \frac {\arctan \frac x a \ \mathrm d x} {x^2}$ $=$ $\displaystyle \arctan \frac x a \left({\frac {-1} x}\right) - \int \left({\frac {-1} x}\right) \left({\frac a {x^2 + a^2} }\right) \ \mathrm d x + C$ Integration by Parts $\displaystyle$ $=$ $\displaystyle \frac {-\arctan \frac x a} x + a \int \frac {\mathrm d x} {x \left({x^2 + a^2}\right)} \ \mathrm d x + C$ simplifying $\displaystyle$ $=$ $\displaystyle \frac {-\arctan \frac x a} x + \frac 1 a \left({\frac 1 {2 a^2} \ln \left({\frac {x^2} {x^2 + a^2} }\right)}\right) + C$ Primitive of $\dfrac 1 {x \left({x^2 + a^2}\right)}$ $\displaystyle$ $=$ $\displaystyle \frac {-\arctan \frac x a} x - \frac 1 {2 a} \ln \left({\frac {x^2 + a^2} {x^2} }\right) + C$ Logarithm of Reciprocal

$\blacksquare$