Solution (source code)

= Solution

The <factor theorem> gives a factor $x-1$. <Polynomial division> and then factorization give
$$
2x^3+x^2-5x+2=(x-1)(2x^2+3x-2)=(x-1)(2x-1)(x+2).
$$
Consequently all three <roots of a polynomial> are
$$
\boxed{x=1,\quad\frac12,\quad-2.}
$$