Example 2. Given $\sin \alpha+\cos \alpha=a$.
(1) Find the value of $\sin ^{5} \alpha+\cos ^{5} \alpha$;
(2) If $a=1$, find the value of $\sin ^{n} \alpha+\cos ^{n} \alpha$.
Let $f(n)=\sin ^{n} \alpha+\cos ^{n} \alpha$, then (1) $=a$.
Given $f(2)=\sin ^{2} \alpha+\cos ^{2} \alpha=1$,
$f(3)=a f(2)-\frac{a^{2}-1}{2} \cdot a$
$=\frac{-a^{3}+3 a}{2}$,
$f(4)=a f(3)-\frac{a^{2}-1}{2} f(2)$
$=-a^{4}+2 a^{2}+1$
2
$\therefore f(5)=\sin ^{5} \alpha+\cos ^{5} \alpha$
$=a f(4)-\frac{a^{2}-1}{2} f(3)$
$=\frac{-a^{5}+5 a}{4}$
(2) $\because \sin \alpha+\cos \alpha=1$,
$\therefore \sin \alpha \cdot \cos \alpha=0$
$\therefore f(n)=\sin ^{n} \alpha+\cos ^{n} \alpha=(\sin \alpha$
$+\cos \alpha) f(n-1)-(\sin \alpha \cdot \cos \alpha) f(n-2)$
$=f(n-1)$
Similarly, $f(n-1)=f(n-2)=\cdots=f(1)$ $=1$.