The question comes from a textbook
Prove that $3x^5+5x^3+7x$ is divisible by 15 for any integer $x$. I want to do this through mod arithmetic.
The first thing that I did was to try and solve it through mod 3 and 5. If they are congruent to 0 for both, then it is divisible by 15.
So I tried to solve it mod 5 first. $3x^5+5x^3+7x$ is congruent to $3x^5+x^3+2x$ If x (1 to 5) when subbed in gives 0(mod 5), then all $x$ values will give 0(mod 5).
However when I come to sub in $x=2$, it gives $96+8+4$ which doesn't give 0(mod 5). Have I done or assumed anything wrong up to this point?
Note since $5 \equiv 0 \pmod{5}$, then $5x^3 \equiv 0 \pmod{5}$, but in your statement of
you have that $5x^3 \equiv x^3 \pmod{5}$ instead (but you did correctly simplify $7x \equiv 2x \pmod{5}$). This is only true for $x \equiv 0 \pmod{5}$. Also, it's why your substitution of $x = 2$ didn't work properly. Note with the correction simplification of $3x^5 + 2x$, you for $x = 2$, you get a result of $96 + 4 = 100$, which is divisible by $5$.