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