# Finding coefficients in polynomials

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$$.

• I suspect that you mean $x^3-2x^2+px+q$. Otherwise there is no need for $q$. – Dietrich Burde Sep 27 '18 at 18:54
• Hint: Compute $\left(x^2+x-2\right)(x-3)$ – robjohn Sep 27 '18 at 19:51
• By Remainder thm $f(1)=f(2)=0$ and solve. Or perform synthetic division. – Narasimham Sep 27 '18 at 22:05
• @Sherma You sholud accept one of answers you get. – Aqua Sep 28 '18 at 14:57
• I accept Greedoid's answer. questions should be x^3-2x^2+px+q – Sherma Oct 1 '18 at 15:05

## 5 Answers

Hint: If $$x-a$$ divide $$P(x)$$ then $$P(a)=0$$, so

since $$x^2+x-2=(x+2)(x-1)$$ divide $$P(x)= x^3-2x^2+p+q$$ we have $$P(-2)=0$$ and $$P(1)=0$$

• Yeah, you are right. @bobajob – Aqua Sep 28 '18 at 9:28

Or you can use Vieta formulas: You find $$x_1=-2$$ and $$x_2=1$$ so, since $$x_1+x_2+x_3 = 2\implies x_3= 3$$

so $$p = x_1x_2+x_2x_3+x_3x_1=...\;\;\;{\rm and}\;\;\;q =-x_1x_2x_3 = 6$$

Hint: Multiply out $$(x^2+x-2)(x-a)=x^3-2x^2+px+q$$ and compare coefficients.

For the polynomial $$x^3-2x^2+px+q$$ the comparison gives a solution, namely $$a=3$$, $$p=-5$$ and $$q=6$$. For the above polynomial (with typo) there is no solution.

• Thanks much "no solution". Maybe teacher had a typo in posting the question. Thanks much – Sherma Sep 27 '18 at 19:05
• @Sherma You could just correct the typo in your question, then it works. – Dietrich Burde Sep 27 '18 at 19:17

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.

• How about $p=-5$ and $q=6$? – Toby Mak Sep 27 '18 at 22:10

One can also reduce $$x^3 - 2 x^2 + p x + q$$ modulo $$x^2 + x - 2$$ and then demand that the resulting polynomial is identical to zero. This then means that all the coefficients of that polynomial are zero, and that yields the solution. Modulo $$q(x) = x^2 + x - 2$$ we have:

$$x^2 \bmod q(x)= -x + 2$$

and

$$x^3 \bmod q(x)= \left(-x^2 + 2 x\right) \bmod q(x) = 3 x-2$$

Therefore:

$$\left(x^3 - 2 x^2 + p x + q\right) \bmod q(x) = (5+p) x + q-6$$

which implies that $$p = -5$$ and $$q = 6$$.