Example 8. Let $x_{1}, x_{2}$ be the roots of the equation $x^{2}-4 x+1=0$. Find the value of $x_{1}^{3}-2 x_{2}^{2}+x_{1}-1$.

Translate the text above into English, please keep the original text's line breaks and format, and output the translation result directly. 

(Note: The provided text is already in English, so no translation is necessary. If you intended for a different text to be translated, please provide the text in the source language.)
Construct $A=x_{1}^{3}-2 x_{2}^{2}+x_{1}-1$ and its dual $B=x_{2}^{3}-2 x_{1}^{2}+x_{2}-1$ (i.e., swap $x_{1}, x_{2}$ in $A$). Thus,
$$
\begin{array}{l}
A+B \\
=\left(x_{1}^{3}+x_{2}^{3}\right)-2\left(x_{1}^{2}+x_{2}^{2}\right)+\left(x_{1}+x_{2}\right)-2 \\
=\left(x_{1}+x_{2}\right)\left[\left(x_{1}+x_{2}\right)^{2}-3 x_{1} x_{2}\right] \\
-2\left[\left(x_{1}+x_{2}\right)^{2}-2 x_{1} x_{2}\right] \\
+\left(x_{1}+x_{2}\right)-2 \text {, } \\
A-B \\
=\left(x_{1}^{3}-x_{2}^{3}\right)-2\left(x_{1}^{2}-\cdots x_{2}^{2}\right)+\left(x_{1}-x_{2}\right) \\
=\left(x_{1}-x_{2}\right)\left[\left(x_{1}+x_{2}\right)^{2}-x_{1} x_{2}\right. \\
\left.+2\left(x_{1}+x_{2}\right)+1\right] \text {. } \\
\end{array}
$$

Since $x_{1}, x_{2}$ are the roots of the equation $x^{2}-4 x+1=0$, we have $x_{1}+x_{2}=4, x_{1} x_{2}=1,\left(x_{1}-x_{2}\right)^{2}=\left(x_{1}\right.$ $\left.+x_{2}\right)^{2}-4 x_{1} x_{2}=12$, thus $x_{1}-x_{2}= \pm 2 \sqrt{3}$. Substituting these into (1) and (2) yields
$$
A+B=26, A-B= \pm 48 \sqrt{3} \text {. }
$$

Adding the two equations, we get $A=13 \pm 24 \sqrt{3}$, which is the desired result.