# Plotting Riemann Surface of $w(z)=\sqrt{1-z^{2}}$

I'm working in the plotting the Riemann surface of two functions, namely:

$$w_{1}(z)=\sqrt{1-z^{2}} \,,$$

and

$$w_{2}(z)=\tanh\left(k\sqrt{1-z^{2}}\right)-2iz\frac{\sqrt{1-z^{2}}}{1-2z^{2}}\,,$$

where $k$ is a constant and $z$ is a complex number. All that I've tried until now didn't work. How to do this plot?

• – user9660
Dec 2 '15 at 9:40
• Yes, but I wasn't able to transpose the codes for that function above @Lou... Dec 2 '15 at 14:39

It would be more satisfying to make my own function to do this, but I could not improve upon the package in the second link that Lou provided.

Import["http://www.mathematicaguidebooks.org/V6/downloads/RiemannSurfacePlot3D.m"]


Using the default options, you get something like this,

RiemannSurfacePlot3D[w == Sqrt[1 - z^2], Re[w], {z, w}] You can tweak it to make some really pretty graphics. You can color the real surface by the value of the imaginary part, and show both in a grid. Thanks to Rahul for help with the color function, for other surfaces you may need to tweak the prefactor inside the ArcTan in order to see good color variation - the larger the prefactor, the more variation you see for small values. (I think having a nonlinear color bar would be helpful here)

rsurf[func_] := Grid[{{
RiemannSurfacePlot3D[w == func, Re[w], {z, w},
ImageSize -> 400,
Coloring -> Hue[Rescale[ArcTan[1.4 Im[w]], {-Pi/2, Pi/2}]],
PlotPoints -> {40, 40}, Boxed -> False],
RiemannSurfacePlot3D[w == func, Im[w], {z, w},
ImageSize -> 400,
Coloring -> Hue[Rescale[ArcTan[1.4 Re[w]], {-Pi/2, Pi/2}]],
PlotPoints -> {40, 40}, Boxed -> False]}}];
rsurf[Sqrt[1 - z^2]] The more complicated the function, the longer it takes to plot, but they are more interesting,

With[{k = 1 + 2 I},
rsurf[Tanh[k Sqrt[1 - z^2]] - 2 I z Sqrt[1 - z^2]/(1 - 2 z^2)]
] • Hello @JasonB, Thank you very much for your answer! I really appreciate that method! But could I insert the real and imaginary axes on the plot? Dec 2 '15 at 14:35
• @Jason B, Good approach, anyway, +1
– user9660
Dec 2 '15 at 14:54
• Shouldn't your Coloring be Hue[Rescale[ArcTan[.8 Im[w]], {-Pi/2, Pi/2}]]?
– user484
Dec 3 '15 at 0:07
• @Rahul,you are right, since the ArcTan can return values from $\pm \pi/2$, I just arrived at the {-1,1} range from trial and error since arctan approaches those values only assymptotically, using the correct range will almost never use the full color range. There is some arbitrariness in the prefactor inside of the ArcTan function. I set it a little bit higher here and that gives a decent result. Thanks! Dec 3 '15 at 8:38