Let xn = 0 and let ym = 0. Clearly (xy)n = 0, and the binomial theorem shows (x+y)m+n = 0.
This result, and the theorems that follow, do not apply in a noncommutative ring. Consider the 2 by 2 matrices. Start with the zero matrix and place a 1 in the upper right, or the lower left. These two matrices are nilpotent, yet their sum has determinant -1, and is a unit.
If each coefficient is nilpotent then each term is nilpotent, and since the sum of nilpotent elements is nilpotent, (shown above), p(x) is nilpotent.
conversely, if p(x) is nilpotent then so is its constant coefficient. Subtract a0 to get another nilpotent polynomial, this time with a1 nilpotent, and so on. (This direction remains valid for the formal power series of x.)
If we are interested in R[x,y], apply the theorem once to adjoin x, and then again to adjoin y. A polynomial in two variables is nilpotent iff all its coefficients are nilpotent. This generalizes to finitely many indeterminants, and then to an arbitrary collection of indeterminants. After all, a given polynomial only uses a finite number of these indeterminants.
A nilpotent power series in finitely meny indeterminants has nilpotent coefficients. We can't jump to infinitely many indeterminants here, because a power series could use all of those indeterminants, and we can't squeeze that into one of our finite towers.
We already showed that a unit plus a nilpotent yields a unit, so we only need look at the converse, where p is known to be a unit. Write pq = 1, and the constant term has to be a unit.
If p or q is a constant then the higher coefficients in the "other" polynomial are killed by a unit, and they must be 0. So we may assume both polynomials have degree at least 1.
Let p have coefficients a0 a1 a2 … through an, and let q have coefficients b0 b1 b2 … through bm. We know that anbm = 0. assume by induction that anr+1 kills bm-r through bm. This is true when r = 0.
Expand pq and let c be the coefficient in position n+m-r-1. As long as r is less then m+n-1, c = 0. Multiply c by anr+1. The result is of course 0. The coefficients from bm down to bm-r are killed by anr+1, and so there is only one term of c that remains, namely bm-r-1an. This too must be killed by anr+1. Hence bm-r-1 is killed by anr+2, and that completes the inductive step.
Run this through r = m-1, which is definitely less than n+m-1. This shows that a power of an kills a unit, which means an is nilpotent. Subtract anxn to get another unit polynomial in R[x]. Repeat this process until all the coefficients of p, other than a0, are nilpotent.
Apply this theorem twice to show that a polynomial in R[x,y] is a unit iff its constant term is a unit, and all other coefficients are nilpotent. This generalizes to finitely many indeterminants, and then to an arbitrary collection of indeterminants.
This generalizes to a finite number of indeterminants.
If q is constant then b0 kills p, and the theorem is true. So let q have degree m for m > 0.
We know anbm = 0. Now anq kills p, and has lower degree. Yet the degree of q was minimal. Thus anq = 0, and an kills all the coefficients of q.
With an out of the way, an-1bm must equal 0. Now an-1q kills p, and as above, an-1 kills all the coefficients of q. Continue this process until all coefficients of p kill all coefficients of q.
We can build a counter example when the degree of q is not minimal. Take a field such as Z2 and adjoin the indeterminants a b c and d. Mod out by ac, bd, and ad+bc. In other words, these expressions are set to zero whenever they appear. Now (ax+b)*(cx+d) is 0, but ad and bc are not zero.