<s>[INST] Problem with definite integral $\int_{0}^{\frac{\pi}{6}}\cos x\sqrt{1-2\sin x} dx$ $$\int_{0}^{\frac{\pi}{6}}\cos x\sqrt{1-2\sin x} dx$$
The question says 'evaluate the integral using the suggested substitution. It gives $u=\cos x$. But I think Let $u=1-2\sin x$ is better. 
$$\int_{0}^{\frac{\pi}{6}}\cos x\sqrt{1-2\sin x} dx$$
$$u=1-2\sin x$$
$$du=-2\cos x dx$$
$$=-\frac{1}{2}\int_{1}^{0}\sqrt{u}du$$
$$=\frac{1}{2}\int_{0}^{1}\sqrt{u}du$$
$$=\left | \frac{u^{\frac{3}{2}}}{3} \right |_{0}^{1}$$
$$=\frac{1}{3}$$
My question is how to solve it by using $u=\cos x$. Can anyone show the solution for it? Thanks a lot!
 [/INST] Well, @Nilan has the better way to go.  But, here is another "Brute Force," double substitution method that works.
Write, $\sin x = \sqrt{1-\cos^2 x}$ (the positive square root is appropriate here since $0\le x\le \frac{\pi}{6}$.  Then, with $u = \cos x$, $du = -\sin x dx=-\sqrt{1-u^2}du$, and the limits of integration extend from $u=1$ to $u=\frac{\sqrt{3}}{2}$.  Thus, 
$$\int_0^{\frac{\pi}{6}}\cos x\sqrt{1-2\sin x}dx= \int_{\frac{\sqrt{3}}{2}}^1 \frac{u\sqrt{1-2\sqrt{1-u^2}}}{\sqrt{1-u^2}}du$$
Now, we make a second substitution.  Let $y=\sqrt{1-u^2}$.  Then, $dy=\frac{-2u}{\sqrt{1-u^2}}du$ and the limits of integration go from $y=\frac12$ to $y=0$.  (Note:  This second substitution is identical to making the original substitution $u=\sin x$).  Thus, 
$$\int_0^{\frac{\pi}{6}}\cos x\sqrt{1-2\sin x}dx=\int_0^{\frac12} \sqrt{1-2y}dy=\frac13$$
</s>