We begin with a u-substitution with #u=sqrt(tanx)#
The derivative of #u# is:
#(du)/dx=(sec^2(x))/(2sqrt(tanx))#
so we divide by that to integrate with respect to #u# (and remember, dividing by a fraction is the same as multiplying by its reciprocal):
#int\ 1/sqrt(tanx)\ dx=int\ 1/sqrt(tanx)*(2sqrt(tanx))/sec^2x\ du=#
#=int\ 2/sec^2x\ du#
Since we can't integrate #x#'s with respect to #u#, we use the following identity:
#sec^2theta=tan^2theta+1#
This gives:
#int\ 2/(tan^2x+1)\ du=int\ 2/(1+u^4)\ du=2int\ 1/(1+u^4)\ du#
This remaining integral uses a rather tedious partial fraction decomposition, so I will not do it here. Have a look at this answer if you're interested in how it is worked out:
https://socratic.org/questions/how-do-you-evaluate-the-integral-int-dx-x-4-1
#2int\ 1/(1+u^4)\ du=2(1/(2sqrt2)tan^-1((u^2-1)/(sqrt2u))-1/(4sqrt2)ln|(u^2-sqrt2u+1)/(u^2-sqrt2u+1)|)+C=#
#=1/(sqrt2)tan^-1((u^2-1)/(sqrt2u))-1/(2sqrt2)ln|(u^2-sqrt2u+1)/(u^2-sqrt2u+1)|+C#
Resubstituting for #u=sqrt(tanx)#, we get:
#1/(sqrt2)tan^-1((tanx-1)/(sqrt(2tanx)))-1/(2sqrt2)ln|(tanx-sqrt(2tanx)+1)/(tanx-sqrt(2tanx)+1)|+C#