Proving a basic property of polynomial rings

I am learning ring theory in the Dummit & Foote’s Abstract Algebra, and I am doing all the exercises to get as much experience as possible… but some of them just get me stuck for hours! Like this one :

Assume $R$ is a commutative ring with identity. Prove that $p(x)=a_n x^n + a_{n-1} x^{n-1} + \cdots + a_1 x + a_0 \in R[x]$ is a unit if and only if $a_0$ is a unit and $a_1, \dots, a_n$ are nilpotent in $R$.

Now I already have the $\Longleftarrow$ part, since I’ve proven in a previous exercise that the sum of nilpotent elements is nilpotent and the sum of a unit with a nilpotent element is a unit, hence $a_0 + (a_1 x + \dots + a_n x^n)$ has a sum of nilpotents between the parenthesis, and thus is written as the sum of a unit and a nilpotent element, thus is a unit. I can’t deal with the converse though.

I’ve tried noticing that if $p(x)$ is a unit and $q(x)$ is its inverse then $p(x) q(x) = 1$ implies that $p(x)^m q(x)^m = 1$ (because $R$ is commutative), but that only gave me that if $p$ has degree $n$ and $q$ has degree $r$ with last coefficient $b_r$ then $a_n b_r$ is $0$, and got stuck there. I also tried to take a look at what $p(x) q(x)$ looks like : If $p(x) = \sum_{k=0}^n a_k x^k$ and $q(x) = \sum_{k=0}^n b_k x^k$ (just add zeros to get those two sums of same size), then
$$
a_0 b_0 =1 ,\quad a_1 b_0 + a_0 b_1 = 0, \quad a_2 b_0 + a_1 b_1 + a_0 b_2 = 0, \quad \cdots
$$
and I thought I could get something out of those equations but all I have now is that $a_1$ is nilpotent if and only if $b_1$ is, which doesn’t help me much.

Any hints? I don’t need a full solution if there’s a way to just point out a nice trick.

Solutions Collecting From Web of "Proving a basic property of polynomial rings"

HINT $\ $ If $\rm\:R\:$ is a domain then easily $\rm\:p(x)\:$ a unit $\rm\Rightarrow\ a_i = 0\:$ for $\rm\:i>0\:.\ $ Now $\rm\ R\to R/P,\ $ for $\rm\:P\:$ prime, reduces to the domain case, yielding that the $\rm\:a_i\:,\ i>0\:$ are in every prime ideal. But the intersection of all prime ideals is the nilradical, the set of all nilpotent elements.

See also my post here on reduction to domains by factoring out prime ideals.

Alternatively, more elementarily, successively examining the coefficients of $\rm\:f\:g\:$ one proves that $\rm\: a_n\:b_m = 0\ \Rightarrow\ a_n^2 b_{m-1} = 0\ \Rightarrow\ \ldots\: \Rightarrow\ a^{m+1}\:b_0 = 0\:.\:$ But $\rm\:b_0\:$ is a unit so $\ldots$