### Mapping a double cover of the complex plane to a torus

Note: This topic was presented at the 2017 Wolfram Tech conference. A video of that presentation can be found here: Link to Presentation

In this section we describe how to map a double cover of the complex plane onto a genus 1 Riemann surface, a torus. We will use the following.

In the first plot at the left, we have the real part of the function $\displaystyle g(z)=\frac{A}{\sqrt{(1-z^2)(k^2-z^2)}}$ which is analytic and double-valued for all values of $z$ except at the branch points. We will use this plot as the icon for the double cover keeping in mind the double cover is actually made up of the real and imaginary parts of the function and extends in all directions over the complex plane out to infinity. Next, we use a set of Schwarz-Christoffel transformations to map this cover to the rectangular region in the $\zeta$ plane shown in the center plot. We then continuously contort the 4-colored region in the $\zeta$ plane into the torus show in the third plot. The covers are color-coded for each half-plane and the color of the cover is mapped to the corresponding color in the zeta-plane and that color is then mapped to the same color over the torus. For example, the blue cover over the upper half-plane in the first plot is mapped to the blue rectangle in the center plot, and then this rectangle is mapped to the blue quarter-section of the torus in the third plot.

Mapping of the double cover to the $\zeta$-plane is done with the Schwarz-Christoffel transformation and it is this transformation we need to study next.

1. #### Schwarz-Christoffel Transformation

Suppose that P is a polygon with vertices $w_1,\cdots,w_k$ in the anticlockwise direction,with corresponding right turns of angles $\theta_1\pi,\cdots,\theta_k \pi$ respectively, where $−1 < \theta_1, \cdots, \theta_k< 1$. Then there exists a function of the form $$\zeta(z)=A \int_0^z (w-x_1)^{\theta_1}\cdots (w-x_k)^{\theta_k} dw+B$$ where $A,B\in \mathbb{C}$ that maps the upper half plane H one-to-one and conformally onto the interior of P,with $\zeta(x_1) = w_1, \cdots, \zeta(x_k) = w_k$.

And in our particular application, we wish to map the upper half plane to the rectangle

with $$p=\int_0^{\pi} \frac{1}{2+\cos(t)}dt.$$

And starting at the point $-\pi/2+ip$ and going counter-clockwise we make left turns of $\pi/2$, we then have $\theta_i=-\pi/2$ and we can choose $x_1=1, x_2=-1, x_3=k, x_4=-k$ with $k$ real and $|k|>1$. We then have $$\zeta(z)=A\int_0^z \frac{1}{\sqrt{(1-w^2)(k^2-w^2)}}dw+B.$$

The constant B is a translation so for now, we set it to zero and then later move the polygon as needed by adjusting B. Our objective now is to find constants A and k, such that f(z) maps the upper half-plane to the rectangle described above. These can be determined by considering the four simultaneous integral equations: \begin{align} A\int_0^{-k} \frac{dt}{\sqrt{(1-t^2)(k^2-t^2)}}&=-\pi/2+ip \\ A\int_0^{-1} \frac{dt}{\sqrt{(1-t^2)(k^2-t^2)}}&=-\pi/2\\ A\int_0^{1} \frac{dt}{\sqrt{(1-t^2)(k^2-t^2)}}&=\pi/2 \\ A\int_0^{k} \frac{dt}{\sqrt{(1-t^2)(k^2-t^2)}}&=\pi/2+ip \end{align}

Looking at (3) we have immediately, $$$$\displaystyle A=\frac{\pi}{2 \int_0^1 \frac{dt}{\sqrt{(1-t^2)(k^2-t^2)}}}.$$$$ And if we subtract (3) from (4) we obtain $\displaystyle A\int_1^{k} \frac{dt}{\sqrt{(1-t^2)(k^2-t^2)}}=ip$. Using this expression and (3) we can write: $$\frac{1}{p}\int_1^k \frac{dt}{\sqrt{(t^2-1)(k^2-t^2)}}=\frac{2}{\pi} \int_0^1 \frac{dt}{\sqrt{(1-t^2)(k^2-t^2)}}$$ and numerically solve for $k$ and then using (5), solve for A. Keep in mind the integrals are improper (and convergent) and we need to integrate over an analytically-continuous path between the singular points. Usually, this is over the principal branch.

The following Mathematica code computes these values:

rhoMax = NIntegrate[1/(2 + Cos[a]), {a, 0, \[Pi]}];
myf1[a_?NumericQ] :=
NIntegrate[1/rhoMax 1/Sqrt[(t^2 - 1) (a^2 - t^2)], {t, 1, a}]
myf2[a_?NumericQ] :=
NIntegrate[2/\[Pi] 1/Sqrt[(1 - t^2) (a^2 - t^2)], {t, 0, 1}]

thek = a /. FindRoot[myf1[a] - myf2[a] == 0, {a, 2}]
bigA = 1/myf2[thek]


From which we find $A\approx 1.53126$ and $k\approx 1.6984$

We want to take a closer look at the real part of $g(z)$ shown in the first plot. We can do this using the 3D-rendering program AFRENDER in the menu. After selecting the program, readers should first review the short help function, then from the function list, choose the function $2.34476-w^2(1-z^2)(2.88435-z^2)$.

Readers will note two versions of the function. One has an "H" in front of the name. This signifies "holomorphic" branches. Selecting this version of the function gives the user the option of selecting branches from each half-plane of the function to construct a holomorphic branch. The half-planes are given as four "rings" to choose from: two rings for the upper plane and two for the lower. In order to see one version of a holomorphic branch, choose the following ring and branch configuration from the ring menu:

Holomorphic branch selections
RingRing Branches
1 0,0,1
2 1,1,0
3 0,1,1
4 1,0,0

2. #### Integrating over a half-plane

Although Mathematica has built-in functions to compute a Schwarz-Christoffef integral in terms of EllipticF, we obtain a more complete understanding of integrating over multi-valued functions if we design our own algorithm to compute this integral. We already have the technique to do so from earlier sections of this site: we form the associated differential equation, solve it via NDSolve, then integrate the solution over the desired path. And having the ability to plot the solution path over the real or imaginary surface of a cover, gives us an intuitive confidence that we are integrating over the correct surface of this multivalued function. Readers are encouraged to review the section on plotting algebraic functions for a review of this method.

The following Mathematica code computes the value of the integral for z=1+i over the blue upper half-plane:

(* express function in it's algebraic form *)
theA = 1.5312624348967;
theK = 1.6983963730242;
theFunction = theA^2 - (1 - z^2) (theK^2 - z^2) w^2;

(* integrate to 1+1 i over the blue covering (the principal-valued \
root *)
thez[t_] := t + t I;
tend = 1;
(* the choice of \[Sqrt](k^2) will determine which cover to integrate \
over *)
theroots = w /. NSolve[theFunction == 0 /. z -> thez[0]];
wstart = theroots[[2]];
wDeriv = w'[
t] == ((-(D[theFunction, z]/D[theFunction, w]) (D[thez[t],
t])) /. {w -> w[t], z -> thez[t]});
myazsol = First[NDSolve[{wDeriv, w[0] == wstart}, w, {t, 0, tend}]];
myCentralTrace[t_] = Evaluate[Flatten[w[t] /. myazsol]];
blueTrace =
ParametricPlot3D[{Re[z], Im[z], Re[myCentralTrace[t]]} /.
z -> t + t I, {t, 0, 1}, PlotStyle -> Red]

(* now integrate the solution over the path of integration *)
n1 = NIntegrate[myCentralTrace[t] D[thez[t], t], {t, 0, tend}]
zetaBluePoint =
Graphics[{Blue, PointSize[0.015], Point[{Re[n1], Im[n1]}]}];
zetaBluePointTranslated =
Graphics[{Blue, PointSize[0.015],
Point[{Re[n1 + \[Pi]/2], Im[n1]}]}];
(* as a check of the computations, compare the results to EllipticF *)

ellipticValue = N[theA/theK EllipticF[ArcSin[thez[tend]], 1/theK^2]];
Print["Value by integration: ", n1];
myk = NIntegrate[1/(2 + Cos[t]), {t, 0, \[Pi]}]
Print["EllipticF value:      ", ellipticValue];



We obtain $\zeta_b(1+i)=0.492972 + 0.970237i$

3. #### Plotting the integration results to the $\zeta$-plane

We can then integrate over a grid of points for each half-plane cover, that is, over the red, blue, green and yellow covers. And then map the values of $\zeta(z)=\xi+\eta i$ in the $\zeta$-plane with one addition: we need to translate the values by $\pm \pi/2$. This is illustrated in the next plot where we have also plotted the mapping of the ramified contour around the singular point z=1 and also the mappings for z=1+i over the red and blue sheets as the red and blue points in their corresponding red and blue sections of the plot. The red and blue points illustrate an important point of this mapping: for each value of z in the z-plane, there are two distinct points in the $\zeta$-plane. This is the beginning of resolving a double-valued function into a single valued function of the points in the $\zeta$-plane and then of the points $p$, over the torus.

4. #### Bending the double cover in the $\zeta$-plane into a torus

We now wish to map the double cover into a torus. If we are given the equations of the torus in the xyz-plane by \begin{align*} x(\alpha,\phi)=[R+\rho \cos(\alpha)]\cos(\phi) \\ y(\alpha,\phi)=[R+\rho \cos(\alpha)]\sin(\phi) \\ z(\alpha,\phi)=\rho \sin(\alpha) \end{align*} where R is the radius of the torus from its center to the center of the tube and $\rho$ is the radius of the tube, then the mapping from $\xi$ and $\eta$ in the $\zeta$ plane to $\alpha$ and $\phi$ is given by \begin{align*} \xi &= \phi \\ \eta &= \int_ 0^{\alpha}\frac {\rho} {R + \rho \cos(t)}dt \end{align*} so that as $\alpha$ and $\phi$ both vary from $-\pi$ to $\pi$, $\xi$ varies from $-\pi$ to $\pi$ and $\eta$ varies from $0$ to $p$ where $$p=\int_ 0^{\pi}\frac {\rho} {R + \rho \cos(t)}dt$$

A plot of this mapping onto the torus can be viewed with AFRender. Choose 'Torus' and then drop down the ring table and check the contour box to illustrate the contours over the torus.