Solve : $\sin\left(\frac{\sqrt{x}}{2}\right)+\cos\left(\frac{\sqrt{x}}{2}\right)=\sqrt{2}\sin\sqrt{x}$ Solve : $\sin\left(\dfrac{\sqrt{x}}{2}\right)+\cos\left(\dfrac{\sqrt{x}}{2}\right)=\sqrt{2}\sin\sqrt{x}$
$$\dfrac{1}{\sqrt{2}}\cdot\sin\left(\dfrac{\sqrt{x}}{2}\right)+\dfrac{1}{\sqrt{2}}\cos\left(\dfrac{\sqrt{x}}{2}\right)=\sin\sqrt{x}$$
$$\sin\left(\dfrac{\sqrt{x}}{2}+\dfrac{\pi}{4}\right)=\sin\sqrt{x}$$
$$\sin\left(\dfrac{\sqrt{x}}{2}+\dfrac{\pi}{4}\right)-\sin\sqrt{x}=0$$
$$2\sin\left(\dfrac{\dfrac{\sqrt{x}}{2}-\dfrac{\pi}{4}}{2}\right)\cos\left(\dfrac{\dfrac{3\sqrt{x}}{2}+\dfrac{\pi}{4}}{2}\right)=0$$
$$\left(\dfrac{\sqrt{x}}{2}-\dfrac{\pi}{4}\right)=2n\pi \text { or } 
 \left(\dfrac{3\sqrt{x}}{2}+\dfrac{\pi}{4}\right)=(2n+1)\pi$$
$$\sqrt{x}=4n\pi+\dfrac{\pi}{2} \text { or } \sqrt{x}=\dfrac{4n\pi}{3}+\dfrac{\pi}{2}$$
$$x=\left(4n\pi+\dfrac{\pi}{2}\right)^2 \text { or } x=\left(\dfrac{4n\pi}{3}+\dfrac{\pi}{2}\right)^2 \text { where n $\in$ I}$$
But actual answer is $$x=\left(4n\pi+\dfrac{\pi}{2}\right)^2 \text { or } x=\left(\dfrac{4m\pi}{3}+\dfrac{\pi}{2}\right)^2 \text { where n,m $\in$ W}$$
I tried to find the mistake but didn't get any breakthroughs.
 A: First, 
$\sin \alpha = \sin \beta \iff 
 \beta \equiv \alpha \pmod{2 \pi}
 \quad \text{or} \quad 
 \beta \equiv \pi - \alpha \pmod{2 \pi}$
So, from
$$ \sin\left(\dfrac{\sqrt{x}}{2}+\dfrac{\pi}{4}\right) = \sin\sqrt{x} $$
You could have argued
$$ \sqrt x = 2m\pi + \dfrac{\sqrt{x}}{2}+\dfrac{\pi}{4}
  \qquad \text{or} \qquad
  \pi - \sqrt x = -2n\pi + \dfrac{\sqrt{x}}{2}+\dfrac{\pi}{4}$$
$$ \dfrac{\sqrt x}{2} = 2m\pi +\dfrac{\pi}{4} 
   \qquad \text{or} \qquad
   \sqrt x = \dfrac{8n+3}{6}\pi$$
$$ x = \left( 4m\pi + \dfrac{\pi}{2} \right)^2
   \qquad \text{or} \qquad
   x = \left( \dfrac{8n+3}{6}\pi \right)^2$$
Note that, when $x = \left( 4m\pi + \dfrac 12\pi \right)^2$, then
$\sqrt x = \left| m\pi + \dfrac 12\pi \right|$ but we need to have $\sqrt x = m\pi +\dfrac 12\pi$. So we need to require $m \in \mathbb W$. Similarly, we will need to require $n \in \mathbb W$.
A: First we square both sides to get
$$
\begin{align*}
\left(\sin\left(\frac{\sqrt{x}}{2}\right)+\cos\left(\frac{\sqrt{x}}{2}\right)\right)^2&=\left(\sqrt{2}\sin\left(\sqrt{x}\right)\right)^2,\\
\sin^2\left(\frac{\sqrt{x}}{2}\right)+\cos^2\left(\frac{\sqrt{x}}{2}\right)+2\sin\left(\frac{\sqrt{x}}{2}\right)\cos\left(\frac{\sqrt{x}}{2}\right)&=2\sin^2\left(\sqrt{x}\right),\\
1+2\sin\left(\frac{\sqrt{x}}{2}\right)\cos\left(\frac{\sqrt{x}}{2}\right)=2\sin^2\left(\sqrt{x}\right),\\
-2\sin^2\left(\sqrt{x}\right)+\sin\left(\sqrt{x}\right)+1=0.
\end{align*}$$
Let $y:=\sin(\sqrt{x})$ meaning we have the polynomial $-2y^2+y+1=0$. Factoring gives us $(2y+1)(y-1)=0$ meaning that $\sin(\sqrt{x})=1$ and $\sin(\sqrt{x})=-1/2$.
If $\sin(\sqrt{x})=1$ then $\sqrt{x}=\pi/2 + 2\pi n$ where $n \in \mathbb{N}$ which means that $x=\pi^2(4n+1)^2/4$.
If $\sin(\sqrt{x})=-1/2$ then the principle angle (i.e. angle in quadrant one), $\alpha$, is $\alpha=\pi/6+2\pi n$. Since $\sin$ is negative in quadrants three and four, $\sqrt{x}=7\pi/6 +2\pi n$ and $\sqrt{x}=11\pi/6 + 2\pi n$. This means that the solutions are $x=\pi^2(12n+7)^2/36$ and $\pi^2(12n+11)^2/36$.
Therefore, the solutions are 
$$
\begin{align}
x&=\frac{\pi^2(4n+1)^2}{4},\\
x&=\frac{\pi^2\left(12n+7\right)^2}{36},\\
x&=\frac{\pi^2\left(12n+11\right)^2}{36}.
\end{align}
$$
