# Find the remainder of a high degree polynomial

If $$f(x)=(x-1)^{2017}+(x-3)^{2016}+x^2+x+1$$ and $$g=x^2-4x+4$$ find the remainder of f divided by g. I only found that $$g=(x-2)^2$$ but I don't know how to go further. If I set $$x=2$$ then $$f(2)=9$$ How to use this? Typo:$$f(2)=9$$

• A polynomial $f(x)$ is divisible by $(x-2)^2$ iff $f(2)=f'(2)=0$. – Lord Shark the Unknown May 27 at 16:45
• If $f(x)=(x-2)^2q(x)+ax+b$, then $f(2)=a\cdot 2+b$ and $f'(2)=a$. This because the polynomial $(x-2)^2q(x)$, having $x=2$ as a root of order at least $2$ must vanish at $x=2$ and so should its derivative. – logarithm May 27 at 16:45
• If derivatives are unknown then use the Binomial Therem to expand in terms of $\, t = x-2,\,$ i.e. $\, f = (t+1)^{2017} + (t-1)^{2016} + \cdots = a + bt + t^2(\cdots)\ \$ Is there a typo in the exponents - are they meant to differ? – Bill Dubuque May 27 at 16:56
• Yes, it's 2017 and 2016. – Andrei May 27 at 16:58
• Then $\,f(2) = 9,\,$ not $7\ \$ – Bill Dubuque May 27 at 17:00

We have $$f(x)=(x-2)^2P(x)+ ax+b$$, and we wish to find $$a, b$$. As you’ve already found, $$f(2)=9$$, so we also have $$2a+b=9$$.
The trick here is to differentiate $$f(x)$$ to obtain $$f’(x) = 2(x-2)P(x) + (x-2)^2P’(x) + a$$. Substituting $$x=2$$ gives $$a=f’(2)$$. Computing this, we obtain $$a=6$$. Thus $$b=-3$$ and we’re done.
• No, correct is $\ 9 = f(2) = 2a+b = 12+b,\,$ so $\, b = -3\ \$ – Bill Dubuque May 27 at 20:12