You can use the identity
to write the equation as

Now, from the fundamental equation of trigonometry, deduce an expression for
in terms of
:

The equation becomes

Simplify the left hand side and move all terms to left hand side:

Now, if you let
, this equation becomes a quadratic equation:

The two solutions of this equations are

We must be careful, because we have to remember that
was actually
. This means that
can only assume values between -1 and 1. The second solution exceeds 1, so we reject it. So, we have
