Example 1. Factorize the polynomial $x^{8}+x^{7}+1$.
Let $x=10$, then
$$
\begin{aligned}
x^{8}+x^{7}+1 & =10^{8}+10^{7}+1 \\
& =110000001 \\
& =3 \times 37 \times 990991 .
\end{aligned}
$$

These three numbers are all factors. Substituting $x=10$ again, 3 must be $x-7$, 37 must be $3x+7$ or $4x-3$. However, because the constant term of the original expression is 1, the constant term of the factor must be a factor of 1, so $x-7$, $3x+7$, and $4x-3$ cannot be the linear factors of the original expression. Therefore, the original expression has no linear factors. Multiplying 3 and 37, the result is 111. So the original expression may have a quadratic factor $x^{2}+x+1$. Substituting 990991 back with $x=10$, we get
$$
\begin{aligned}
990991= & 9 \times 10^{5}+9 \times 10^{4}+9 \times 10^{2}+9 \\
& \times 10+1 \\
= & (10-1) \times 10^{5}+(10-1) \times 10^{4} \\
+ & (10-1) \times 10^{2}+(10-1) \times 10+1 \\
= & 10^{6}-10^{4}+10^{3}-10+1 \\
= & x^{6}-x^{4}+x^{3}-x+1 .
\end{aligned}
$$

Therefore, the original expression may be factored as
$$
\left(x^{2}+x+1\right)\left(x^{6}-x^{4}+x^{3}-x+1\right) \text {, }
$$

Verification shows that
$$
\begin{array}{l}
\left(x^{2}+x+1\right)\left(x^{6}-x^{3}+x^{3}-x+1\right) \\
=x^{8}+x^{7}+1 .
\end{array}
$$