# Example of fractional ideal whose inverse does not commute with localization

Let $R$ be an integral domain, and $K$ its field of fractions. It is well known that for a finitely generated fractional ideal $I$ of $R$, and $S$ a multiplicative set we have $$(R:_KI)_S=(R_S:_KI_S).$$

I suppose that in general the above equation fails, but I don't know such an example.

The usual non-noetherian ring $k[X_1,\dots,X_n,\dots]$ is not an option since it is a Krull domain, or for Krull domains the equality holds for all fractional ideals.

Let $R = \mathbb{Z}+X\mathbb{Q}[X]$ and $I = X\mathbb{Q}[X] = (X, X/2, X/3, \ldots)$, and let $S = \{1,2,3,\ldots\}$. Then $K = \mathbb{Q}(X)$, $R_S = \mathbb{Q}[X]$, and $I_S = X \mathbb{Q}[X]$, whence $(R_S:_K I_S) = (1/X)\mathbb{Q}[X]$. However, $(R:_K I) = \mathbb{Q}[X] = R_S$, so that $(R:_K I)_S = (R_S)_S = R_S = \mathbb{Q}[X]$.
To see that $(R:_K I) = \mathbb{Q}[X]$, note that $y \in (R:_K I)$ implies $$y = \frac{f_1}{X} = \frac{f_2}{X/2} = \frac{f_3}{X/3} = \cdots$$ for some $f_1, f_2, f_3, \ldots \in R$, which implies that $2, 3, 4, \ldots$ all divide $f_1$ in $R$, which implies that $f_1(0) = 0$ and therefore $f_1 \in X\mathbb{Q}[X]$ and hence $y \in \mathbb{Q}[X]$. Conversely, if $y \in \mathbb{Q}[X]$, then $Iy \subseteq I \subseteq R$, so $y \in (R:_K I)$.
A similar example that should also work is $R = \operatorname{Int}(\mathbb{Z})$ (the ring of integer-valued polynomials), $I = \{f \in \operatorname{Int}(\mathbb{Z}): f(0) = 0\}$, and $S = \{1,2,3,\ldots\}$.