That's the question. Recall that a morphism $f\colon A\to B$ of commutative rings is integral if every element in $B$ is the root of a monic polynomial with coefficients in the image of $A$ and that $f$ is an epimorphism if and only if the multiplication map $$B\otimes\_A B\to B$$ is an isomorphism.


If we make the additional assumption that $B$ is finitely generated as an $A$-algebra, then it is true. This can be proven by Nakayama's lemma, for example.


This came up not so long ago when I was trying to show that the Witt vector functor (of finite length) preserves separatedness of algebraic spaces. In this application I was able to reduce things to the finitely generated case and could therefore use the weaker statement above, but I still wonder about the general case.



Is every integral epimorphism of commutative rings surjective?
If I'm not mistaken, there is a counter-example. Have a look at Lazard's second counter-example in:
["Deux mechants contre-exemples" in Séminaire Samuel, Algèbre commutative, 2, 1967-1968](http://archive.numdam.org/ARCHIVE/SAC/SAC_1967-1968__2_/SAC_1967-1968__2__A8_0/SAC_1967-1968__2__A8_0.pdf).


For any field $k$, Lazard provides a **non-surjective epimorphism** of local $k$-algebras $C\to D$, both of Krull dimension zero, and both of residue field equal to $k$. It is then easy to show that $D$ is also integral over $C$, which is what we need here. Indeed, every $d\in D$ can be written as $d=a+b$ with $a\in k$ and $b$ in the maximal ideal (and unique prime) of $D$, which is therefore nilpotent $b^n=0$, hence trivially integral. Since $a\in k$ is also in $C$, our $d$ is the sum of two integral elements. (Or simply, $D$ is a $k$-algebra, hence a $C$-algebra, generated by nilpotent, hence integral, elements.)


In cash, for those who don't want to click, the rings are constructed as follows:
Consider the local ring in countably many pairs of variables $S=(k[X\_i,Y\_i]\_{i\geq 0})\_M$ localized at $M=\langle X\_i,Y\_i\rangle\_{i\geq0}$. 
For every $i\geq 0$ choose an integer $p(i) > 2^{i-1}$. Define $J=\langle Y\_i-X\_{i+1} Y\_{i+1}^2 \ ,\ X\_i^{p(i)}\rangle\_{i\geq0}\subset S$ and define $D=S/J$. Note immediately that $D$ is a local $k$-algebra, say with maximal ideal $m$ and with residue field $D/m\cong S/M\cong k$. Finally, he defines $C$ to be the localization (at $C\_0\cap m$) of the subalgebra $C\_0:=k[x\_i,x\_iy\_i]\_{i\geq 0}\subset D$ where the $x\_i$ are the classes of the $X\_i$ in $D$ and I let you guess what the $y\_i$ are. By construction, the residue field of $C$ is an extension of $k$ which is also a subfield of $D/m=k$, so the residue field of $C$ must be $k$ and we are in the announced situation.


