<s>[INST] if $x$ is odd, show that $x^3+x$ has a remainder 2 when divided by 4 I did part of this question but am stuck and don't know how to continue
I let $x= 2k +1$
Also noticed that $x^3+x = x(x^2+1)$
therefore
$4m+2 = 2k+1((2k+1)^2+1)$
I simplified this and ended up with
$4m+2 = 8k^3+12k^2+8k+2$
I don't know how to continue from and prove that $x^3+x$ has remainder 2 when divided by 4
 [/INST] Consider $f(x) =x^3+x-2$ instead. This can be factorised as $(x-1)(x^2+x+2)$ instead using the remainder theorem ($1^3+1-2 = 0$).
If $x = 1 \pmod 2$, then $x -1 \equiv 0 \pmod 2$ and $x^2+x+2 \equiv 1^2+1+2 \equiv 4 \equiv 0 \pmod 2$. Therefore  $x^3+x-2 \equiv 0 \pmod 4$, so $x^3+x \equiv 2 \pmod 4$.
</s>