Algebra Precalculus – Remainder When Dividing Polynomial by Quadratic

algebra-precalculuscontest-mathpolynomials

I'm currently working through the introductory materials for an online math olympiad class, and I saw this problem:

Given a polynomial $P(x)$, compute the remainder of $P(x)$ when divided by $(x-a)(x-b)$ in terms of $a,b,P(a),P(b)$

I didn't really know any algorithm for doing this, so I just used some intuition about dividing a polynomial by a linear term. If I was just dividing $P(x)$ by $(x-a)$, I know the remainder is $P(a)$, and we might see this expressed as $P(x)=(x-a)Q(x)+P(a)$ for some polynomial $Q(x)$. So I tried to generalize this to dividing by a quadratic term. I figured we'd have something in the form $P(x)=(x-a)(x-b)Q(x)+R(x)$, where $R(x)$ is a linear polynomial, and also the remainder.

I figured, since we have two degrees of freedom for $R(x)$ (since it must be linear.) I guessed I could determine $R(x)$ by making sure the equation $P(x)=(x-a)(x-b)Q(x)+R(x)$ was satisfied at $x=a$ and $x=b$. This means we want $P(a)=R(a)$ and $P(b)=R(b)$. The gives us exactly one line for $R(x)$, which is:

$$R(x)=\frac{P(a)-P(b)}{a-b}(x-a)+P(a)$$

And I'm pretty sure this is the correct remainder, but I'm not satisfied with my answer for two reasons. First, it looks really messy. And furthermore, I feel like there must be a simpler way to do this. I have no idea how I'd generalize this to division by cubics or quartics (Not that it's part of the problem, but it's a natural extension of it,) which usually means there's a simpler approach.

My question: Is there more to this? Am I missing a more general method?

Thank you!

Note: Some may complain that this is a homework question, but I'd like to point out that 1. I already have the answer, I just want to know if there's a better solution, and 2. This problem isn't even required and I'm not getting a meaningful grade out of this.

Best Answer

If you write it as $\frac{x-b}{a-b}P(a) + \frac{x-a}{b-a}P(b)$, it becomes easier to see how to generalize it to higher degrees.

For 3 variables, you would get

$$R(x) = \frac{(x-b)(x-c)}{(a-b)(a-c)}P(a) + \frac{(x-a)(x-c)}{(b-a)(b-c)}P(b) + \frac{(x-a)(x-b)}{(c-a)(c-b)}P(c)$$

All you have to do is note that $R(a) = P(a)$, $R(b) = P(b)$, $R(c) = P(c)$ and, since only one such quadratic can exist, this is the one.

Related Question