Localization by a non-nilpotent as a polynomial quotient In Dummit and Foote, Exercise 15.18 (p. 727 3rd edition) one is asked to prove that for a commutative ring with unity $R$, and $f$ a non-nilpotent element of $R$, that the localization $R_f$ is isomorphic to $R[x]/(xf - 1)$.
I have done this, using the strategy outlined in the problem, using the universal property of $R_f$ proved in Theorem 36. The problem I have is this:
If $R_f \cong R[x]/(xf - 1)$ and $\phi:R[x] \to R_f$ is a surjective homomorphism, it stands to reason that $\text{ker}(\phi)$ should be $(xf - 1)$. I cannot show this directly. The surjective homomorphism I have in mind is, for:
$p(x) = a_0 + a_1x + \cdots + a_mx^m$
$\phi(p) = \dfrac{a_0}{1} + \dfrac{a_1}{f} + \cdots + \dfrac{a_m}{f^m}$
It is clear to me that $\phi$ annihilates $(xf - 1)$, so that ideal is contained in the kernel. What I cannot show is the other containment, or equivalently:
If $\phi(g) = 0_{R_f}$ then $g(x) \in (xf - 1)$. The trouble I am running into is that $R$ might be a "bad" ring, containing a lot of zero-divisors, $f$ might even be a zero-divisor (being non-nilpotent is a considerably weaker property), so the usual polynomial tricks of the division algorithm or using the irreducibility of $xf - 1$ aren't much use, here.
I feel I am missing something obvious....what is it?
 A: The assumption, that $f$ is not nilpotent, is not needed and should be erased.
Instead of working with elements, you should work with morphisms (this is a general idea of category theory), because this simplifies things a lot and you won't have to calculate anything.
We have a canonical homomorphism $R \to R[x] \to R[x]/(xf-1)$ which sends $f$ to an invertible element (the class of $x$). Hence, by the universal property of localizations, it lifts uniquely to a homomorphism $R_f \to R[x]/(xf-1)$.
Conversely, consider the element $1/f \in R_f$. By the universal property of $R[x]$ there is a homomorphism $R[x] \to R_f$ extending $R \to R_f$ and mapping $x$ to $1/f$. This homomorphism kills $xf-1$ by construction, hence lifts to a homomorphism $R[x]/(xf-1) \to R_f$.
These homomorphisms are easily seen to be inverse to each other (again using the universal properties, but also using elements if you want to).
If you know the Yoneda Lemma, we can even give a shorter and slicker proof (following essentially the same argument): Let $S$ be a commutative ring. We have natural bijections
$$\hom(R[x]/(xf-1),S) \cong \{\phi \in \hom(R[x],S) : \phi(x) \phi(f)=1\}$$
$$\cong \{(\psi,s) : \psi \in \hom(R,S), s \in S, s \psi(f)=1\}$$
$$ \cong \{\psi \in \hom(R,S) : \psi(f) \in S^*\} \cong \hom(R_f,S).$$
Hence, $R[x]/(xf-1) \cong R_f$.
EDIT: 
For a direct proof that the kernel of $R[x] \to R_f$ is precisely $(xf-1)$, see Rings of fractions the hard way by F. Voloch.
