We have:

Thus:

Adding

gives:

Factoring gives:

Thus, we have:

or

.
Note that because

, there will be no solutions

of the form

for positive integer

and solution

. So we find the basic values of

giving

.
For

with positive

,

(this can be seen easily from the unit circle. But

, a contradiction. So we examine the case in which

.
In this case,

. So this is the only solution to this equation.
Substituting this back in, we have

, as desired. So this is a valid solution.
Thus,

.