The integrand is defined for x in (-oo,-a) uu (a,+oo)x∈(−∞,−a)∪(a,+∞). Let us focus first on x in (a,+oo)x∈(a,+∞) and substitute:
x = a sectx=asect
dx = asect tantdx=asecttant
with t in (0,pi/2)t∈(0,π2)
so:
int dx/sqrt(x^2-a^2) = int (asect tant dt)/sqrt(a^2sec^2t-a^2)∫dx√x2−a2=∫asecttantdt√a2sec2t−a2
int dx/sqrt(x^2-a^2) = int (sect tant dt)/sqrt(sec^2t-1)∫dx√x2−a2=∫secttantdt√sec2t−1
Use now the trigonometric identity:
sec^2t-1 = tan^2tsec2t−1=tan2t
and as for t in (0,pi/2)t∈(0,π2) the tangent is positive:
sqrt(sec^2t-1) = tan^√sec2t−1=tan
Then:
int dx/sqrt(x^2-a^2) = int (sect tant dt)/tant∫dx√x2−a2=∫secttantdttant
int dx/sqrt(x^2-a^2) = int sect dt∫dx√x2−a2=∫sectdt
int dx/sqrt(x^2-a^2) = ln abs (sect +tant) +C∫dx√x2−a2=ln|sect+tant|+C
Undoing the substitution:
int dx/sqrt(x^2-a^2) = ln abs (x/a +sqrt(x^2/a^2-1)) +C∫dx√x2−a2=ln∣∣
∣∣xa+√x2a2−1∣∣
∣∣+C
int dx/sqrt(x^2-a^2) = ln abs (x +sqrt(x^2-a^2)) +C∫dx√x2−a2=ln∣∣x+√x2−a2∣∣+C
By differentiating we can see that the solution is valid also for x in (-oo,-3)x∈(−∞,−3)