<s>[INST] Solve the following equation: $\sin x \cos x = \frac{1}{2}$ I am required to solve the following equation:

$$\sin x \cos x = \frac{1}{2}$$

My attempt:
Rewriting $\cos x$
$$\sin x \sqrt{1 - \sin^2 x} = \frac{1}{2}$$
Squaring both sides
$$\bigl(\sin x \sqrt{1 - \sin^2 x}\bigr)^2 = \bigl(\frac{1}{2}\bigr)^2$$
$$\sin^2 x (1 - \sin^2 x) = \frac{1}{4}$$
Expanding left side and multiplying both sides by 4 
$$\sin^2 x - \sin^4 x = \frac{1}{4}$$
$$4\sin^2 x - 4\sin^4 x = 1$$
$$4\sin^2 x - 4\sin^4 x -1 = 0$$
Reordering left side
$$- 4\sin^4 x + 4\sin^2 x  -1 = 0$$
$$4\sin^4 x - 4\sin^2 x  + 1 = 0$$
Expression above can be factored as
$$(2\sin^2 x - 1)(2\sin^2 x - 1) = 0$$
$$(2\sin^2 x - 1)^2 = 0$$
It follows that
$$2\sin^2 x - 1 = 0 $$
$$\sin^2 x = \frac{1}{2} $$
$$\sin x = ± \frac{1}{\sqrt{2}} $$
So the resulting angles are: $45^{\circ},135^{\circ},225^{\circ},315^{\circ}$
Is my solution correct?

The reason why I am asking is, the author of the book used different method, and the end result he got was:
$$\sin2x = 1$$
So $2x = \sin^{-1}(1) = 90^{\circ},450$, and thus $x = 45^{\circ},225^{\circ}$
 [/INST] Your solution is incorrect, as others pointed out. The reason is because you've made two "irreversible" operations, and did not took care of the branches they create.
The first one is:
$$
\sin x \cos x = \frac{1}{2} \Rightarrow \sin x \sqrt{1 - \sin^2 x} = \frac{1}{2}
$$
This is is simply wrong, because if your are working on real numbers, the outcome of the square root must be a non-negative number. The correct statement would actually be:
$$
\sin x |\cos x| = \frac{1}{2} \Rightarrow \sin x \sqrt{1 - \sin^2 x} = \frac{1}{2}
$$
The second one is:
$$
\sin x \sqrt{1 - \sin^2 x} = \frac{1}{2} \Rightarrow \bigl(\sin x \sqrt{1 - \sin^2 x}\bigr)^2 = \bigl(\frac{1}{2}\bigr)^2
$$
This is actually right, but you needed the arrow to go both ways, and it doesn't because:
$$
\sin x \sqrt{1 - \sin^2 x} = -\frac{1}{2} \Rightarrow \bigl(\sin x \sqrt{1 - \sin^2 x}\bigr)^2 = \bigl(-\frac{1}{2}\bigr)^2 = \bigl(\frac{1}{2}\bigr)^2
$$
Because of this step, you've introduced 2 additional solutions.
You could have checked all the answers you've obtained to verify which remained valid, but the advantage of the double-arc method is that you circumvent those irreversible operations, making it easier to reach the final answer.
</s>