Morphism between two $K$-schemes restricted to an affine subscheme Suppose that $f:X\longrightarrow Y$ is a morphism between two $K$-schemes. If $U\subseteq X$ is an affine open set,  then can we conclude that $f(U)$ is contained is some affine open subset of $Y$?
Thanks in advance.
 A: No. Let $X$ be two points, let $Y$ be $\mathbb{A}^1_K$ with the origin doubled, and let $X \to Y$ be the morphism that picks out the doubled points. Then there is no affine open subset of $Y$ that contains the image of $X$, because every affine scheme is separated.
A: Here is an example with curves.  Let $C$ be the (projective) elliptic curve cut out by (the homogenization of) $y^2 = x^3 -x$.  
The map $f:(x,y) \mapsto x$ gives a degree two morphism $C \to \mathbb P^1$.
There are four branch points: $(0,0), (1,0), (-1,0)$, and the point at infinity.
Let $P \in C$ be a non-branch point.  Then $U := C \setminus \{P\}$ is affine, but
$f: U \to \mathbb P^1$ remains surjective.
A: Here is an example with varieties over algebraically closed fields.
The complement $U$ of $y = x^2$ in $\mathbb{A}^2$ is affine -- proof: it is the projection of the set $(x, y, z) \in \mathbb{A}^3$ such that $(y - x^2)z = 1$.
But this complement surjects onto $\mathbb{P}^1$ under the usual map $\mathbb{A}^2 \setminus \{0\} \to \mathbb{P}^1$ (this just says that the parabola does not contain any lines through the origin). Note that we really have to do the silliness with removing a conic to get an example -- removing a line, we no longer surject to $\mathbb{P}^1$ and if we remove nothing we're not affine.
A: Another simple example, which also works with varieties. It suffices to  $X=\mathbb{P}^1\times \mathbb{P}^1$, $Y=\mathbb{P}^1$ and $f\colon X\rightarrow Y$ to be the projection on the first factor.
Indeed, let $C$ be any closed curve in $X$. Since $C$ is ample, then $U=\mathbb{P}^1\times \mathbb{P}^1\setminus C$, is an affine smooth surface. However, $f(U)=\mathbb{P}^1$ is not contained in any affine open subset.
