I guess you have to find

given that
.
We can immediately solve for
:

(without knowing anything else about
, we cannot determine the sign)
Then we get
for free:

and we can now solve for
:

Notice that we have 2*2 = 4 possible choices of sign for either sin or cos.
• If both are positive, then

• If both are negative, then

• If sin is positive and cos is negative, then

• If cos is positive and sin is negative, then
