TITLE: Finding coefficients in polynomials
QUESTION [8 upvotes]: Find $p$ and $q$, if $x^3-2x^2+p+q$ is divided by $x^2+x-2$.
I have found $x =-2$ and $x=1$ however when placed into polynomial I am unable to find a value for $p$ and $q$.

REPLY [5 votes]: Precalculus tag, people.
Assuming the typo fix, you can simply do long division directly. Maybe you're learning synthetic division, which is probably easier, but I haven't done it since high school so I forget the details.
              x   -    3
            _____________________
x^2 + x - 2 | x^3 - 2x^2 + px + q
              x^3 +  x^2 - 2x
            - _______________
                   -3x^2 + (2+p)x + q
                   -3x^2 - 3x     + 6
                 - __________________
                           (5+p)x + (q-6)

We want that final expression on the bottom to equal $0$ so there's no remainder.