Solving the polynomial that doesn't have all the degrees up to the highest one

How can I solve $$-q^5+2q^4-q+2=0$$ I guess I need to unfold, but I don't know how to do that in this example.

Symbolab says that the solution is $q=2$, but I don't quite understand how it arrives at that solution.

Only the solutions from the set of real numbers are accepted.

If you look well, you'll see that the coefficients are -1,2,-1,2 (omitting the zeroes). And the distance between the degrees of the first two and the last two is the same. In that case this trick works (*): $$-q^5+2q^4-q+2=(-q^5+2q^4)+(-q+2)=q^4(-q+2)+(-q+2).$$ But now you have a common factor $(-q+2)$, in one term is multiplied by $q^4$, and in the other you can say it's multiplied by $1$. So you can put $$(-q+2)(q^4+1)=0.$$

Since $-q+2=0\iff q=2$ and $q^4+1>0$ for every $q\in\mathbb R$, $q=2$ is the only real solution (although $q^4+1=0$ would give another four complex roots).

(*) The same would happen if one pair of numbers would be a multiple of the other, like $-1,4;2,-8$, as in $(-q^7+4q^5)+(2q^2-8)$. Here you can extract the factor $q^5$ in the first term, and a $-2$ in the second one (or also $-q^5$ and $2$, respectively). Then we have $q^5(-q^2+4)-2(-q^2+4)=(-q^2+4)(q^5-2)$. And so on.

We have $$-q^5+2q^4-q+2=-(q^4+1)(q-2)=0,$$ hence $q=2$. You can use the Rational Root Theorem to find the root, and then obtain the factorisation.

$$-q^5+2q^4-q+2=q^4(-q+2)+(-q+2)=(-q+2)(q^4+1)=0.$$ So either $-q+2=0$ (in which case $q=2$) or $q^4+1=0$, but the latter has complex solutions.

• I don't understand how do you go from $q^4(-q+2)+(-q+2)$ to $(-q+2)(q^4+1)$. – Hanlon Jun 2 '18 at 8:27
• @Hanlon That is the distributive law: $$(q^4+1)(-q+2))=q^4(-q+2)+1(-q+2)$$ – miracle173 Jun 2 '18 at 12:59