How do you integrate # (sqrt (x +1) / x) dx#?

1 Answer

The function #f(x)=sqrt(x+1)/x# is not easy to integrate, as it's not continuous (so one has to be very careful with some troubles that might occur).

First of all, let's study it quickly: the domain is #D=[-1,0) cup (0,+infty)#. Just to know what to expect, we can observe that the asymptotic behavior at #x=0# is #f(x) approx 1/x#. This means that the primitive function will be discontinuous at #x=0# too. The graph of #f# is the following
graph{sqrt(x+1)/x [-1.1, 3, -4, 4]}

To get rid of the square root, let's try with the following substitution:
#u(x)=sqrt(1+x)#
We can invert this function if we restrict to #u ge 0#:
#u^2=1+x rArr x(u)=u^2-1#
And we can express the differential #dx# in terms of #du#:
#dx=x'(u) du=2u du#

Now we can integrate:
#int sqrt{1+x}/x dx = int u/(u^2-1) 2u du=2 int (u^2)/(u^2-1) du#
Notice that the discontinuity is now at #u=1#.

Since the integrand is a rational function whose numerator and denominator have equal degree, we try to split it in the following way:
#(u^2)/(u^2-1)=(u^2-1+1)/(u^2-1)=(u^2-1)/(u^2-1)+(1)/(u^2-1)=1+1/(u^2-1)#
and by linearity of the integral we get
#2 int (u^2)/(u^2-1) du=2 [int du + int 1/(u^2-1) du]=2u+int 2/(u^2-1) du#

Now we can observe that #u^2-1# factorizes as follows:
#u^2-1=(u-1)(u+1)#
so we can write #2/(u^2-1)# as the following sum
#2/((u-1)(u+1))=1/(u-1)-1/(u+1)#
So we get (by linearity of the integral)
#2int 1/(u^2-1) du=int 1/(u-1) du-int 1/(u+1) du=ln |u-1|-ln |u+1|=ln |u-1|/|u+1|=ln |(u-1)/(u+1)|+C#

In the end
#int sqrt{1+x}/x dx =2u+ln |(u-1)/(u+1)|+C=2sqrt{1+x}+ln |(sqrt{1+x}-1)/(sqrt{1+x}+1)|+C#

Notice that this function keeps to be discontinuous at #x=0#.