Primitive of Logarithm of x squared plus a squared

Theorem

 * $\displaystyle \int \ln \left({x^2 + a^2}\right) \ \mathrm d x = x \ln \left({x^2 + a^2}\right) - 2 x + 2 a \arctan \frac x a + 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:

and let:

Then:

Also see

 * Primitive of $\ln \left({x^2 - a^2}\right)$