# Finding polynomial $p(x)$ when it leaves remainders $1$ and $2$ when divided by $x^{100}$ and $(x-2)^3$.

Find a polynomial $p(x)$ that simultaneously satisfies the following properties:

(i) When $p(x)$ is divided by $x^{100}$ the remainder is the constant polynomial $1$.

(ii) When $p(x)$ is divided by $(x − 2)^3$ the remainder is the constant polynomial $2$.

We can write $p(x)=x^{100}g(x)+1=(x-2)^3h(x)+2$ for some polynomial $g$ and $h$.

Then, $p'(x)=x^{99}\left(xg'(x)+100g(x)\right)=(x-2)^2\left((x-2)h'(x)+3h(x)\right)$,

whence $p'$ is divisible by $x^{99}$ and $(x-2)^2$. So $p'$ is also divisible by $x^{99}(x-2)^2$.

Let $p'(x)=x^{99}(x-2)^2f(x)$ for some polynomial $f$.

Then, $p(x)=f(x)\displaystyle\int x^{99}(x-2)^2\,dx=f(x)\left(\frac{x^{102}}{102}-\frac{4x^{101}}{101}+\frac{4x^{100}}{100}\right)+c$

Now, $p(0)=1\Rightarrow c=1$ and $p(2)=2\Rightarrow f(2)\left(\dfrac{2^{102}}{102}-\dfrac{4\times2^{101}}{101}+\dfrac{4\times2^{100}}{100}\right)+1=2,$

from which I get $f(2)$ and hence $f(x)$ (since I assumed $f$ is constant). Therefore I find $p(x)$.

But is there a justification of treating $f$ as a constant or was it a mistake on my part?

I would particularly like to know what are all different ways to solve problems like this? I know it can be solved using the Chinese remainder theorem. Would that be the simplest way to proceed?

EDIT. This is a similar question where the remainders are non-constant polynomials.

## 2 Answers

In general, the Chinese Remainder Theorem is a certain way to go. Other tricks usually have limitations.

Let $K$ be a field of characteristic $0$ (this answer is probably good in other characteristics, but I am not going to think about them). In your particular case, you have two polynomials of the form $$P(x)=(x-a)^m\text{ and }Q(x)=(x-b)^n$$ for some integers $m,n>0$ and $a,b\in K$ with $a\neq b$ (as an exercise, you should try to see why your trick does not work when there are more than two such divisor polynomials). You know that the general form of a polynomial $f(x)$ which gives the remainder $r\in K$ when divided by $P(x)$ and which gives the remainder $s\in K$ when divided by $Q(x)$ must take the form $$f(x)=M(x)\,u(x)+v(x)\,,$$ where $M(x):=P(x)\, Q(x)$, and $u(x)$ and $v(x)$ are polynomials in $K[x]$ with $$\deg\big(v(x)\big)\leq m+n-1\,.$$ Now, it is easily seen that the degree of $v'(x)$ is at most $m+n-2$. As $v'(x)$ must be divisible by $(x-a)^{m-1}$ and $(x-b)^{n-1}$, it is divisible by $(x-a)^{m-1}\,(x-b)^{n-1}$. This means $$v'(x)=c\,(x-a)^{m-1}\,(x-b)^{n-1}$$ for some constant $c\in K$. This is a justification for your attempt, and most likely will not work in general, for example, when $r$ and $s$ are replaced by nonconstant polynomials $R(x)$ and $S(x)$.

• Could you tell me what are the possible degrees of $p$? – StubbornAtom Aug 29 '16 at 19:14
• Anything above and including $102$. – Batominovski Aug 29 '16 at 19:32

As a compulsory ad hoc trick let me first proffer:

We know that $(x-2)\mid (x^{100}-2^{100})$, so $(x-2)^3$ is a factor of $$q(x):=(x^{100}-2^{100})^3=x^{300}-3\cdot2^{100}x^{200}+3\cdot2^{200}x^{100}-2^{300}.$$ Therefore $q(x)\cdot2^{-300}$ has remainder $-1$ when divided by $x^{100}$ and remainder $0$ when divided by $(x-2)^3$. This means that $$p(x)=2+\frac{q(x)}{2^{300}}$$ will work.

OTOH if you want to find the lowest degree polynomial $p(x)$ then I would bail out with solving for the unknown coefficients of $p(x)=1+a_0x^{100}+a_1x^{101}+a_2x^{102}$ from the constraints $p(2)=2, p'(2)=p''(2)=0$. There are three constraints coming from the remainder modulo $(x-2)^3$, so we need three unknown coefficients in $p(x)$

• Sneakily exploiting the fact that the question asks for a polynomial $p(x)$ :-> IOW I do endorse Batominowski's take on the problem. – Jyrki Lahtonen Aug 29 '16 at 13:19
• How come $p(x)$ is not unique? – StubbornAtom Aug 29 '16 at 17:40
• @StubbornAtom $p(x)$ is only unique modulo $x^{100}(x-2)^3$. You see that I added a high degree multiple of that :-) – Jyrki Lahtonen Aug 29 '16 at 18:02
• I know it's a little late to ask but do you think $f$ can be treated as a constant and if so, why? – StubbornAtom Sep 16 '16 at 14:33