4

A cubic polynomial gives remainders $(13x-2)$ and $(-1-7x)$ when divide by $x^2-x-3$ and $x^2-2x+5$ respectively. Find the polynomial.

I have written this as:

$P(x)=(x^2-x-3)Q(x)+(13x-2)$

$P(x)=(x^2-2x+5)G(x)+(-1-7x)$

and

$P(x)=ax^3+bx^2+cx+d$

The first method I thought about is factoring $(x^2-x-3)$ and $(x^2-2x+5)$ so that I could find roots and thereby $P(root)$ would equal the reminder for the given value of root. As the two quadratic equations would give four roots i.e. four values I can substitute, I would be able to calculate all the four constant $a$, $b$, $c$ and $d$. However, the first polynomial has very ugly roots and the second one has no real roots so I guess I should find another way. What do you suggest?

2 Answers2

4

Using the Extended Euclidean Algorithm as implemented in this answer, we get $$ \begin{array}{r} &&1&x+6&(x-8)/53\\\hline 1&0&1&-x-6&(x^2-2x+5)/53\\ 0&1&-1&x+7&(-x^2+x+3)/53\\ x^2-x-3&x^2-2x+5&x-8&53&0\\ \end{array} $$ That is, $$ (x+7)(x^2-2x+5)-(x+6)(x^2-x-3)=53\tag{1} $$ We can now use the Chinese Remainder Theorem. $(1)$ tells us that $$ \frac{x+7}{53}\,(x^2-2x+5)\equiv \left\{\begin{array}{} 0&\pmod{x^2-2x+5}\\ 1&\pmod{x^2-x-3} \end{array}\right.\tag{2} $$ $$ -\frac{x+6}{53}\,(x^2-x-3)\equiv \left\{\begin{array}{} 1&\pmod{x^2-2x+5}\\ 0&\pmod{x^2-x-3} \end{array}\right.\tag{3} $$ Add $13x-2$ times $(2)$ and $-1-7x$ times $(3)$ to get $$ \frac1{53}\left(20x^4+99x^3-185x^2+338x-88\right)\tag{4} $$ taking the remainder of $(4)$ mod $(x^2-x-3)(x^2-2x+5)$ gives $$ 3x^3-5x^2+6x+4\tag{5} $$

robjohn
  • 345,667
  • good. I had gotten as far as the $x+7$ and $x+6$ and the $53.$ I think this ought to be part of the lesson, that this is CRT. – Will Jagy Apr 20 '16 at 18:29
  • 1
    @WillJagy: I have added a mention that $(2)$ and $(3)$, which follow from $(1)$, can be used with the Chinese Remainder Theorem. – robjohn Apr 20 '16 at 18:40
  • very nice. I had not even noticed that crt gives a quartic, and a final reduction is needed to get down to cubic. Also, Barcelona 4, Deportivo 0, 54th minute – Will Jagy Apr 20 '16 at 19:10
2

Since your $P(x)$ is cubic, $Q(x)$ and $G(x)$ are linear. So $$(x^2 - x - 3) (q_1 x + q_0) + (13 x - 2) = (x^2 - 2 x + 5)(g_1 x + g_0) + (-1 - 7 x)$$ Expanding and equating coefficients of like powers, you get four equations in the four unknowns $q_0, q_1, g_0, g_1$.

Alternatively, find the remainder (in terms of $q_1$ and $q_0$) on dividing $(x^2-x-3)(q_1 x + q_0) + 13x-2$ by $x^2-2x+5$, set this equal to $-1-7x$, and solve two equations for $q_0$ and $q_1$.

Robert Israel
  • 448,999
  • +1 though irritated that you just scooped me! – almagest Apr 20 '16 at 17:16
  • Thanks for the answer. I have made an appropriate system of equations and solved it but my results differ from those from the answers in my textbook. I got $3x^3-2x^2+3x+1$ (confirmed by WolframAlpha: http://m.wolframalpha.com/input/?i=%28x^2-x-3%29%28ax%2Bb%29%2B13x-2%3D%28x^2-2x%2B5%29%28cx%2Bd%29-1-7x&x=0&y=0 ) but according to the textbook the answer is $3x^3-5x^2+6x+4$ could you please verify if I have done this correctly? – Richard Smith Apr 20 '16 at 18:03
  • It's easy enough to check. The remainders on dividing $3x^3 - 2x^2 + 3 x + 1$ by $x^2-x-3$ and $x^2 -2x+5$ are $13x+4$ and $-4x-19$ respectively. So you must have done something wrong. The textbook's answers are correct. – Robert Israel Apr 20 '16 at 19:46