Theorem: Primitive of Reciprocal of Root of x squared minus a squared/Logarithm Form

:$\ds \int \frac {\d x} {\sqrt {x^2 - a^2} } = \ln \size {x + \sqrt {x^2 - a^2} } + C$
for $0 < a < \size x$.

Proof:
We have that $\sqrt {x^2 - a^2}$ is defined only when $x^2 > a^2$, that is, either:
:$x > a$
or:
:$x < -a$
where it is assumed that $a > 0$.
Consider the arcsecant substitution:
:$u = \arcsec {\dfrac x a}$
which is defined for all $x$ such that $\size {\dfrac x a} \ge 1$.
That is:
:$\size x \ge a$
Hence from Shape of Secant Function, this substitution is valid for all for all $x$ such that $\size {\dfrac x a} > 1$.
{{begin-eqn}}
{{eqn | l = u
      | r = \arcsec {\frac x a}
      | c = 
}}
{{eqn | ll= \leadsto
      | l = x
      | r = a \sec u
      | c = 
}}
{{eqn | ll= \leadsto
      | l = \frac {\d x} {\d u}
      | r = a \sec u \tan u
      | c = Derivative of Secant Function
}}
{{end-eqn}}
Let $x > a$.
Then:
{{begin-eqn}}
{{eqn | l = \int \frac 1 {\sqrt {x^2 - a^2} } \rd x
      | r = \int \frac {a \sec u \tan u} {\sqrt {a^2 \sec^2 u - a^2} } \rd u
      | c = Integration by Substitution
}}
{{eqn | r = \frac a a \int \frac {\sec u \tan u} {\sqrt {\sec^2 u - 1} } \rd u
      | c = simplifying
}}
{{eqn | r = \int \sec u \frac {\tan u} {\sqrt {\tan^2 u} } \rd u
      | c = Difference of Squares of Secant and Tangent
}}
{{eqn | r = \int \sec u \rd u
      | c = as $x > 1$ both $\sec u$ and $\tan u$ are greater than $0$
}}
{{eqn | r = \ln \size {\sec u + \tan u} + C
      | c = Primitive of $\sec x$: Secant plus Tangent Form
}}
{{eqn | r = \map \ln {\sec u + \tan u} + C
      | c = as both $\sec u$ and $\tan u$ are greater than $0$
}}
{{eqn | r = \map \ln {\frac x a + \sqrt {\frac {x^2} {a^2} - 1} } + C
      | c = substituting back: $\sec u = \dfrac x a$ and Difference of Squares of Secant and Tangent
}}
{{eqn | r = \map \ln {\frac x a + \sqrt {\frac {x^2 - a^2} {a^2} } } + C
      | c = rearrangement
}}
{{eqn | r = \map \ln {\frac {x + \sqrt {x^2 - a^2} } a} + C
      | c = rearrangement
}}
{{eqn | r = \map \ln {x + \sqrt {x^2 - a^2} - \ln a} + C
      | c = Difference of Logarithms
}}
{{eqn | r = \map \ln {x + \sqrt {x^2 - a^2} } + C
      | c = subsuming $-\ln a$ into constant
}}
{{eqn | r = \ln \size {x + \sqrt {x^2 - a^2} } + C
      | c = as $x + \sqrt {x^2 - a^2} > 0$ for $x > a$
}}
{{end-eqn}}
Now suppose $x < -a$.
Let $z = -x$.
Then:
:$\d x = -\d z$
and we then have:
{{begin-eqn}}
{{eqn | l = \int \frac {\d x} {\sqrt {x^2 - a^2} }
      | r = \int \frac {-\d z} {\sqrt {\paren {-z}^2 - a^2} }
      | c = Integration by Substitution
}}
{{eqn | r = -\int \frac {\d z} {\sqrt {z^2 - a^2} }
      | c = simplifying
}}
{{eqn | r = -\map \ln {z + \sqrt {z^2 - a^2} } + C
      | c = from above
}}
{{eqn | r = \map \ln {z - \sqrt {z^2 - a^2} } - \map \ln {a^2} + C
      | c = Negative of $\map \ln {z + \sqrt {z^2 - a^2} }$
}}
{{eqn | r = \map \ln {z - \sqrt {z^2 - a^2} } + C
      | c = subsuming $-\map \ln {a^2}$ into constant
}}
{{eqn | r = \map \ln {-x - \sqrt {\paren {-x}^2 - a^2} } + C
      | c = substituting back for $x$
}}
{{eqn | r = \map \ln {-\paren {x + \sqrt {x^2 - a^2} } } + C
      | c = simplifying
}}
{{eqn | r = \ln \size {x + \sqrt {x^2 - a^2} } + C
      | c = as $x + \sqrt {x^2 - a^2} < 0$ for $x < -a$
}}
{{end-eqn}}
The result follows.
{{qed}}