Find the inverse of a unit I am trying to solve the following question:

If $K$ is a field and $R=K[x]/(x^n)$.and $r=a_0+a_1x +\dots+a_{n-1}x^{n-1}$ is an element in $R$ with $a_0\neq 0$, prove that $r$ is a unit and find its inverse.

To prove it is a unit, I know that $\gcd(r,x^n)=1$, so there exist $a,b \in K[x]$ such that $ra+x^nb=1$, $ra=1$ in $R$.
But to construct the inverse, and I know that $a_0$ has its inverse in K. Can someone give me some hint?
I also need to show that every zero divisor in $R$ is nilpotent. 
For nonzeros $a,b \in R$, if $ab=0$, then $x^n$ divides $ab$, does this imply that $a$ and $b$ both have no constant terms?
 A: I'd prefer to write $\xi$ for the image of $x$ in $K[x]/(x^n)$, just to be sure we're working in the right context.
What you want to prove is that $r=a_0+a_1\xi+\dots+a_{n-1}\xi^{n-1}$ is invertible in $R$.
Hints:


*

*$a\xi^k$ is nilpotent, for every $a\in K$ and every positive integer $k$;

*the sum of two nilpotent elements is nilpotent;

*if $A$ is a commutative ring, $a\in A$ is invertible and $t\in A$ is nilpotent, then $a+t$ is invertible.


Finally, what are the nilpotent elements in $R$?
A: Of course @egreg has given the best solution (and I gave it +1) by putting it all in a general context, but I can never resist the "idiot" answer to this question. It is clear from the Binomial Theorem that the inverse of $a_0+a_1x +\dots+a_{n-1}x^{n-1}+(x^n)$ is
$$
\sum_{k=0}^\infty (-1)^k a_0^{-k-1}(a_1x +\dots+a_{n-1}x^{n-1})^k +(x^n)
$$
which happily (as we are trying to do algebra) is really a finite sum, every term after the $(n-1)$-th vanishing vanishing into $(x^n)$, as it has a factor $x^n$. 
So not only is it a unit, we've calculated the inverse. 
