TITLE: Map of coherent sheaves inducing isomorphism on the stalks at the generic point
QUESTION [5 upvotes]: Let $f:X\rightarrow Y$ be a finite morphism between Noetherian integral schemes that is surjective on the underlying topological spaces. Does there exist an integer $n>0$ and a coherent $O_X$-module $F$ such that there is a morphism of $O_Y$-modules $O_Y^n\rightarrow f_*F$ inducing an isomorphism on the stalks at the generic point of $Y$? 
It is pretty easy to see that there must be a quasi-coherent $O_X$-module like this. Pick an affine open $V\subset Y$, then its inverse image is an affine open $U\subset X$. It is easy to see that $O_U$ answers the question for the morphism $f|_{U}$. Therefore, if $i:U\rightarrow X$ denotes the inclusion, $i_* O_U$ is a quasi-coherent $O_X$-module (because $i$ is qcqs) answering the question (because the generic stalk can be computed on any non-empty open). 
It appears, however, that this way we will rarely get a coherent sheaf. EGA IV, partie quadrieme, Cor. 21.12.7 says that if $X$ is separated, the complement of $U$ has codimension 1 so $i_*$ has little chance to preserve coherence. 
P.S. This is Hartshorne Ch. III Ex. 4.2 (a). I have consulted some solutions online and could not convince myself they really produce coherent (rather than quasi-coherent) sheaves. The same question has been asked on Math Stackexchange but we have different perspective on the direction of the attack.

REPLY [2 votes]: I think this can also be solved by taking the "coherent subsheaf generated by finitely many global sections of $i_* \mathcal{O}_U$". I'm not sure this is fundamentally different from Aknazar's solution, but it avoids the direct mention of (co)limits, and might be what Hartshorne had in mind.
As Aknazar, suppose we can solve the problem for affine schemes, and choose an open affine $j: V \hookrightarrow Y$ and let $i: U \hookrightarrow X$ be its preimage. Suppose we have a morphism
$$ \alpha_V:  \mathcal{O}_V^n \to (f|_U)_*\mathcal{O}_U$$
which is an isomorphism at the generic point $\eta$ of $Y$.
The problem is that $i_* \mathcal{O}$ is not in general coherent on $X$. But $\alpha_V$ chooses $n$ global sections $s_1,\dotsc,s_n \in \Gamma(X, i_* \mathcal{O}_U) = \Gamma(U, \mathcal{O}_U)$, which can be used to define a morphism $\alpha_X: \mathcal{O}_X^n \to i_* \mathcal{O}_U$. Let $\mathscr{G}$ be the image of this morphism. Then $\mathscr{G}$ is coherent, because for every open affine $\text{Spec }A = W \subset X$, $\mathscr{G}(W) \subset (i_*\mathcal{O}_U)(W)$ is the $A$-submodule generated by $s_1|_W,\dotsc,s_n|_W$.
This allows us to define the morphism
$$ \alpha_Y: \mathcal{O}_Y^n \to f_* \mathscr{G} \subset (f i)_* \mathcal{O}_U$$
by takting the same global sections $s_1,\dots,s_n \in \Gamma(Y, f_* \mathscr{G})$. At the generic point this yields
$$
\mathcal{O}^n_{Y, \eta} \xrightarrow{\alpha_{Y, \eta}} (f_*\mathscr{G})_\eta \hookrightarrow ((fi)_* \mathcal{O}_U)_\eta,
$$
and the composition is $\alpha_{U, \eta}$ which is an isomorphism. Hence $\alpha_{Y, \eta}$ is an isomorphism as well.