TITLE: Can every curve be written as $f(x)=g(y)$?
QUESTION [23 upvotes]: Does every irreducible curve admit an equation of the form $f(x)=g(y)$, where $f$ and $g$ are polynomials?  What if we allow $f$ and $g$ to be rational functions?
Actually, I'd like to understand this in the presence of an additional constraint: if we're given a finite cover of curves $\pi\colon C\to\mathbb{P}^1$, do we expect there to be a cover $\phi\colon C\to\mathbb{P}^1$ and rational functions $f(x)$ and $g(x)$ such that $C$ is isomorphic to $f(x)=g(y)$ and also $f\circ\phi=g\circ\pi$?  In other words, not only is $C$ isomorphic to $f(x)=g(y)$, but this isomorphism can be chosen so that $\pi$ is the projection onto the $y$ coordinate.
This is reminiscent of Chad Schoen's paper "Varieties dominated by product varieties", but I don't see a precise connection between the two.

REPLY [24 votes]: This would contradict the Harris-Mumford(-Eisenbud) theorem that $M_g$ is non-uniruled for $g$ at least $23$.  Let $C$ be a general curve of genus $g$.  If $C$ is in "Zieve form", then it is the normalization of the (almost certainly) singular curve in $\mathbb{CP}^1 \times \mathbb{CP}^1$,
$$D = \{ ([x_0,x_1],[y_0,y_1]) \in \mathbb{CP}^1\times \mathbb{CP}^1 \vert y_0^e f(x_0,x_1) - x_0^dg(y_0,y_1) \}, $$ where $f(x_0,x_1)$, respectively $g(y_0,y_1)$, is a homogeneous polynomial of degree $d$, resp. $e$, such that $f(0,1)$ and $g(0,1)$ are nonzero (or else the defining polynomial factors to a simpler form).  By direct computation, the singular points occur where $[x_0,x_1]$ is a multiple root of $f(x_0,x_1)$ and $[y_0,y_1]$ is a multiple root of $g(y_0,y_1)$ or the point is $([0,1],[0,1])$.  Moreover, at each point, the local analytic type of the singularity is the same as the plane curve with equation $y^n-x^m$, where $m$, resp. $n$, is the vanishing order of $f(x_0,x_1)$, resp. $g(y_0,y_1)$ at that point.  In particular, the "delta invariant" depends only on $(m,n)$.  Thus, if you "deform" $f(x_0,x_1)$ and $g(y_0,y_1)$ so that the number and type of multiple roots remains constant, then the normalizations of the corresponding curves in $\mathbb{CP}^1\times \mathbb{CP}^1$ remain of genus $g$.  However, the family of such deformations of $(f,g)$ is a rational variety.  Precisely, if you write
$$ f(x_0,x_1) = (x_1-a_1x_0)^{m_1}(x_1-a_2x_0)^{m_2}\cdots (x_1-a_rx_0)^{m_r}, $$ with $(a_1,\dots,a_r)$ pairwise distinct, 
then the deformation space for $f$ is just a Zariski open subset of the affine space with coordinates $(a_1,\dots,a_r)$, and similarly for $g(x_0,x_1)$. Since $M_g$ is non-uniruled, this is a contradiction: there is only the constant morphism from a rational variety to $M_g$ whose image contains the general point parameterizing $C$.  
Edit. Mike also asks whether this could be true if $f$ and $g$ are rational functions rather than polynomial functions.  This is equivalent to replacing the defining equation above in $\mathbb{CP}^1 \times \mathbb{CP}^1$ by the more general equation
$$
g_0(y_0,y_1)f_1(x_0,x_1) - f_0(x_0,x_1)g_1(y_0,y_1),
$$
where $f_0$, $f_1$ are homogeneous of degree $d$ with no common factor, and where $g_0$, $g_1$ are homogeneous of degree $d$ with no common factor.  The same observations apply: the number and types of singularities depend only on the number and multiplicities of the roots of $f_0$, $f_1$, $g_0$ and $g_1$.  By varying those (distinct, likely repeated) roots as in the previous paragraph, one gets a morphism from a rational, quasi-projective variety to $M_g$.  By Harris-Mumford(-Eisenbud), the only such morphism is constant if the image contains a general point of $M_g$.