# Error in predicting remainders

I recently came across the problem

What is the remainder when $x^5 + 2x^4 -3x^2 + 2x -4$ is divided by $(x^2 + 2x)$?
a. $x^3 - 3$
b. $8x - 4$ Correct answer
c. 4
d. $2x-4$
e. $20x$

And I attempted to solve using the remainder theorem (the textbook advised plugging in numbers, instead of actually using synthetic/polynomial division to solve for multiple choice questions). However, I soon found that smaller numbers didn't give me accurate results. My method of solving (and the way the textbook told me to solve) was to choose a random value for $x$. I chose 3. Then, plug 3 into both equations:

$3^5 + 2(3)^4 -3(3)^2 + 2(3) -4$ is divided by $((3)^2 + 2(3))$

Then, I solved:

$\frac{3^5 + 2(3)^4 -3(3)^2 + 2(3) -4}{(3)^2 + 2(3)} = 25\frac{2}{3}$

Then I took the remainder ($\frac{2}{3}$) and multiplied it by the divisor to get the remainder:

$\frac{2}{3} * ((3)^2 + 2(3)) = \frac{1}{3}$

Therefore, when you set $x = 3$, you get a remainder of $\frac{1}{3}$. The textbook then told me to plug in the value I set x to into all the choices, until I found a value that was equal to the remainder, so when $x=3$:

a. $x^3 - 3$ -> 24
b. $8x - 4$ -> 20
c. 4 -> 4
d. $2x-4$ -> 2
e. $20x$ -> 60

None of these values match up with the remainder I ended up with. The same issue happened when I tried $x=4$ and $x=5$. I ended up making a table to see what numbers I plugged in would result in an "accurate" remainder:

All the numbers in red are "inaccurate" remainders (in the sense that their value doesn't match up with the value of the remainder given by the correct solution, $8x-4$. I looked in the textbook for an explanation and it said:

Plug in! Because you want remainders, you want to choose a larger value of x. Make x = 10. Putting x into both statements, you find that you want the remainder when 119,716 is divided by 120. A trick to find the remainder at this point is to do the division in your calculator: you find that $\frac{119,716}{120} = 997.633$. Subtract what comes before the decimal, so your calculator reads 0.633. Then multiply by what you divided by: $0.633 * 120 = 76$, which is your remainder. Finally, plug $x=10$ into each answer choice, looking for one that equals 76. The only choice that works is (B).

The textbook seems to say that because I want to find the remainder, I need to plug in a larger value for this method to work. My table also shows this. In order to see if this was a one time occurrence, I made the same chart for the question:

What is the remainder when $x^3 + 2x^2 - 27x + 40$ is divided by $(x-3)$
a. 4 Correct Answer
b. 16
c. $2x + 2$
d. $x^2-5$
e. $x^2+5x-12$

The correct answer is 4. The chart below shows the remainder calculated vs. the remainder that is the answer (4). The values that don't match up are once again in red. Please note that I removed 3 from the table because it was a root of the equation, so the results weren't useful for my purposes.

In summary, does the remainder theorem not work for smaller values or does the method of my textbook not work for smaller values. If the latter, what is a better method that is still feasible under a short time limit (SAT 2 Subject Test).

Edit:I realized the remainder theorem is working (I'm getting the correct remainder), so it isn't the remainder theorem that is the problem. What explains the difference between the actual remainder and the remainder predicted by the answer of the textbook?

• @Masacroso Your comment made me realize that the issue doesn't lie with the remainder theorem, but with the solution/method of the textbook. What is the reason for this difference? – Eric Wiener Dec 18 '16 at 4:15
• Don't know that I like that textbook's advice. In both cases it is far easier to actually calculate the remainder (in any of a number of ways) than try to "guess" it. In the latter case, the remainder of any polynomial $P(x)$ divided by $x-3$ is always $P(3)$. – dxiv Dec 18 '16 at 4:18
• Wow, the textbook's solution is really terrible. It happens that their method works as long as you choose $x$ large enough (and the polynomials have integer coefficients and the polynomial you're dividing by is monic), but they haven't given any justification that the $x$ they have chosen is large enough in this particular problem. – Eric Wofsey Dec 18 '16 at 4:22

Let's figure out what the textbook's method here is actually doing. You have a polynomial $f$ with integer coefficients and you want to divide it by some monic polynomial $g$ with integer coefficients and find the remainder. That is, you are finding the unique polynomials $q$ and $r$ with $\deg r<\deg g$ such that $$f(x)=q(x)g(x)+r(x)\tag{1}$$ (it turns out that the assumptions here guarantee that $q$ and $r$ have integer coefficients).

Now what the textbook says to do is pick some integer value $x=a$ and plug it in and do ordinary integer division with remainder of $f(a)$ and $g(a)$. That is, you find the unique integers $s$ and $t$ with $0\leq t<g(a)$ and $$f(a)=sg(a)+t.\tag{2}$$ The textbook's method would then claim that $t=r(a)$, so if you can compute $t$ and have multiple choice options for $r$, you can test your options to see which one satisfies $r(a)=t$.

Now, why would this be true? Well, plugging in $x=a$ in equation (1) above we have $$f(a)=q(a)g(a)+r(a),$$ where $q(a)$ and $r(a)$ are integers (since $a$ is an integer and $q$ and $r$ have integer coefficients). Now if $r(a)$ happens to satisfy $0\leq r(a)<g(a)$, then $q(a)$ and $r(a)$ will satisfy the requirements of $s$ and $t$ in equation (2). Since the $s$ and $t$ satisfying these requirements are unique, this means that actually $q(a)=s$ and $r(a)=t$.

So the textbook's method works as long as you choose $a$ such that $0\leq r(a)<g(a)$. In general, however, there's no reason that this will be true for arbitrary $a$. Since $g$ has degree strictly larger than $r$ and the leading coefficient of $g$ is $1$ (in particular, it is positive), $g(a)>r(a)$ for all sufficiently large $a$. If the leading coefficient of $r$ is also positive, then $r(a)\geq 0$ for sufficiently large $a$, and so $0\leq r(a)<g(a)$. So in the case that the leading coefficient of $r$ happens to be positive, this method will work as long as you pick $a$ to be big enough. But, as you have found by experimentation, the method typically won't work for small $a$.

However, all is not lost! While it's not always true that $r(a)=t$, it is always true that that $$r(a)\equiv t\pmod{g(a)}.$$ Indeed, since $$f(a)=sg(a)+t=q(a)g(a)+r(a),$$ $r(a)-t=(s-q(a))g(a)$ so $r(a)-t$ is divisible by $g(a)$. So even when $t$ does not give the correct value for $r(a)$, it still tells you what the remainder of $r(a)$ must be mod $g(a)$. For instance, in your example where you plugged in $x=3$, you learn that $r(3)\equiv 5\pmod{15}$. From the given multiple choice options, the correct answer is actually the only one that satisfies this congruence. So you could still use this variant on the textbook's method to quickly find the right answer in this case using $x=3$.

• Thanks. This really helped. – Eric Wiener Dec 18 '16 at 4:48

Much easier (and deterministic) is the following. Dividing $\,f(x)\,$ by $\,x^2+2x= x(x+2)\,$ yields

$$f(x)\, =\, q(x)\, x(x+2) + r(x)$$

thus $\ f(0) = r(0)\$ and $\, f(-2) = r(-2)\$ and these values uniquely determine the remainder $\,r(x)\,$ since it has degree $\le 1.$

• Thanks for the answer. Helped a ton! I really need to invest in a better textbook. – Eric Wiener Dec 18 '16 at 4:31
• Any idea why the textbook's method doesn't work? – Eric Wiener Dec 18 '16 at 4:34
• $\frac{3^5 + 2(3)^4 -3(3)^2 + 2(3) -4}{(3)^2 + 2(3)} = 25\frac{2}{3}$ (BTW, the fractional part is $\dfrac 13$ not $\dfrac 23$), won't work because division of polynomials does not really correspond to division by their values at specific points. – steven gregory Dec 18 '16 at 13:28

First you need to clearly know what the remainder theorem is. So if you know that, then you will realise that what you are doing is not in accordance with the theorem. As for the second problem, the application of remainder theorem strictly implies putting x = 3 in the given polynomial and the value of the polynomial for x = 3 give the remainder required. Further you need to realise that what you are doing is actually treating the division as some kind of an equation. The first problem will be solved just as I have shown below:

$$x^5 + 2x^4 -3x^2 + 2x -4= (x^2+2x)Q (x)+R (x)$$

Your job is to find the remainder $R (x)$. As per the remainder theorem, we observe that for x = $- 2$ and $x = 0$ the quotient term becomes $0$. Hence we get, $$R (0)=-4$$ $$R (-2)=-2^5 + 2\cdot 2^4 -3\cdot 2^2 - 2\cdot 2-4=-20$$

One thing that I missed to say earlier is that the degree of the remainder is always at least 1 less than that of the divisor so in this case the remainder will be linear in nature.

Say $R (x)=Ax+B$

This implies $$B=-4$$ $$-2A-4=-20 \implies A=8$$

So $$\boxed {R (x)=8x-4}$$

Thus I would directly recommend you to apply the remainder theorem as I have done to obtain the required result instead of following what your text book has asked you to do.

Hope this helps you.

• This does help a lot. However, I'm still unclear on why the textbook's method didn't work. – Eric Wiener Dec 18 '16 at 4:42