Localisation is isomorphic to a quotient of polynomial ring I am having trouble with the following problem. 

Let $R$ be an integral domain, and let $a \in R$ be a non-zero element. Let $D = \{1, a, a^2, ...\}$. I need to show that $R_D \cong R[x]/(ax-1)$. 

I just want a hint.
Basically, I've been looking for a surjective homomorphism from $R[x]$ to $R_D$, but everything I've tried has failed. I think the fact that $f(a)$ is a unit, where $f$ is our mapping, is relevant, but I'm not sure. Thanks

Define $\phi: R[x] \rightarrow R_D$ by sending $x$ to $1/a$.
We will prove that the kernel of $\phi$ is the ideal of $R[x]$ generated
by $ax -1$.
Let $p\left(x\right) \in \ker \phi$.
Note that $p(x)$ can be naturally viewed as an element of $R_D[x]$.
Since $\phi(p(x))=0$, we have $p(1/a)=0$ in $R_D$. So $1/a$ is a root of $p(x) \in R_D[x]$. Since the leading coefficient of $ax-1$ is a unit in $R_D$, 
Euclidean division applies and
we get that $p(x) = (ax-1) g(x)$ for some $g(x) \in R_D[x]$. Inspecting coefficients on both sides starting from lowest degree terms, we see that in fact $g(x) \in R[x]$ and we are done.
PS: This answer is inspired by Robert Green's answer (and our subsequent interaction) to an identical question that i recently asked, being ignorant of the existence of this post.  
