# Drawing a hyperelliptic Riemann surface

I'm trying to draw the Riemann surface defined by the polynomial $z^2=w^5-w$, where $z$ and $w$ are complex numbers. I'm a new user of Mathematica, and I tried manipulating some examples I found, but with no luck. Could someone help me, please?

• Have you seen this answer? Feb 19, 2017 at 9:32
• Yes I have seen it, but I don't know how to get to work. I'll try again. Feb 19, 2017 at 22:16
• I'm supposed to get a genus 2 surface but I don't get that! Feb 19, 2017 at 23:04
• Take a look at: mathematica-journal.com/2010/02/… Sep 17, 2017 at 15:24

Trott gives a simple technique in his article on rendering Riemann surfaces. At the time, he had said:

Although in principle this method works (…) for higher order polynomials the Resultant calculation will become much more expensive. Also, the generation of a high resolution ContourPlot3D requires much CPU time…

Nowadays, with more powerful computers, the method is now slightly more feasible to do:

expr = Expand[w^5 - w - z^2 /. {z -> x + I y, w -> u + I v}];

ip = Total[Expand[Cases[expr, _Complex _]/I]];
rp = Expand[expr - I ip];

resRe = Resultant[rp, ip, v];
resIm = Resultant[rp, ip, u];

{ContourPlot3D[resRe == 0, {x, -7, 7}, {y, -7, 7}, {u, -2, 2},
AxesLabel -> {"x", "y", "u"}, BoundaryStyle -> None,
BoxRatios -> {3, 3, 2}, ContourStyle -> Opacity[2/3, ColorData[97, 3]],
MaxRecursion -> 1, Mesh -> False, PlotLabel -> "real part",
PlotPoints -> 55, PlotRange -> All],
ContourPlot3D[resIm == 0, {x, -7, 7}, {y, -7, 7}, {v, -2, 2},
AxesLabel -> {"x", "y", "v"}, BoundaryStyle -> None,
BoxRatios -> {3, 3, 2}, ContourStyle -> Opacity[2/3, ColorData[97, 1]],
MaxRecursion -> 1, Mesh -> False, PlotLabel -> "imaginary part",
PlotPoints -> 55, PlotRange -> All]} // GraphicsRow The artifacts along the surfaces' self-intersections is due to my inability to increase PlotPoints and MaxRecursion on my computer; a better computer than mine may be able to make a better picture.

ResourceFunction["RiemannSurfacePlot3D"][z^2 == w^5 - w, Re[z], {w, z}] 