# Integrality and ring morphisms $f:R\to S$

I am thinking about the following problem: Let $f:R\to S$ be a ring morphism and let $T$ in $R$ be a subring. If $r$ in $R$ is integral over $T$, then it is true that $f(r)$ is integral over the image subring $f(T)$: if $\sum t_i r^i=0$, then also $\sum f(t_i)f(r)^i=0$ by the properties of a ring morphism.

Now the question is: if $f(r)$ is integral over $f(T)$ for some $r$ in $R$, is then also $r$ integral over $T$? If $f(r)$ is integral over $f(T)$, then $\sum f(t_i)f(r)^i=0$ for some $t_i \in T$, i.e. $f(\sum t_i r^i)=0$, because $f$ is a ring morphism.

Now if $f$ is injective, then the statement is indeed true. But I do not think that the statement holds in general, so I was searching for a counterexample with a non injective morphism, but I could not think of a direct counterexample.

For example, $\mathbb{Z[}\frac{1+\sqrt3}{2}]$ is not an integral ring extension of the integers, whereas $\mathbb{Z[}\frac{1+\sqrt5}{2}]$ is. But how would we find a morhpism between these rings, if one is finitely generated and the other is not? Another thing I tried was to chose $R= \mathbb{Z[\frac{1}{2}]}$ and $T=\mathbb{Z}$, but there for any ring morphism $f(\mathbb{Z})$ is the zero ring or the integers, so that $f(\frac{1}{2})$ is not integral over $f(T)$.

Let $T= \mathbb{Z}$, $$R = \{\frac{a}{b} \bigg\rvert a,b\in \mathbb{Z},3\nmid b,(a,b)=1\}$$ which is the localization of $\mathbb{Z}$ at the prime ideal $(3)$. $S = R/3R$. Let $f: R\to S$ be the canonical map. Then the element $f(1/2)$ is integral over $f(T)$. Indeed, we have $$\overline{1/2} = \overline{1/2} + 3(\overline{1/2}) = \overline{2}$$ But $1/2$ is not integral over $T$.
This is a stupid counterexample, but consider any non-integral ring extension $T\subset R$ and the unique morphism $R\rightarrow 0$.