<s>[INST] Substituting a value of sine function in a trigonometric equation I am trying to really understand trigonometric equations and I've stumbled upon a rather confusing example. Solve the following equation:
$\sin x= 2|\sin x|+ {\sqrt{3}}\cos x$ 
 First step is to define the absolute $\sin x$:
$$|\sin x| = 
\begin{cases}
\sin x & \sin x \in [0, 1]\\
-\sin x & \sin x \in [-1, 0)
\end{cases}
$$
 Let's see what happens in the first case: 
$$\sin x \in [0,1] \Rightarrow\, x \in {[2k{\pi}, (2k+1){\pi}]}$$
which means x is in the first or second quadrant.
 Bringing everything to the right side: 
$$\sin x+{\sqrt{3}}\cos x=0$$
 Now we notice terms ${\sqrt{3}}$ with $\cos x$ and $1$ with $\sin x$ and do the following: 
\begin{align*}
\sin x+{\sqrt{3}}\cos x& =0 \quad /:2\\ 
\frac{1}{2}\sin x+{\frac{\sqrt{3}}{2}}\cos x& = 0
\end{align*}
 Now, the goal is to try and substitute integer terms with trigonometric functions they are solutions to, in order to apply one of the trigonometric identities for solving the problem. Let's aim at the following formula: $\sin(x+y)=\sin x\cos y + \sin y\cos x$ .We have several options:


*

*$\frac {1}{2} $is value of $\cos$ for either $x=\frac {\pi}{3} + 2k\pi$ OR $x=\frac {5\pi}{3} + 2k\pi$. Of all of these angles, only $x=\frac {\pi}{3} $ falls under our domain. 

*${\frac {\sqrt{3}}{2}} $is value of $\sin$ for either $x=\frac {\pi}{3} + 2k\pi$ OR $x=\frac {2\pi}{3} + 2k\pi$. Out of all of these angles, there are two of them that fall under our domain. $x=\frac {\pi}{3}$ and $x=\frac {2\pi}{3}$. 
This is where the problem is. I feel I should consider both of the $\sin$ values and solve two different versions of the equation. The first one is by substituting $\frac {1}{2} = \cos\frac {\pi}{3}$ and $\frac {\sqrt{3}}{2} = \sin\frac {\pi}{3}$, which is easily solved using the identity mentioned above. The second case is when substituting $\frac {\sqrt{3}}{2} = \sin\frac {2\pi}{3}$. This does not conform to any trig. identity. I tried treating $\sin\frac {2\pi}{3}$ as $\sin$ of double angle, but ended up at the beginning. I typed this equation into Symbolab and examined their step-by-step solution. It turns out that at some point they divided the equation with $\cos x$. Even when $\cos x$ is definitely not zero, I was taught dividing a trigonometric equation with anyting other than integers was a risky move very likely to result in a loss of solutions. So, my questions are: 
 Should you just ignore possible angles that won't make you a simple trigonometric identity?
 Can you divide trigonometric equation with some trigonometric function and when?

I hope I explained myself clearly enough. Thank you in advance.
 [/INST] Hint:
note that if $y=\dfrac{2 \pi}{3}$ than $\cos y = -\dfrac{1}{2}$, so you cannot  use $\dfrac{1}{2}\sin x + \dfrac{\sqrt{3}}{2}\cos x=0$.
</s>