The function is defined for #abs x >=5#. Restrict for the moment to #x > 5# and substitute:
#x = 5 sect#
#dx = 5sect tant dt#
with #t in [0,pi/2)#.
Then:
#int sqrt(x^2-25)/x dx = 5 int (sqrt(25sec^2t -25) sect tant )/(5sect)dt#
#int sqrt(x^2-25)/x dx = 5 int sqrt(sec^2t -1) tant dt#
Use now the trigonometric identity:
#sec^2-1 = tan^2t#
and as for # in [0,pi/2)# the tangent is positive:
#sqrt(sec^2-1) = tant#
so:
#int sqrt(x^2-25)/x dx = 5 int tan^2t dt#
using the same identity again:
#int sqrt(x^2-25)/x dx = 5 int (sec^2t-1) dt#
and for the linearity of the integral:
#int sqrt(x^2-25)/x dx = 5 int sec^2tdt -5int dt#
#int sqrt(x^2-25)/x dx = 5tant-5t +C#
To undo the substitution note that:
#tant = sqrt(sec^2t-1) = sqrt((x/5)^2-1) = 1/5 sqrt(x^2-25)#
and then:
#t = arctan(sqrt(x^2-25)/5)#
So:
#int sqrt(x^2-25)/x dx =sqrt(x^2-25) - arctan(sqrt(x^2-25)/5)+C#
By differentiating both sides we can verify that the solution extends also to #x < -5#.