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
We do this in one period $[-\pi, \pi)$.
According to the equation, $\cos x = \sqrt \cdots \geqslant 0$, then $x \in [-\pi/2, \pi/2]$. Also inside the square root, $\sin x \geqslant \sqrt \cdots \geqslant 0$, then $x\in [0, \pi) \cup \{-\pi\}$. Thus $x \in [0, \pi/2]$ at least.
To be more exact, we consider $$ \sin x \geqslant \sqrt {\sin x + \cos x}, $$ equivalently, $$ \sin^2 x \geqslant \sin x + \cos x. $$ But in $[0, \pi/2]$, $\cos x \geqslant 0$ and $\sin^2 x \leqslant \sin x$, thus $$ \sin x \geqslant \sin^2 x \geqslant \sin x + \cos x \geqslant \sin x, $$ which means all $\geqslant $ are $=$. The $=$ holds iff $\cos x = 0$ and $\sin x = 1$. Thus the only possible $x$ is $\boldsymbol {\pi/2}$.
Clearly $x = \pi/2$ is truly a solution to the equation, so the final solutions are $$ \boxed {2n\pi +\frac \pi 2, n \in \mathbb Z }\ . $$