<s>[INST] Solve the following equation: $\sqrt {\sin x - \sqrt {\cos x + \sin x} } = \cos x$ Solve the following equation: 
\begin{array}{l}{\sqrt{\sin x-\sqrt{\cos x+\sin x}}=\cos x} \\ \text{my try as follows:}\\{\sin x-\sqrt{\cos x+\sin x}=\cos ^{2} x} \\ {\sin x-\cos ^{2} x=\sqrt{\cos x+\sin x}} \\ {\sin ^{2} x+\cos ^{4} x-2 \sin x \cos ^{2} x=\cos x+\sin x} \\ {\sin ^{2} x+\cos ^{4} x-2 \sin x \cos ^{2} x-\cos x-\sin x=0} \\ {\sin ^{2} x+\cos ^{4} x-2 \sin x\left(1-\sin ^{2} x\right)-\cos x-\sin x=0} \\{\sin ^2}x + {\left( {1 - {{\sin }^2}x} \right)^2} - 2\sin x\left( {1 - {{\sin }^2}x} \right) - \cos x - \sin x = 0\\ {\sin ^{2} x+\sin ^{4} x-2 \sin ^{2} x+1-2 \sin x+2 \sin ^{3} x-\cos x-\sin x=0} \\ {\sin ^{4} x+2 \sin ^{3} x-\sin ^{2} x-3\sin x-\cos x+1=0}\end{array}
Now i think it gets more complicated , any help would be appreciated 
 [/INST] In any solution, $\cos(x)$ is nonnegative, since it equals some square root.
In any solution, $\sin(x)$ is nonnegative, since the equation includes the square root of $\sin(x)$ minus some nonnegative quantity.
So $\cos(x)+\sin(x)\geq\sin(x)$, and therefore $$\sqrt{\cos(x)+\sin(x)}\geq\sqrt{\sin(x)}\geq\sin(x)$$
where the last inequality is because $\sin(x)\leq1$. And note that equality only holds if $\sin(x)=1$ or $\sin(x)=0$.
So $\sin(x)-\sqrt{\cos(x)+\sin(x)}\leq\sin(x)-\sin(x)=0$, and therefore $$\sin(x)-\sqrt{\cos(x)+\sin(x)}\leq0$$
In the equation, we take a square root of this expression. So it is not defined unless we have equality, which we noted is only possible if $\sin(x)=1$ or $\sin(x)=0$. 
No solution can have $\sin(x)=0$, or else $\sin(x)-\sqrt{\cos(x)+\sin(x)}<0$, and we cannot take its square root in the equation.
Any $x$ with $\sin(x)=1$ implies $\cos(x)=0$, and such $x$ do indeed make a solution, by inspection.
So the given equation is equivalent to $\sin(x)=1$, and the solution set is $\frac{\pi}{2}+2k\pi$.
</s>