


Note that

is defined for

, and

is defined for

, where the latter will be the "total" domain. Under this condition, you have

and

. The cosine terms can be found with Pythagoras' theorem.
So provided that

, it follows that the above reduces to

Squaring both sides gives



Squaring both sides again gives







Three of these solutions are extraneous, however.
When

, we have

.
When

, we have

.
When

, we have

.
Finally, when

, we have

, so this is our only solution.