Example 6 If $x=\frac{\sqrt{5}-1}{2}$, then $x^{4}+x^{2}+2 x-$
$$
1=
$$
Let $x=\frac{\sqrt{5}-1}{2}$ be a root of the rational coefficient equation $x^{2}+p x+q=0$, then the other root of this equation is
$$
\begin{array}{l}
\frac{-\sqrt{5}-1}{2} . \\
\because p=-\left(\frac{\sqrt{5}-1}{2}+\frac{-\sqrt{5}-1}{2}\right)=1, \\
q=\frac{\sqrt{5}-1}{2} \cdot \frac{-\sqrt{5}-1}{2}=-1, \\
\therefore x^{2}+x-1=0 .
\end{array}
$$

From this, we get $x^{2}=1-x$ or $x^{4}=1-2 x+x^{2}$.
$$
\begin{array}{l}
\therefore x^{4}+x^{2}+2 x \\
=1-2 x+x^{2}+x^{2}+2 x-1 \\
=2 x^{2}=2(1-x)=2-2 x \\
=2-2 \times \frac{\sqrt{5}-1}{2}=3-\sqrt{5} .
\end{array}
$$