With #x = 2*sec(u), therefore dx = 2*sec(u)*tan(u)#
#sqrt(x^2 - 4) = sqrt(4*sec^2(u) - 4) = 2*sqrt(sec^2(u) - 1)#
From #sin^2(a) + cos^2(a) = 1#, divide through by #cos^2(a)# to obtain
#tan^2(a) + 1 = sec^2(a)#
So, we have:
#int 2/(sqrt(x^2-4) dx# # = int (4*sec(u)*tan(u))/(2sqrt(tan^2(u))# # du #
So, integral of # 2*int sec(u) du#
Multiply numerator and denominator by #sec(u) + tan(u)# to obtain
# 2*int (sec^2(u) + sec(u)*tan(u))/(sec(u) + tan(u)) du#
Use substitution #r = sec(u) + tan(u)# which gives
# 2*int (dr)/r#
# = 2*ln(r) + C#
# = 2*ln(sec(u) + tan(u)) + C#
# = 2*ln(sec(arcsec(x/2) + tan(arcsec(x/2)) + C#
# = 2*ln(1/2*(x + sqrt(x^2 - 4))) + C#
And there we have it, let me know if you need any help with the last bit but it's fairly easy to figure out if you look at a few triangles.