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

:$\ds \int \sqrt {x^2 - a^2} \rd x = \frac {x \sqrt {x^2 - a^2} } 2 - \frac {a^2} 2 \ln \size {x + \sqrt {x^2 - a^2} } + C$

Proof:
We have that $\sqrt {x^2 - a^2}$ is defined only when $x^2 \ge a^2$, that is, either:
:$x \ge a$
or:
:$x \le -a$
where it is assumed that $a > 0$.
First let $x \ge a$.
{{begin-eqn}}
{{eqn | l = x
      | r = a \cosh u
}}
{{eqn | n = 1
      | ll= \leadsto
      | l = \frac {\d x} {\d u}
      | r = a \sinh u
      | c = Derivative of Hyperbolic Cosine
}}
{{end-eqn}}
Also:
{{begin-eqn}}
{{eqn | l = x
      | r = a \cosh u
}}
{{eqn | ll= \leadsto
      | l = x^2 - a^2
      | r = a^2 \cosh^2 u - a^2
      | c = 
}}
{{eqn | r = a^2 \paren {\cosh^2 u + 1}
      | c = 
}}
{{eqn | r = a^2 \sinh^2 u
      | c = Difference of Squares of Hyperbolic Cosine and Sine
}}
{{eqn | n = 2
      | ll= \leadsto
      | l = \sqrt {x^2 - a^2}
      | r = a \sinh u
      | c = 
}}
{{end-eqn}}
and:
{{begin-eqn}}
{{eqn | l = x
      | r = a \cosh u
}}
{{eqn | n = 3
      | ll= \leadsto
      | l = u
      | r = \arcosh \frac x a
      | c = {{Defof|Real Area Hyperbolic Cosine}}
}}
{{end-eqn}}
Thus:
{{begin-eqn}}
{{eqn | l = \int \sqrt {x^2 - a^2} \rd x
      | r = \int \sqrt {x^2 - a^2} \, a \sinh u \rd u
      | c = Integration by Substitution from $(1)$
}}
{{eqn | r = \int a^2 \sinh^2 u \rd u
      | c = substituting for $\sqrt {x^2 - a^2}$ from $(2)$
}}
{{eqn | r = a^2 \int \sinh^2 u \rd u
      | c = Primitive of Constant Multiple of Function
}}
{{eqn | r = a^2 \frac {\sinh u \cosh u - u} 2 + C
      | c = Primitive of $\sinh^2 u$: Corollary
}}
{{eqn | r = \frac 1 2 a \sinh u a \cosh u - \frac {a^2 u} 2 + C
      | c = rearranging
}}
{{eqn | r = \frac 1 2 x a \sinh u - \frac {a^2 u} 2 + C
      | c = substituting $x = a \cosh u$
}}
{{eqn | r = \frac 1 2 x \sqrt {x^2 - a^2} - \frac {a^2 u} 2 + C
      | c = substituting $\sqrt {x^2 - a^2} = a \sinh u$ from $(2)$
}}
{{eqn | r = \frac {x \sqrt {x^2 - a^2} } 2 - \frac {a^2} 2 \cosh^{-1} \frac x a + C
      | c = substituting for $\theta$ from $(3)$
}}
{{eqn | r = \frac {x \sqrt {x^2 - a^2} } 2 - \frac {a^2} 2 \paren {\map \ln {x + \sqrt {x^2 - a^2} } - \ln a} + C
      | c = $\arcosh \dfrac x a$ in Logarithm Form
}}
{{eqn | r = \frac {x \sqrt {x^2 - a^2} } 2 - \frac {a^2} 2 \map \ln {x + \sqrt {x^2 - a^2} } + \frac {a^2} 2 \ln a + C
      | c = simplifying
}}
{{eqn | r = \frac {x \sqrt {x^2 - a^2} } 2 - \frac {a^2} 2 \map \ln {x + \sqrt {x^2 - a^2} } + C
      | c = subsuming $\dfrac {a^2} 2 \ln a$ into arbitrary constant
}}
{{eqn | r = \frac {x \sqrt {x^2 - a^2} } 2 - \frac {a^2} 2 \ln \size {x + \sqrt {x^2 - a^2} } + C
      | c = {{Defof |Absolute Value}}
}}
{{end-eqn}}
Now suppose $x \le -a$.
Let $z = -x$.
Then:
:$\d x = -\d z$
and we then have:
{{begin-eqn}}
{{eqn | l = \int \sqrt {x^2 - a^2} \rd x
      | r = -\int \sqrt {\paren {-z}^2 - a^2} \rd z
      | c = Integration by Substitution
}}
{{eqn | r = -\int \sqrt {\paren z^2 - a^2} \rd z
      | c = simplifying
}}
{{eqn | r = -\frac {z \sqrt {z^2 - a^2} } 2 + \frac {a^2} 2 \map \ln {z + \sqrt {z^2 - a^2} } + C
      | c = from above
}}
{{eqn | r = -\frac {z \sqrt {z^2 - a^2} } 2 - \frac {a^2} 2 \paren {\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 = -\frac {z \sqrt {z^2 - a^2} } 2 - \frac {a^2} 2 \map \ln {z - \sqrt {z^2 - a^2} } + C
      | c = subsuming $-\dfrac {a^2 \map \ln {a^2} } 2$ into constant
}}
{{eqn | r = -\frac {\paren {-x} \sqrt {\paren {-x}^2 - a^2} } 2 - \frac {a^2} 2 \map \ln {\paren {-x} - \sqrt {\paren {-x}^2 - a^2} } + C
      | c = substituting back for $x$
}}
{{eqn | r = \frac {x \sqrt {x^2 - a^2} } 2 - \frac {a^2} 2 \map \ln {-x - \sqrt {x^2 - a^2} } + C
      | c = simplifying
}}
{{eqn | r = \frac {x \sqrt {x^2 - a^2} } 2 - \frac {a^2} 2 \ln \size {x + \sqrt {x^2 - a^2} } + C
      | c = as $-x - \sqrt {x^2 - a^2} > 0$: {{Defof |Absolute Value}}
}}
{{end-eqn}}
The result follows.
{{qed}}