# Primitive of Reciprocal of x squared plus a squared

## Theorem

$\displaystyle \int \frac {\d x} {x^2 + a^2} = \frac 1 a \arctan \frac x a + C$

where $a$ is a non-zero constant.

## Proof 1

Let:

$a \tan \theta = x$

for $\theta \in \left({-\dfrac \pi 2 \,.\,.\, \dfrac \pi 2}\right)$.

From Shape of Tangent Function, this substitution is valid for all real $x$.

Then:

 $\displaystyle x$ $=$ $\displaystyle a \tan \theta$ from above $\displaystyle \implies \ \$ $\displaystyle \frac {\mathrm d x} {\mathrm d \theta}$ $=$ $\displaystyle a \sec^2 \theta$ Derivative of Tangent Function $\displaystyle \implies \ \$ $\displaystyle \int \frac 1 {x^2 + a^2} \ \mathrm d x$ $=$ $\displaystyle \int \frac {a \ \sec^2 \theta} {a^2 \tan^2 \theta + a^2} \ \mathrm d \theta$ Integration by Substitution $\displaystyle$ $=$ $\displaystyle \frac a {a^2} \int \frac {\sec^2 \theta} {\tan^2 \theta + 1} \mathrm d \theta$ Primitive of Constant Multiple of Function $\displaystyle$ $=$ $\displaystyle \frac 1 a \int \frac {\sec^2 \theta} {\sec^2 \theta} \mathrm d \theta$ Difference of Squares of Secant and Tangent $\displaystyle$ $=$ $\displaystyle \frac 1 a \int \mathrm d \theta$ $\displaystyle$ $=$ $\displaystyle \frac 1 a \theta + C$ Integral of Constant

As $\theta$ was stipulated to be in the open interval $\left({-\dfrac \pi 2 \,.\,.\, \dfrac \pi 2}\right)$:

$\tan \theta = \dfrac x a \iff \theta = \arctan \dfrac x a$

Thus:

$\displaystyle \int \frac 1 {x^2 + a^2} \ \mathrm dx = \frac 1 a \arctan \frac x a + C$

$\Box$

When $a = 0$, both $\dfrac x a$ and $\dfrac 1 a$ are undefined.

However, consider the limit of the above primitive as $a \to 0$:

 $\displaystyle \lim_{a \mathop \to 0} \frac 1 a \arctan{\frac x a}$ $=$ $\displaystyle \lim_{a \mathop \to 0} \frac {\arctan{\frac x a} } a$ $\displaystyle \leadsto \ \$ $\displaystyle$ $=$ $\displaystyle \lim_{a \mathop \to 0} \frac {-x a^{-2} } {1 + \frac {x^2}{a^2} }$ L'Hôpital's Rule, Derivative of Arctangent Function $\displaystyle$ $=$ $\displaystyle \lim_{a \mathop \to 0} \frac {a^{-2} }{a^{-2} } \frac {-x} {x^2 + a^2}$ $\displaystyle$ $=$ $\displaystyle - \frac 1 x$

This corresponds with the result:

$\displaystyle \int \frac 1 {x^2} \ \mathrm d x = \frac {-1} x + C$

which follows from Primitive of Power.

$\blacksquare$

## Proof 2

We have that $x^2 + a^2$ is in the form $a x^2 + b x + c$, where $b^2 - 4 a c < 0$.

Thus from Primitive of $\dfrac 1 {a x^2 + b x + c}$ for $b^2 - 4 a c > 0$:

$\displaystyle \int \frac {\mathrm d x} {a x^2 + b x + c} = \frac 2 {\sqrt {4 a c - b^2} } \arctan \left({\frac {2 a x + b} {\sqrt {4 a c - b^2} } }\right) + C$

setting $a := 1, b := 0, c := a^2$:

 $\displaystyle \int \frac 1 {x^2 + a^2} \ \mathrm d x$ $=$ $\displaystyle \dfrac 2 {\sqrt {4 a^2 - 0} } \arctan \left({\dfrac {2 x + 0} {\sqrt {4 a^2} } }\right) + C$ Primitive of $\dfrac 1 {a x^2 + b x + c}$ setting $\displaystyle$ $=$ $\displaystyle \frac 1 a \arctan{\frac x a} + C$ simplifying

$\blacksquare$

## Proof 3

 $\displaystyle \int \frac {\d x} {x^2 + a^2}$ $=$ $\displaystyle \frac 1 a \int \frac {\d t} {t^2 + 1}$ Substitution of $x \to a t$ $\displaystyle$ $=$ $\displaystyle \frac 1 a \int \frac {\d t} {\paren {1 + i t} \paren {1 - i t} }$ Factoring $\displaystyle$ $=$ $\displaystyle \frac 1 {2 a} \paren {\int \frac {\d t} {1 + i t} + \int \frac {\d t} {1 - i t} }$ Definition of Partial Fractions Expansion $\displaystyle$ $=$ $\displaystyle \frac 1 {2 a} \paren {i \map \ln {1 - i t} - i \map \ln {1 + i t} } + C$ Primitive of Reciprocal $\displaystyle$ $=$ $\displaystyle \frac i {2 a} \map \ln {\frac {1 - i t} {1 + i t} } + C$ Sum of Logarithms $\displaystyle$ $=$ $\displaystyle \frac 1 a \arctan \frac x a + C$ Arctangent Logarithmic Formulation and substituting back $t \to \dfrac x a$

$\blacksquare$