Find the remainder when $P(x)=5x^6 + x^5 - 2x^3 - x^2 + 1$ is divided by $x^2+1$.
$$ P(x)=(x^2+1)\cdot Q(x)+R(x) $$
When $x^2=-1$,
$$ P(x)=-5+x+2x+1+1 = 3x-3 $$
Exactly, why the method above, does not work for the following question?
Find the remainder when $P(x)=x^{81}+x^{49}+x^{25}+x^9 + x$ is divided by $x^3-x$.
$$ P(x)=(x^3-x)\cdot Q(x)+R(x)=x(x+1)(x-1)\cdot Q(x) + R(x) $$
$P(1)=5$, but $P(-1)=-5$, and $P(0)=0$
However, if I factor $P(x)$ by $x$,
$$ P(x)=x(x^{80}+x^{48}+x^{24}+x^8 + 1) $$
and consider $P(1)$ and $P(-1)$ without the factored $x$, then I get $5x$ in both cases. (The correct answer.)
Question: I can solve the question by slightly different methods where there is no confusion or ambiguity involved. I just like to know the above method does not work with this problem. (And by “exactly why” I mean to ask, how am I supposed to foresee that the above method should not be applied directly.)
I think the problem is, with P(1), P(-1) and P(0), you are actually getting the value of r(1), r(-1) and r(0), instead of r(x).
r(x) is linear in this case, so you are able to get the correct answer by factoring P(x) by x