Is this derivation of $\int{\frac{1}{x^2-a^2}}dx$ correct

calculusintegrationsolution-verificationtrigonometric-integralstrigonometry

Let $a>0.$ Using substitution, determine $$\int{\frac{1}{x^2-a^2}}\,\mathbb{d}x.$$

My book's attempt:

$$\int{\frac{1}{x^2-a^2}}\mathbb{d}x\\
[\text{let}\ x=a\sec\theta,\ \therefore dx=a\sec\theta\tan\theta d\theta]\\
=\int{\frac{1}{a^2\sec^2\theta-a^2}}a\sec^2\theta d\theta\\
=\int{\frac{1}{a^2(\sec^2\theta-1)}}a\sec\theta\tan\theta d\theta\\
=\int{\frac{1}{a^2\tan^2\theta}}a\sec\theta\tan\theta d\theta\\
=\frac{1}{a}\int{\frac{\sec\theta}{\tan\theta}}d\theta\\
=\frac{1}{a}\int{\frac{\frac{1}{\cos\theta}}{\frac{\sin\theta}{\cos\theta}}}d\theta\\
=\frac{1}{a}\int{\csc\theta d\theta}\\
=\frac{1}{a}\int{\frac{\csc\theta(\csc\theta+\cot\theta)}{(\csc\theta+\cot\theta)} d\theta}\\
=-\frac{1}{a}\int{-\frac{\csc^2\theta+\csc\theta\cot\theta}{(\csc\theta+\cot\theta)} d\theta}\\
=-\frac{1}{a}\ln|\csc\theta+\cot\theta|+C$$

enter image description here

$$=-\frac{1}{a}\ln\left|\frac{x}{\sqrt{x^2-a^2}}+\frac{a}{\sqrt{x^2-a^2}}\right|+C\\
=-\frac{1}{a}\ln\left|\frac{x+a}{\sqrt{x-a}\sqrt{x+a}}\right|+C\\
=-\frac{1}{a}\ln\left|\frac{\sqrt{x+a}}{\sqrt{x-a}}\right|+C\\
=-\frac{1}{a}{\ln\left|\frac{x+a}{x-a}\right|}^{\frac{1}{2}}+C\\
=-\frac{1}{2}.\frac{1}{a}\ln\left|\frac{x+a}{x-a}\right|+C\\
=\frac{1}{2a}{\ln(\left|\frac{x+a}{x-a}\right|)}^{-1}+C\\
=\frac{1}{2a}\ln\left|\frac{x-a}{x+a}\right|+C.$$

Someone told me that this work contains many errors. The second line clearly has a typo ($\sec^2\theta$ should be replaced with $\sec\theta\tan\theta$ there); what are the other errors?


Related: 1, 2

Best Answer

  1. The given integral $\displaystyle\int{\frac{1}{x^2-a^2}}\,\mathbb{d}x$ properly exists on each of three possible intervals: $$(-\infty,-a),(-a,a)\;\text{and}\;(a, \infty).$$

  2. The substitution $$x=a\sec\theta$$ is inapplicable for $x\in(-a,a),$ so the author's proof is invalid for this interval.

  3. Since the author writes $$\sqrt{x^2-a^2} = \sqrt{x-a}\sqrt{x+a},$$ their proof is technically invalid for $x\in(-\infty,-a)$ too.

    Here's a correction so that their proof is at least valid for $(-\infty,-a)\cup(a, \infty):$ $$-\frac1a\ln\left|\frac{x}{\sqrt{x^2-a^2}}+\frac{a}{\sqrt{x^2-a^2}}\right|+C\\ =-\frac1a\ln\frac{|x+a|}{\sqrt{|x+a||x-a|}}+C\\ =-\frac1a\ln\frac{\sqrt{x+a}}{\sqrt{x-a}}+C\\ =\frac1{2a}\ln\left|\frac{x-a}{x+a}\right|+C.$$

  4. Notice that the author writes $$\operatorname{cosec}\theta=\frac x{\sqrt{x^2-a^2}}\\ \cot\theta=\frac a{\sqrt{x^2-a^2}}.$$ This is true for $x\in(-\infty,-a)\cup(a, \infty)$ if the implicit substitution $x=a\sec\theta$ has domain $$\theta\in\left(0,\frac\pi2\right)\cup\left(\pi,\frac{3\pi}2\right),$$ which is better explicitly specified than left tacit.

    If the substitution has the more conventional domain $$\theta\in\left(0,\frac\pi2\right)\cup\left(\frac\pi2,\pi\right),$$ then $$\operatorname{cosec}\theta=\frac {|x|}{\sqrt{x^2-a^2}}\\ \cot\theta=-\frac {ax}{|x|\sqrt{x^2-a^2}},$$ and the subsequent algebra is to be modified accordingly.