Complete the square:
int sqrt(x^2+2x)dx = int sqrt(x^2+2x+1-1)dx = int sqrt((x+1)^2-1)dx
Substitute x+1 = sect, dx = sect tant dt, with t in (0,pi/2):
int sqrt(x^2+2x)dx = sqrt(sec^2t-1) sect tant dt
Using the trigonometric identity sec^2t-1 = tan^2t and as tan t > 0 for t in (0,pi/2):
int sqrt(x^2+2x)dx = int sqrt(tan^2t) sect tant dt:
int sqrt(x^2+2x)dx = int sect tan^2t dt
int sqrt(x^2+2x)dx = int sect (sec^2-1)dt
int sqrt(x^2+2x)dx = int sec^3t dt - int sect dt
Now the first integral is:
int sect dt = int sect (sect+tant)/(sect+tant)dt
int sect dt = int (sec^2t+sect tant)/(sect+tant)dt
int sect dt = int (d(sect +tant))/(sect+tant)dt
int sect dt =ln abs (sect+tant) +c
and for the second we can integrate by parts
int sec^3t dt = int sect sec^2t dt = int sect d/dt(tant) dt
int sec^3t dt = sect tant - int tant d/dt (sect)dt
int sec^3t dt = sect tant - int sect tan^2t dt
int sec^3t dt = sect tant - int sect (sec^2-1)dt
int sec^3t dt = sect tant - int sec^3t dt + int sect dt
The integral appears on both sides of the equation and we can solve for it:
int sec^3t dt =(sect tant)/2 +1/2 int sect dt
Putting it together:
int sqrt(x^2+2x)dx = (sect tant)/2 - 1/2ln abs (sect+tant) +C
To undo the substitution:
sect = x+1
tant = sqrt(sec^2-1) = sqrt((x+1)^2 -1) = sqrt(x^2+2x)
Finally:
int sqrt(x^2+2x)dx = ((x+1)sqrt(x^2+2x))/2 -1/2ln abs((x+1) +sqrt(x^2+2x))+C