3. (BUL) Solve the equation $\cos ^{n} x-\sin ^{n} x=1$, where $n$ is a given positive integer.
3. For $n \geq 2$ we have
$$
\begin{aligned}
1 & =\cos ^{n} x-\sin ^{n} x \leq\left|\cos ^{n} x-\sin ^{n} x\right| \\
& \leq\left|\cos ^{n} x\right|+\left|\sin ^{n} x\right| \leq \cos ^{2} x+\sin ^{2} x=1 .
\end{aligned}
$$

Hence $\sin ^{2} x=\left|\sin ^{n} x\right|$ and $\cos ^{2} x=\left|\cos ^{n} x\right|$, from which it follows that $\sin x, \cos x \in\{1,0,-1\} \Rightarrow x \in \pi Z / 2$. By inspection one obtains the set of solutions
$\{m \pi \mid m \in \mathbb{Z}\}$ for even $n$ and $\{2 m \pi, 2 m \pi-\pi / 2 \mid m \in \mathbb{Z}\}$ for odd $n$.
For $n=1$ we have $1=\cos x-\sin x=-\sqrt{2} \sin (x-\pi / 4)$, which yields the set of solutions
$$
\{2 m \pi, 2 m \pi-\pi / 2 \mid m \in Z\} .
$$