Finding coordinate vector for a polynomial in P3 relative to a given ordered basis

linear algebraself-learningvector-spaces

Find the coordinate vector of $x^3 + 3x^2 – 4x + 2$ relative to ordered basis $(x, x^2 – 1, x^3, 2x^2)$.
My answer is $(-4, -2, 1, 5/2)$ while the textbook says it is $(-4, -2, 1, 5)$. Was wondering if my answer is correct or the textbook's is. I feel quite familiar with the process of finding a coordinate vector and was certain my answer was correct but I might be missing something.

Best Answer

$$-4x -2(x^2-1) + x^3 +5(2x^2) = x^3 + 8x^2 -4x +2$$

$$-4x -2(x^2-1) + x^3 +\dfrac52(2x^2) = x^3 + 3x^2 -4x +2$$

You are right.