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?

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. 
