Evaluate the integral of $$\int\frac{dx}{2x\sqrt{1-x}\sqrt{2-x+\sqrt{1-x}}}$$
Attempt: Taking $\sqrt{1-x}$ as $t$, on substituting the same, we get $$\int\frac{dt}{(t^2-1)\sqrt{t^2+t+1}}$$ How to proceed further?
Evaluate the integral of $$\int\frac{dx}{2x\sqrt{1-x}\sqrt{2-x+\sqrt{1-x}}}$$
Attempt: Taking $\sqrt{1-x}$ as $t$, on substituting the same, we get $$\int\frac{dt}{(t^2-1)\sqrt{t^2+t+1}}$$ How to proceed further?
On
First, as said in comments, complete the square and then let $u=2t+1$ $$I=\int\frac{dt}{(t^2-1)\sqrt{t^2+t+1}}=4\int\frac{du}{(u-3) (u+1) \sqrt{u^2+3}}$$ Now, $u=\sqrt 3 \tan(v)$ $$I=4 \int\frac{{\sec (v)}}{3 \tan ^2(v)-2 \sqrt{3} \tan (v)-3}\,dv=$$ Tangent half-angle substitution $$I=8\int \frac{w^2-1 } {3 w^4-4 \sqrt{3} w^3-18 w^2+4 \sqrt{3} w+3 } \,dw$$ The denominator is palindromic with simple roots $$\left\{w=\frac{1}{\sqrt{3}}\right\},\left\{w= -\sqrt{3}\right\},\left\{w= \sqrt{3}-2\right\},\left\{w= 2+\sqrt{3}\right\}$$ Partial fraction decomposition and ... just continue to obtain four logarithms.
Quite a tedious work !
Do not try to go back to any variable (it could be a monster).
On
proceeding with your attempt ,
taking $u=\sqrt{1-x}$ and $\mathrm{d}x=-2\sqrt{1-x}\,\mathrm{d}u$ and $\dfrac{1}{x}=\dfrac{1}{1-u^2}$
$$=\class{steps-node}{\cssId{steps-node-2}{2}}{\displaystyle\int}\dfrac{1}{\left(u^2-1\right)\sqrt{u^2+u+1}}\,\mathrm{d}u$$
=$$={\displaystyle\int}\dfrac{1}{\left(u^2-1\right)\sqrt{\left(u+\frac{1}{2}\right)^2+\frac{3}{4}}}\,\mathrm{d}u$$
$$I=\int \frac{dt}{(1-t^2)\sqrt{t^2+t+1}}=\class{steps-node}{\cssId{steps-node-3}{2}}{\displaystyle\int}\dfrac{1}{\left(u^2-1\right)\sqrt{\left(2u+1\right)^2+3}}\,\mathrm{d}u$$
Now taking the substitution,
$v=2u+1$ and $\mathrm{d}u=\dfrac{1}{2}\,\mathrm{d}v$
$$\class{steps-node}{\cssId{steps-node-3}{2}}{\displaystyle\int}\dfrac{1}{\left(u^2-1\right)\sqrt{\left(2u+1\right)^2+3}}\,\mathrm{d}u=\class{steps-node}{\cssId{steps-node-4}{2}}{\displaystyle\int}\dfrac{1}{\left(v-3\right)\left(v+1\right)\sqrt{v^2+3}}\,\mathrm{d}v$$ Now taking the substitution $v=\sqrt{3}\tan\left(w\right)$ and $\mathrm{d}v=\sqrt{3}\sec^2\left(w\right)\,\mathrm{d}w$
$${\displaystyle\int}\dfrac{1}{\left(v-3\right)\left(v+1\right)\sqrt{v^2+3}}\,\mathrm{d}v= ={\displaystyle\int}\dfrac{\sqrt{3}\sec^2\left(w\right)}{\left(\sqrt{3}\tan\left(w\right)-3\right)\left(\sqrt{3}\tan\left(w\right)+1\right)\sqrt{3\tan^2\left(w\right)+3}}\,\mathrm{d}w$$
$$={\displaystyle\int}\dfrac{\sec\left(w\right)}{\left(\sqrt{3}\tan\left(w\right)-3\right)\left(\sqrt{3}\tan\left(w\right)+1\right)}\,\mathrm{d}w$$
On further solving this monster it gives us result as
$${\displaystyle\int}\dfrac{1}{2\sqrt{1-x}\sqrt{-x+\sqrt{1-x}+2}x}\,\mathrm{d}x=-\dfrac{\ln\left(\frac{\sqrt{3}\left(\sqrt{\frac{\left(2\sqrt{1-x}+1\right)^2}{3}+1}-1\right)}{2\sqrt{1-x}+1}+\sqrt{3}\right)}{2\sqrt{3}}-\dfrac{\ln\left(\frac{\sqrt{3}\left(\sqrt{\frac{\left(2\sqrt{1-x}+1\right)^2}{3}+1}-1\right)}{2\sqrt{1-x}+1}-\sqrt{3}+2\right)}{2}+\dfrac{\ln\left(\left|\frac{3^\frac{3}{2}\left(\sqrt{\frac{\left(2\sqrt{1-x}+1\right)^2}{3}+1}-1\right)}{2\sqrt{1-x}+1}-\sqrt{3}\right|\right)}{2\sqrt{3}}+\dfrac{\ln\left(\left|\frac{\sqrt{3}\left(\sqrt{\frac{\left(2\sqrt{1-x}+1\right)^2}{3}+1}-1\right)}{2\sqrt{1-x}+1}-\sqrt{3}-2\right|\right)}{2}+C$$
$$=\dfrac{\ln\left(\left|\frac{3\left(\sqrt{\left(2\sqrt{1-x}+1\right)^2+3}-\sqrt{3}\right)}{2\sqrt{1-x}+1}-\sqrt{3}\right|\right)-\ln\left(\frac{\sqrt{\left(2\sqrt{1-x}+1\right)^2+3}-\sqrt{3}}{2\sqrt{1-x}+1}+\sqrt{3}\right)}{2\sqrt{3}}+\dfrac{\ln\left(\left|\frac{\sqrt{\left(2\sqrt{1-x}+1\right)^2+3}-\sqrt{3}}{2\sqrt{1-x}+1}-\sqrt{3}-2\right|\right)-\ln\left(\frac{\sqrt{\left(2\sqrt{1-x}+1\right)^2+3}-\sqrt{3}}{2\sqrt{1-x}+1}-\sqrt{3}+2\right)}{2}+C$$
I take from $$I=\int \frac{dt}{(1-t^2)\sqrt{t^2+t+1}}=\frac{1}{2}\int \left(\frac{1}{1-t}+\frac{1}{1+t}\right)\frac{dt}{\sqrt{t^2+t+1}}=I_1+I_2$$ Let $(1-t)=1/u$ in $I_1$ and $(1+t)=1/v$ in I_2, we get $$2I= \int \frac{du}{\sqrt{3u^2-3u+1}}-\int \frac{dv}{\sqrt{v^2-v+1}}$$ $$\implies2I=\frac{1}{\sqrt{3}}\int \frac{du}{\sqrt{(u-1/2)^2+1/12}}-\int \frac{dv}{\sqrt{(v-1/2)^2+3/4}}$$ $$\implies I=\frac{1}{2\sqrt{3}} \ln[u-\sqrt{(u-1/2)^2+1/12}]-\frac{1}{2}\ln[v-1/2+\sqrt{(v-1/2)^2+3/4}].$$ where $$u=1/(1-t), v=1/(1+t).$$