TITLE: How do I show that $n=2$ is the only integer satisfy :$\cos^n\theta+ \sin^n\theta=1$ for all $\theta$ real or complex?
QUESTION [5 upvotes]: It is well known that :$\cos²\theta+ \sin²\theta=1$ for all $\theta$ real or complex ,I would like to ask about the general equality :$\cos^n\theta+ \sin^n\theta=1$ if there is others values of the positive integer $n$ than $n=2$ for which : $$\cos^n\theta+ \sin^n\theta=1$$ for all $\theta$ real or complex ? 
probably the equivalent question is to ask this question :
Question:How do I show that  $n=2$ is the only integer satisfy :$$\cos^n\theta+ \sin^n\theta=1$$ for all $\theta$ real or complex ?
Thank you for any help

REPLY [2 votes]: Try differentiating both sides:
$$\begin{align}\sin^nx+\cos^nx &= 1 \\ 
\implies \frac{d}{dx}\left(\sin^nx+\cos^nx\right) &= 0
\\ n(\sin x)^{n-1} \cos x-n(\cos x)^{n-1}\sin x&=0 \\
(\tan x)^{n-1}&=\tan x \\\end{align}$$
$$ \implies n-1=1 \\ {n = 2}$$