Substitute #x = 2 sect# #dx =2sect tant dt#, and consider first #x in (2,+oo)# so that #t in (0,pi/2)#
#int (25+x^2)/sqrt(x^2-4)dx = 2int ((25+4sec^2t)sect tant)/(sqrt(4sec^2t-4) dt#
Use now the trigonometric identity:
#sec^2t -1 = 1/cos^2t-1 = (1-cos^2t)/cos^2t =sin^2t/cos^2t = tan^2t#
and note that for #t in (0,pi/2)# the tangent is positive so: #sqrt(sec^2-1) = tant#
and:
#int (25+x^2)/sqrt(x^2-4)dx = 1/2 int ((25+4sec^2t)sect tant)/sqrt(sec^2t-1) dt = int (25+4sec^2t)sect dt#
using the linearity of the integral:
#int (25+x^2)/sqrt(x^2-4)dx = 25 int sect dt +4 int sec^3t dt#
This are fairly known integrals, but we can go through the solution:
#int sect dt = int sect (sect + tant)/(sect+tant)dt#
#int sect dt = int (sec^2 t + sect tant)/(sect+tant)dt#
#int sect dt = int (d(sec t + tant))/(sect+tant)#
#int sect dt = ln abs (sect+tant) + C#
and:
#int sec^3 t dt = int sect sec^2t dt#
#int sec^3 t dt = int sect d(tan t) #
#int sec^3 t dt = sect tant - int sect tan^2 t dt #
#int sec^3 t dt = sect tant - int sect (sec^2 t -1) dt #
#int sec^3 t dt = sect tant - int sec^3tdt +int sectdt #
#2int sec^3 t dt = sect tant + ln abs (sect+tant) + C#
#int sec^3 t dt = (sect tant)/2 +1/2 ln abs (sect+tant) + C#
Putting it together:
#int (25+x^2)/sqrt(x^2-4)dx = 25 ln abs (sect+tant) +2sect tant + 2ln abs (sect+tant) + C#
#int (25+x^2)/sqrt(x^2-4)dx = 27 ln abs (sect+tant) + 2sect tant + C#
and undoing the substitution, considering that:
#sect = x/2#
#tan t = sqrt(1-sec^2t) = sqrt(1-x^2/4)#
#int (25+x^2)/sqrt(x^2-4)dx = 27 ln abs (x/2+sqrt(1-x^2/4)) +2( x/2sqrt(1-x^2/4)) + C#
#int (25+x^2)/sqrt(x^2-4)dx = 27 ln abs (x+sqrt(4-x^2)) + (x+sqrt(4-x^2)) /2 + C#