Complete the square under the root:
#1/sqrt(e^(2x)-2e^x) = 1/sqrt(e^(2x)-2e^x+1-1)=1/sqrt((e^x-1)^2-1)#
Now substitute:
#e^x-1 = t#
#x = ln(1+t)#
#dx = (dt)/(1+t)#
We have:
#int (dx)/sqrt(e^(2x)-2e^x) = int (dx)/sqrt((e^x-1)^2-1) = int (dt) / ((1+t)sqrt(t^2-1))#
Substitute again:
#t=secu#
#dt = secu tan u du#
to have:
# int (dt) / ((1+t)sqrt(t^2-1)) = int (sec u tan u du) / ((1+secu)sqrt(sec^2u-1)) #
Using the identity:
#tan^2u = sec^2u-1#
this becomes:
# int (sec u tan u du) / ((1+secu)sqrt(tan^2u)) = int secu/(1+secu)du = int 1/cosu 1/(1+1/cosu) du = int (du)/(1+cosu)#
Use now:
#cos^2(u/2) = (1+cosu)/2#
#int (du)/(1+cosu) = 1/2int (du)/cos^2(u/2) = int (d(u/2))/cos^2(u/2) = tan(u/2)+C#
To undo the substitutions, consider first the identity:
#tan(u/2) = sqrt((1-cosu)/(1+cosu)) #
and as #cosu = 1/secu = 1/t#:
#tan(u/2) = sqrt ( ( 1-1/t)/(1+1/t)) = sqrt((t-1)/(t+1)) = sqrt ((e^x-2)/e^x) =sqrt(1-2e^(-x))#
so that eventually:
#int (dx)/sqrt(e^(2x)-2e^x) = sqrt(1-2e^(-x)) +C#