This is not an answer. This is a long-winded comment.
You are given $~f(x) = x^4 + 2x^3 + x^2 - 2x + 1,~$ and you wish to solve the equation $~f(x) = 0.~$ As has already been mentioned, one approach is the rational root theorem.
Because of the unusual nature of this function, there is another approach.
In the polynomial $~f(x),~$ let $~a_k~$ denote the coefficient of $~x^k~: ~k \in \{0,1,2,3,4\}.~$ Then, you have that $~a_4 = a_0,~$ and $~a_3 = \pm a_1.~$ I refer to such a quartic polynomial as a symmetric quartic. There is a special strategy that can be applied to any symmetric quartic.
Construct $~g(x) = \dfrac{f(x)}{x^2} = x^2 + 2x + 1 - \dfrac{2}{x} + \dfrac{1}{x^2}.~$ Note that $~x = 0~$ can not be a solution to the equation $~f(x) = 0.~$ Therefore,
$$f(x) = 0 \iff g(x) = 0.$$
Given any symmetric quartic equation $~f(x) = 0,~$ the equation can be attacked by instead attacking the constructed equation $~g(x) = 0.~$
Depending on whether $~a_3 = a_1,~$ or $~a_3 = -a_1,~$ you would attack $~g(x) = 0,~$ by one of the two substitutions:
In this case, you want the latter substitution.
Note that here,
$$w^2 = x^2 - 2 + \frac{1}{x^2}
\implies x^2 + \frac{1}{x^2} = w^2 + 2.$$
Then,
$$g(x) = w^2 + 2w + 3.$$
Thus, you have converted the polynomial $~g(x)~$ into a 2nd degree polynomial in the variable $~w,~$ and you can then apply the formula for a quadratic equation against the 2nd degree polynomial equation, $~w^2 + 2w + 3 = 0.$
Once this is done, you will (potentially) obtain two roots of this 2nd degree polynomial equation, $~q_1,~q_2.$
Then, to obtain the roots of the equation $~f(x) = 0,~$ you would solve (separately), the two distinct quadratic equations,