<s>[INST] Polynomial division remainder Given the polynomials $f,g,h \in \mathbb{R}\left[X\right]$ with $$f=(x-1)^n-x^n+1$$ $$g=x^2-3x+2$$ $$h=x^2-x$$ where $n\ge3$
Find the remainder of dividing the polynomial f to g. Prove that if $n$ is odd, $h$ divides $f$ with no remainder.
I noticed that the three polynomials have a common root in $x=1$ meaning I can write all three of them like $(x+1)*p(x)$, thus having no remainder. I don't know if this helps me though. How do I solve this?
 [/INST] Use the remainder theorem: for any polynomial $p(x)$, the remainder when dividing it by $x - a$ is given by $p(a)$.
Notice that $f(1) = 0$, so $x - 1$ divides evenly into $f(x)$. Therefore, for some $p(x)$, we may write,
$$f(x) = (x - 1)p(x).$$
Further, since $f(2) = p(2)$ is the common remainder when dividing both $p(x)$ and $f(x)$ by $2$, we can write,
$$p(x) = q(x)(x - 2) + p(2) = q(x)(x - 2) + f(2),$$
for some $q(x)$. Therefore,
$$f(x) = (x - 1)(q(x)(x - 2) + f(2)) = (x^2 - 3x + 2)q(x) + f(2)(x - 1).$$
When dividing $f(x)$ by $x^2 - 3x + 2$, we therefore get a remainder of,
$$f(2)(x - 1) = (2 - 2^n)(x - 1).$$
The second question is far more simple. Since $x^2 - x = x(x - 1)$, we just need to individually verify that $x$ and $x - 1$ divide evenly into $f(x)$ when $n$ is even. We do this by verifying $f(0) = f(1) = 0$. Notice that $f(1) = 0$ still, regardless of the value of $n$, but,
$$f(0) = (0 - 1)^n - 0^n + 1 = (-1)^n + 1 = 0,$$
precisely when $n$ is odd, and we are done.
</s>