I am trying to find the number of solutions of the equation $$\sin\theta +\cos\theta=\sin2\theta $$ in the interval $[-\pi,\pi]$.
Here's what I did, $$\sin\theta +\cos\theta=\sin2\theta \\ \Rightarrow (\sin\theta +\cos\theta)^2=(\sin2\theta)^2 \\ \Rightarrow1+\sin2\theta=(\sin2\theta)^2$$
Hence we get $\sin2\theta=\frac{1\pm\sqrt{5}}{2}$, with $\sin2\theta=\frac{1 -\sqrt{5}}{2}$ bein the only valid solution.
Since $2\theta$ is present inside $\sin()$, I assumed that there would be four solutions of the equation. But on plotting the graph I find that there are only two solutions.
Why are there only two solution instead of four, and how could I prevent this mistake in future?