#intsqrt(1+1/x^2)dx=intsqrt((x^2+1)/x^2)dx=intsqrt(x^2+1)/xdx#
Letting #u=sqrt(x^2+1)# reveals that #du=x/sqrt(x^2+1)dx#. Then the integral can be manipulated to become:
#intsqrt(x^2+1)/xdx=int(x(x^2+1))/(x^2sqrt(x^2+1))dx=int(x^2+1)/x^2(x/sqrt(x^2+1)dx)#
Note that #u^2=x^2+1# and #u^2-1=x^2#:
#int(x^2+1)/x^2(x/sqrt(x^2+1)dx)=intu^2/(u^2-1)du#
Rewriting the integrand as #(u^2-1+1)/(u^2-1)=1+1/(u^2-1)#:
#intu^2/(u^2-1)du=intdu+int1/(u^2-1)du=u+int1/(u^2-1)du#
You can perform partial fraction decomposition on #1/(u^2-1)# to see that #1/(u^2-1)=1/(2(u-1))-1/(2(u+1))#:
#u+int1/(u^2-1)du=u+1/2int1/(u-1)du-1/2int1/(u+1)du#
Both of which you could perform a substitution on, or just recognize them for natural log integrals:
#u+1/2int1/(u-1)du-1/2int1/(u+1)du=u+1/2lnabs(u-1)-1/2lnabs(u+1)#
Combining:
#=u+1/2lnabs(u-1)-1/2lnabs(u+1)=u+1/2lnabs((u-1)/(u+1))#
Since #u=sqrt(x^2+1)#:
#u+1/2lnabs((u-1)/(u+1))=sqrt(x^2+1)+1/2lnabs((sqrt(x^2+1)-1)/(sqrt(x^2+1)+1))#
Or:
#intsqrt(1+1/x^2)dx=sqrt(x^2+1)+1/2lnabs((sqrt(x^2+1)-1)/(sqrt(x^2+1)+1))+C#