# Determine remainder when dividing polynomials if we know other remainders

If 3 is the remainder when dividing $P(x)$ with $(x-3)$, and $5$ is the remainder when dividing $P(x)$ with $(x-4)$, what is the remainder when dividing $P(x)$ with $(x-3)(x-4)$?

I'm completely puzzled by this, I'm not sure where to start...

Any hint would be much appreciated.

Hint: $$P(x)=Q(x)(x-3)(x-4)+Ax+B$$ $$P(3)=3$$ $$P(4)=5$$

Can you solve for $A$ and $B$?

Let $$P(x)=(x-4)(x-3)Q(x)+ax+b$$

Now you have $$3a+b=3$$ and $$4a+b=5$$ So solve for $a$ and $b$.

• Thank you!! I only accepted the other answer because he posted first. – kok_nikol Nov 26 '16 at 18:27
• @kok_nikol You haven't accepted anything: you just upvoted one answer. You can upvote all the answers you find informative, good and helpful . Then you will accept only one: the best for you, which is not necessarily the first one, of course. – DonAntonio Nov 26 '16 at 18:34
• @DonAntonio Sorry, you can't accept an answer right away, you have to wait 10 minutes. And I can't upvote yet because I don't have enough reputation. – kok_nikol Nov 27 '16 at 0:26
• @kok_nikol Perhaps, yet you did not accepted anything when I first commented. I thought posters can upvote answers to their questions. – DonAntonio Nov 27 '16 at 0:30
• @DonAntonio Yes, when you commented I hadn't yet accepted anything. As for the voting Votes cast by those with less than 15 reputation are recorded, but do not change the publicly displayed post score. – kok_nikol Nov 27 '16 at 0:37

If you carry out the division you should be able to show that $$P(x)=Q(x)(x-3)(x-4)+R(x)$$

Two questions: What is the maximum degree of the remainder $R(x)$? Can you see how to use the remainder theorem for the cases $x=3,4$ that you know already so that $Q(x)$ becomes irrelevant?

Euclidean division by $(x-3)(x-4)$ can be written as $$P(x)=(x-3)(x-4)Q(x)+R(x),\quad\deg R(x)\le1.$$ Instead of writing $R(x)$ with the standard basis $\{1,x\}$, use the basis $\{x-3,x-4\}$. Thus $$P(x)=(x-3)(x-4)Q(x)+A(x-3)+B(x-4)$$ Setting $x=3$, you get right away $B=-P(3)=-3$. Similarly $A=P(4)=5$, and finally $$R(x)=5(x-3)-3(x-4)=2x-3.$$

This formula can be generalised: the remainder when dividing a polynomial $P(x)$ by $(x-a)(x-b),\enspace a\ne b$, is $$R(x)=\frac1{b-a}\Bigl[P(b)(x--a)-P(a)(x-b)\Bigr]=\frac1{b-a}\begin{vmatrix}x-a&x-b\\[1ex]P(a)&P(b)\end{vmatrix}.$$

Notice $\ p\, = 3+(x\!-\!3)q\,\$ by $\,\ p(3) = 3$

$5 = p(4) = 3+q(4)\,\Rightarrow\, {\color{#c00}2}\, =\, q(\color{#0a0}4) \,$

Hence $\, p = 3 + (x\!-\!3)(\underbrace{\color{#c00}2+(x\!-\!\color{#0a0}4)r}_{\Large q}\!)\, =\, 2x\!-\!3\, +\, (x\!-\!3)(x\!-\!4)r$