The question is to solve the equation $$2\sin x\cos x = \sin x$$ for $0\leq x \leq 2\pi$.
This is the way in which the math is done in my book : -
This is the way I did the math : -
Now why is my method incorrect?
My exam is the day after tomorrow, that's why I couldn't code the math in mathjax. Please understand my situation.


Your solution is correct.
By squaring both sides of the equation, the author(s) introduced extraneous solutions, which they failed to check. Also, the author(s) correctly found the solution $x = 2\pi$, then forgot to list it at the end.