# Integral of $1/\sqrt{x^2 - a^2}$ where $a > 0$, why does $a$ has to be greater than $0$?

I know how to solve the integral (set $x = a\sec(\theta)$ then $dx = a\sec(\theta)\tan(\theta)\,d\theta$ where $0 < \theta < \pi/2$ in order to have a one-to-one function), anyway, the problem specifies that $a > 0$ but I don't see how this changes anything or affects the substitution because $x = a\sec(\theta)$ still remains a one-to-one function, correct? I may be wrong but by seeing the graph of asec(theta) it appears that the sign of a does not change the fact that sec(theta) is one to one. Does it affect something else?

Then we could also use the substitution of $x = a\cosh(t)$ then $dx = a\sinh(t)\,dt$ but the problem then specifies that $x > 0$. Why these restrictions?

-
Indeed, $a=-3$ is no different from $a=3$, because $a$ is squared in the function. It's just the same function to be integrated. The case $a=0$ should be treated separately, however. –  user53153 Dec 31 '12 at 8:30
@PavelM What would happen when a = 0? –  Lance Ferd Jan 1 '13 at 0:06
The substitution $x=s\sec\theta$ would become $x=0$, which is not a legal move. Also, you can see in the accepted answer how many times $a$ is in the denominator or under logarithm. Can't do any of that when $a=0$. // Of course, $1/\sqrt{x^2-a^2} = 1/|x|$ can be integrated without trig sub. –  user53153 Jan 1 '13 at 0:09
If the problem specifies that $0<\theta<\pi/2$ and $x = a \sec\theta$, then $x$ and $a$ have to be both positive or both negative (because $\sec\theta>0$). As shown in lab bhattacharjee's answer, it is not necessary that $x$ and $a$ have to be positive. The author may have specified them positive so that the reader could avoid dealing with $|a|$, to make the problem easier. Hard to say more without the exact statement of the problem. The same could be said about the second question, since $\cosh t > 0$. –  Michael E2 Jan 1 '13 at 5:50

If $x=a\sec \theta, dx=a\sec \theta\tan\theta \,d\theta$

$\sqrt{x^2-a^2}=\sqrt{a^2(\sec^2\theta-1)}=|a\tan \theta|=|a||\tan \theta|$

As $0< \theta< \frac\pi 2, |\tan \theta|=\tan \theta$

So, $\sqrt{x^2-a^2}=|a|\tan \theta$ if $0< \theta< \frac\pi 2$

$$\int \frac{dx}{\sqrt{x^2-a^2}}=\frac{a\sec\theta\tan\theta d\theta}{|a|\tan \theta}$$ =sign$(a)\int\sec\theta d\theta=$sign$(a)\ln|\sec\theta+\tan\theta|+C$

$=\ln|\frac xa+\frac{\sqrt{x^2-a^2}}{|a|}|+C$

If $\operatorname{sign}(a)>0, \int \frac{dx}{\sqrt{x^2-a^2}}=\ln|\frac xa+\frac{\sqrt{x^2-a^2}}a|+C=\ln|x+\sqrt{x^2-a^2}|+C-\ln a$

If $\operatorname{sign}(a)<0, \int \frac{dx}{\sqrt{x^2-a^2}}=-\ln|\frac xa-\frac{\sqrt{x^2-a^2}}a|+C=-\ln|x-\sqrt{x^2-a^2}|+C+\ln a$

But, $\ln|x+\sqrt{x^2-a^2}|+\ln|x-\sqrt{x^2-a^2}|=\ln|x^2-(x^2-a^2)|=\ln |a^2|$ which is constant.

So, $\operatorname{sign}(a)<0, \int \frac{dx}{\sqrt{x^2-a^2}}=\ln|x+\sqrt{x^2-a^2}|-\ln |a^2|+C=\ln|x+\sqrt{x^2-a^2}|+C'$ where $C'=C-\ln |a^2|$ is also a constant.

So, the value of the integration in the above two cases differ only by constant,hence the sign of $a$ does not matter.

-
Please take a look at mine. I hope it is applicabe. +1 –  Babak S. Dec 31 '12 at 9:00
First question: When establishing that dx = asec(theta)tan(theta), we are assuming that sign(a) > 0, correct? Second question: I don't follow the last step starting with "But,...", what is it supposed to show? Thanks for your help so far. –  Lance Ferd Dec 31 '12 at 20:12
@LanceFerd, no. $a$ is after all a constant, right? –  lab bhattacharjee Dec 31 '12 at 20:15
Yes, it is a constant. –  Lance Ferd Dec 31 '12 at 23:51
@labbhattacharjee However, when determining sec(theta) the end results would be different if sign(a) < 0, wouldn't they? –  Lance Ferd Jan 1 '13 at 0:04