Let $R$ be an integral domain with field of fractions $K$. For a nonzero element $x \in R$, let $R[1/x]$ denote the set of elements of $K$ of the form $r/x^{n}$, where $r \in R$ and $n \in \mathbb{N}$. Show that if $a$ and $b$ are nonzero elements of $R$ with $R = (a, b)$, then $R[1/a] \cap R[1/b] = R$.
$R \subset R[1/a] \cap R[1/b]$ clearly. Take $y \in R[1/a] \cap R[1/b]$ so that $y = r/a^{n} = s/b^{m}$ for some $r, s \in R, n, m \in \mathbb{N}$. Then $rb^{m} = sa^{n}$. So $(a) \cap (b) \neq 0$. I want to say something like $a, b$ are coprime, since $(a, b) = (1)$, whence $ax + by = 1$ for some $x, y \in R$. But $R$ is not necessarily a UFD. I'm having trouble getting past this! I can manipulate my equations, combine them etc, but it gets me nowhere. I suspect I am missing something silly.