*Problem*

Solve the equation

where n is a positive integer.

*Solution*

Some solutions are easily guessed. For example,

But we need something more general. One thing is clear: \cos^{2}x+\sin^{2}x=1, by the Pythagorean theorem. But, if n\ge 2,

It follows that, if both |\cos x| and |\sin x| are less than 1, no solution is possible for n\gt 2, nor for n=2, because of the sign minus in the equation. The only case that remains is that of n = 1.

So, we are to solve \cos x - \sin x = 1. Recollect that \cos{\frac{\pi}{4}}=\sin{\frac{\pi}{4}}=\frac{\sqrt{2}}{2}. Multiply by \frac{\sqrt{2}}{2} and make use of the addition formula for sine to obtain

From here, x - \frac{\pi}{4} = \frac{\pi}{4}+2k\pi or x - \frac{\pi}{4} = -\frac{\pi}{4}+\pi+2k\pi. In other words,

where k is any integer.