I shall assume all rings to be commutative in this question. The impatient can scroll down to the "blockquote" to read the actual question.
Whenever we have a polynomial over a ring, it defines a function from the ring to itself by evaluation. It's reasonable to ask when two different polynomials define the same function.
From the factor theorem it follows that an $n^\text{th}$ degree polynomial over an integral domain has at most $n$ roots. Then it's easy to show this:
Theorem. Let $R$ be an infinite integral domain and let $f \in R[X]$ such that $f(a)=0$ for all $a \in R$, then $f = 0$.
Proof. $f$ has infinitely many roots, so it must be the zero polynomial. $\quad\square$
For finite rings a kind of opposite situation occurs:
Theorem. For any finite ring $R$ there are polynomials over $R$ that are different but agree on all elements.
Proof. There are only finitely many functions from $R$ to itself, but $R[X]$ is infinite. $\quad\square$
If we make further assumptions it's of course possible to prove more, as Pete L. Clark wrote in this post: [1]
Then there is the question of infinite rings that are not integral domains. It's relatively easy to come up with examples of a ring $R$ with positive characteristic and a nonzero polynomial that evaluates to the zero function, e.g.: $$ R := \bigoplus_{n=1}^\infty \mathbb{Z}/6\mathbb{Z} \quad\text{and}\quad f(X) := X^3-X.$$
The Question:
This leaves open the case alluded to in this post's title: Is there a commutative ring of characteristic $0$ (hence infinite) such that a nonzero polynomial evaluates to the zero function?
In the same line of your counterexample on infinite rings, a simpler one: sx^2+sx is identically vanishing in (Z[s]/(2s, s^2)) [x] and has infinitely many roots on (Z[s]/(2s)) [x]
But the real problem is: can one find a counterexample with a nonzero identically vanishing polynomial over an infinite REDUCED INDECOMPOSABLE ring (no nontrivial nilpotents or idempotents)?
– Marcus Barão Camarão May 01 '17 at 13:18$
signs or inside\[...\]
that is "plain" $\mathrm{\LaTeX}$ or uses the very common AMS macro packagesamsmath
andamssymb
. (With a few narrow exceptions/differences in behavior.) – 2'5 9'2 May 01 '17 at 21:35