Substitute:
#t = sqrt(1+x^2)#
#dt = (xdx)/sqrt(1+x^2)#
We have:
#int (dx)/(xsqrt(1+x^2)) = int 1/x^2 (xdx)/sqrt(1+x^2)#
And as:
#t = sqrt(1+x^2) => t^2-1 = x^2#
#int (dx)/(xsqrt(1+x^2)) = int (dt)/(t^2-1)#
This can be solved by partial fractions:
#1/(t^2-1) = 1/((t-1)(t+1)) = A/(t-1) + B/(t+1)#
#A(t+1)+B(t-1) = 1#
#(A+B) t + (A-B) = 1#
#A+B = 0 => A=-B#
#A-B = 1 => 2A = 1 => A=1/2 => B =-1/2#
So:
#1/(t^2-1) = 1/2(1/(t-1)-1/(t+1))#
and:
#int (dx)/(xsqrt(1+x^2)) = 1/2 int (dt)/(t-1) - 1/2 int (dt)/(t+1)= 1/2 ln abs (t-1) - 1/2 ln abs (t+1)+C#
Substituting back #x#:
#int (dx)/(xsqrt(1+x^2)) = 1/2ln (sqrt(1+x^2) -1) -1/2 ln (sqrt(1+x^2)+1)+C#
where we have dropped the absolute value, because the arguments of the logarithms are always positive. Applying the properties of logarithms this can also be written as:
#int (dx)/(xsqrt(1+x^2)) = ln (sqrt ((sqrt(1+x^2) -1) /(sqrt(1+x^2)+1)))+C#