# Remainder Theorem Problem

When the polynomial $p(x)$ is divided by $(x^2+3x+2)$ the remainder is $5x+1$. Find the remainder when $p(x)$ is divided by $(x+2)$.

I get that $(x+2)$ is a factor of $(x^2+3x+2)$ but I'm not sure how to use that fact to get the question's answer.

• The remainder when 10 is divided by 6 is 4. What is the remainder when 10 is divided by 2? By 3? (Hints: 2 and 3 are factors of 6.) – symplectomorphic Aug 19 '17 at 16:07
• – lab bhattacharjee Aug 19 '17 at 16:09
• More hints: if $x$ has remainder $r$ when divided by $z$, then $x=yz+r$. So if you divide $x$ by a factor of $z$... – symplectomorphic Aug 19 '17 at 16:09

Write $$p(x)= q(x)(x+1)(x+2)+5x+1$$ Put $x=-2$ and you get $p(-2) = -9$. So remainder when $p(x)$ is divided by $x+2$ is $-9$.

There is polynomial $q$, for which: $$p(x)=q(x)(x+1)(x+2)+5x+1=q(x)(x+1)(x+2)+5x+10-9,$$ which gives the answer: $$-9$$

Think of it this way:

$p(x)$ divided $x^2 + 3x + 2$ has remainder $5x+1$ means:

$$p(x) = q(x)(x^2 + 3x + 2) + 5x+1$$ where $q(x)$ is a polynomial.

But we have $x^2 + 3x + 2$ so

$$p(x) = q(x)(x+1)(x+2) + 5x + 1$$

$$= s(x)(x+2) + 5x+1$$

Where $s(x) = q(x)(x+1)$

So we just need the divide $5x + 1$ by $x+2$ to get $5x + 1 = t(x)(x+2) + r(x)$.

As $5x + 1 = 5(x+2) - 9$ we have

$$p(x) = q(x)(x+1)(x+2) + 5(x+2) - 9$$

$$= [q(x)(x+1) + 5](x+2) - 9$$.

And the remainder is $9$.

===

This is actually the exact same logic as it would be with numbers.

If $M$ divided by $36$ has remainder $17$, then what is the remainder of $M$ divided by $12$.

As $12$ divides $36$ we know that $12$ will divide "just as evenly" as $36$ and the remainder will be the same $17$ but further divided by $12$ to have remainder: $5$.

Formally: $$M = k*36 + 17$$

$$= (3k)*12 + (12 + 5)$$

$$= (3k+1)*12 + 5$$.

The remainder is $5$ because the remainder of $17$ is $5$.

It's no different with polynomials.

There remainder is $-9$ because the remainder of $5x + 1$ is $-9$.

\ \ \begin{align}p\ &\equiv\,\ 5\,\ x\,\ +\ 1\!\!\pmod{\!(x + 2)f}\quad\ \ [\,f = x + 1\rm \ \ in\ OP\,]\\ \Rightarrow\ \ p\ &\equiv\,\ 5\ \,\color{#c00}x\,\ +\ 1\!\!\pmod{\color{#0a0}{x+2}}\\ &\equiv\, 5(\color{#C00}{-2})\!+ 1\quad {\rm by}\quad\, \ \color{#0a0}{x + 2}\equiv 0\,\Rightarrow\, \color{#c00}{x\equiv -2} \end{align}

Remark  Sometimes authors write such congruences as $\!\!\pmod{\color{#c00}{x\equiv -2}}\,$ to make such evaluations clearer. The 2nd line uses the fact that congruences always persist mod factors of the modulus by $$\,p\equiv q\!\!\pmod{\!mn}\,\Rightarrow\, \underbrace{m\mid mn\mid p-q\,\Rightarrow\, m\mid p-q}_{\large\text{\it{transitivity} of divisibility}}\,\Rightarrow\,p\equiv q\!\!\pmod{\!m}$$