How to simplify polynomials I can't figure out how to simplify this polynominal $$5x^2+3x^4-7x^3+5x+8+2x^2-4x+9-6x^2+7x$$
I tried combining like terms
$$5x^2+3x^4-7x^3+5x+8+2x^2-4x+9-6x^2+7x$$
$$(5x^2+5x)+3x^4-(7x^3+7x)+2x^2-4x-6x^2+(8+9)$$
$$5x^3+3x^4-7x^4+2x^2-4x-6x^2+17$$
It says the answer is $$3x^4-7x^3+x^2+8x+17$$ but how did they get it?

Group the terms with the same power of $x$ together.
$5x^2+3x^4−7x^3+5x+8+2x^2−4x+9−6x^2+7x$
$=3x^4−7x^3+5x^2+2x^2−6x^2+5x−4x+7x+8+9$
$=3x^4−7x^3+x^2+8x+17$
