Example $\mathbf{3}$ Given the Fibonacci sequence $\left\{a_{n}\right\}$ satisfies
$$
\left\{\begin{array}{l}
a_{1}=a_{2}=1, \\
a_{n}=a_{n-1}+a_{n-2}(n \geqslant 3) .
\end{array}\right.
$$

Find the general term formula $a_{n}$ of the sequence $\left\{a_{n}\right\}$.
Solve from $x^{2}=x+1$, we get
$$
x_{1}=\frac{1+\sqrt{5}}{2}, x_{2}=\frac{1-\sqrt{5}}{2} \text {. }
$$

Let $a_{n}=A\left(\frac{1+\sqrt{5}}{2}\right)^{n}+B\left(\frac{1-\sqrt{5}}{2}\right)^{n}$.
From $a_{1}=a_{2}=1$, we get
$$
\left\{\begin{array}{l}
\frac{1+\sqrt{5}}{2} A+\frac{1-\sqrt{5}}{2} B=1, \\
A\left(\frac{1+\sqrt{5}}{2}\right)^{2}+B\left(\frac{1-\sqrt{5}}{2}\right)^{2}=1 .
\end{array}\right.
$$

Solving, we get $(A, B)=\left(\frac{\sqrt{5}}{5},-\frac{\sqrt{5}}{5}\right)$.
Therefore, $a_{n}=\frac{\sqrt{5}}{5}\left[\left(\frac{1+\sqrt{5}}{2}\right)^{n}-\left(\frac{1-\sqrt{5}}{2}\right)^{n}\right]$.