# finding the remainder of $x^{100}-2x^{51}+1$

I have never been great with polynomials. Here's my problem.

Find the remainder of $f(x)=x^{100}-2x^{51}+1$ when $f$ is divided by $x^2-1$

This sounds easy right? Why can't I figure it out? My thought was to try and create it such that $f(x)=q(x)g(x)+r(x)$. But I can not get past getting $deg[r(x)]<deg[g(x)].$

$$f(x)=x^{100}-2x^{51}+1$$ $$=x^{100}-x^{51}-x^{51}+x^2-x^2+1$$ $$=x^{51}(x^{49}-1)-x^2(x^{49}-1)-x^2+1$$ $$=(x^{51}-x^2)(x^{49}-1)-x^2+1$$ $$=x^2(x^{49}-1)(x^{49}-1)-x^2+1$$ $$=x^2[(x^{49}-1)^2-1]+1=?.......$$ I don't see what I am missing

This is the standard approach, especially if you know the roots of the divisor.

Let $f(x) = x^{100} - 2x^{51} + 1$, and $f(x) = g(x) (x^2-1) + ax + b$ be the division

Then, $0 = f(1) = g(1) ( 1^2 - 1) + a (1) + b = a + b$,
and $4 = f(-1) =g(-1) ( (-1)^2 -1) + a(-1) + b = -a + b$.

Hence $a= -2, b = 2$.

Thus the remainder is $-2x+2$.

• I like that. I've never seen it done like that before. That is great! – Eleven-Eleven Apr 18 '13 at 22:57
• @ChristopherErnst You should review the Remainder-Factor Theorem. This is a standard application of it. For more questions, you can check this out. – Calvin Lin Apr 18 '13 at 22:58
• So basically depending on the degree of your particular divisor, if say $deg[g(x)]=3$ you set your remainder to $ax^2+bx+c$ and take one more value and solve the system for a,b,and c. – Eleven-Eleven Apr 18 '13 at 23:25
• @ChristopherErnst Correct. This way is direct and you are simply solving linear equations, though it assumes that you can find the roots of $g(x)$. Of course, there are other ways to approach these kind of polynomial remainder problem, like the other (deleted) solution. – Calvin Lin Apr 18 '13 at 23:34
• Very nice. This way is particularly nice should the divisor factor into nice linear terms with real solutions like the one in the problem. Can this be extended when there are complex factors in our divisor? – Eleven-Eleven Apr 18 '13 at 23:42

Hint $\ \,$ Interpolate the remainder $\rm\:r(x)\:$ at the roots $\rm\:\color{#c00}{x = \pm1},\:$ where $\rm\ r(\pm1)\, =\, f(\pm1)$

$$\qquad\ \ \begin{eqnarray} &&\rm\ \ r(x) &=\,&\rm f(x) - (\color{#c00}{x^2\!-\!1})\, q(x),\ \ \ deg\ r < 2\\ \\\Rightarrow\, &&\rm 2\, r(x) &=\,&\rm f(1)\, (x\!+\!1) - f(-1)\, (x\!-\!1)\end{eqnarray}$$

Remark $\$ Or, equivalently, use Chinese Remainder (CRT) to solve

$$\begin{eqnarray}\rm r(x) &\equiv&\rm \ \ \ f(1) &&\rm\ (mod\ \color{#c00}{x-1}) \\ \rm r(x)&\,\equiv\,&\rm f(-1)&&\rm\ (mod\ \color{#c00}{x+1})\end{eqnarray}$$

Generally, as here, Lagrange interpolation is a special case of CRT.