<s>[INST] Finding when $y=1+2\sin(x)$ and $y=2\sin(\frac{x}{2})+2\cos(\frac{x}{2})$ are equal How would you solve the following equation?
$$1 +2\sin(x) = 2\sin(\tfrac{x}{2}) +2\cos(\tfrac{x}{2}) \quad\text{for }−2\pi\leq x \leq 2\pi.$$
Steps I tried:
\begin{align}
1+2\sin(x) &= 2\sin(\tfrac{x}{2}) +2\cos(\tfrac{x}{2}) \\
2\sin(x) -2\sin(\tfrac{x}{2}) &= 2\cos(\tfrac{x}{2}) -1 \\
2[\sin(x) -\sin(\tfrac{x}{2})] &= 2\cos(\tfrac{x}{2}) -1 \\
\sin(x) -\sin(\tfrac{x}{2}) &= \cos(\tfrac{x}{2}) -\tfrac{1}{2} \\
\sin(x) +\tfrac{1}{2} &= \cos(\tfrac{x}{2}) +\sin(\tfrac{x}{2})
\end{align}
Now, squaring both sides, 
$$\sin^2(x) +\tfrac{1}{4} = \cos^2(\tfrac{x}{2}) +\sin^2(\tfrac{x}{2}).$$
Using $\sin^2(x) +\cos^2(x) = 1$, 
\begin{align}
\sin^2(x) &= 1 -\tfrac{1}{4} \\
\sin(x) &= \mp\sqrt\frac{3}{4}.
\end{align}
When I follow through, I get the solutions below the $x$-axis but not above. Can anyone please explain what's wrong with my solution?
 [/INST] HINT:
Avoid squaring as it immediately introduces extraneous root.
Using $\sin x=\sin2\cdot\dfrac x2=2\sin\dfrac x2\cos\dfrac x2$
$$1+2\sin x=2\left(\sin\dfrac x2+\cos\dfrac x2\right)$$
$$\iff\left(2\sin\dfrac x2-1\right)\left(2\cos\dfrac x2-1\right)=0$$
Hope you can take it from here!
</s>