Question 3 Given real numbers $a, b$ satisfy $a^{3}+b^{3}+3 a b=1$. Find $a+b$.
(2004, National Junior High School Mathematics League)
Solution: From the given, we have
$$
a^{3}+b^{3}+(-1)^{3}-3 a b(-1)=0 \text {. }
$$

By the formula
$$
\begin{array}{l}
a^{3}+b^{3}+c^{3}-3 a b c \\
=(a+b+c)\left(a^{2}+b^{2}+c^{2}-a b-b c-a c\right),
\end{array}
$$

if $a^{3}+b^{3}+c^{3}-3 a b c=0$, then $a+b+c=0$ or $a=b=c$.

Therefore, $a+b+(-1)=0$ or $a=b=-1$. Hence, $a+b=1$ or $a+b=-2$.