### Section 4: Applying the Residue Theorem to Algebraic Functions


The reader is asked to review the sections in sequential order as each succeeding section builds on a previous section.

It should be no surprise to the reader after reading Sections 1 and 2 that we can apply the Residue Theorem to algebraic functions. Consider the following $4$-cycle branch expansions: \begin{align*} w_{1}(z)&=\frac{a_0}{z^{1/4}}+\frac{a_1}{z^{1/2}}+a_3 z^{1/4}+a_4 z^{1/2}, \\ w_{2}(z)&=\frac{a_0}{z^{1/4}}+\frac{a_1}{z^{1/2}}+\frac{a_2}{z}+a_3 z^{1/4}+a_4 z^{1/2}, \\ \end{align*} and from Sections 1 and 2, we know $$\begin{array}{ccc} \bint w_1(z)dz=0 &; & \bint w_2(z)dz=8\pi i a_2. \end{array}$$ In this section, we consider the sum of $j$ branch integrals over an annular ring enclosing $k$ singular points and show $$$$\frac{1}{2\pi i}\mathop\sum_{m=1}^{j}\bint w_{n_m}(z)dz= \sum_{s=1}^k \mathop\res_{z=z_s} w(z).$$$$ where the notation $n_m$ refers to the '$m$'th branch of cycle $n$.

However, we first need to expand and understand our illustrations of algebraic functions beyond the first disc of singular points. It's not uncommon for a sufficiently complex algebraic function to have more than 100 singular points dotted about the z-plane. And we can consider branch integrals around annular regions separated by these singular points as well as discs surrounding each singular point. We can plot these regions, devise contour integrals about them, compute their power expansions and compare the residues from the power expansions to numerical integrations about the branch and so numerically confirm Equation 1. Afterwards, we will discuss why Equation 1 is true based on the summatory function associated with an algebraic function.

### Annular branches of algebraic functions

We begin with $$$$f(z,w)=2 + 9 z^2 + 2 w^2 z^2.$$$$

In Figure 1 we color-code the two singular points for the function: The blue points are points of inflections where the function is bounded but has infinite derivative. At an inflection point $z$, we have $f(z,w)=\frac{dw}{dz}=0$ and $a_n(z)\neq 0$. The red points are poles where the function is unbounded with unbounded derivative and $a_n(z)=0$. These singular points partition the $z$-plane into two "rings". The first ring is inside the disc with $r\approx 0.4704$ and the second ring is $r>0.4704$

Table1: Ring table for $f(z,w)$
RingRing BranchesAnnular Domains
{0, 0}
1{{1, 1}, {2, 1}}{0.001000, 0.4704}
{-0.4714 I, 0.4714 I}
2{{1, 1}, {2, 1}}{0.4724, 0.6704}

Table 1 is the ring table for $f(z,w)$. In the first column is the ring number. The second column lists branch identifiers $(m,n)$. $m$ represents the base point for each branch, and $n$ the cycle number. As we discussed in Section 1, in order to effect the integrations over each branch, we need to identify an initial value that lies on the branch surface. To do this, we choose $z_0$ and compute NSolve[theFunction=0/.z->z0,w]. This gives us a list of the zeros to $f(z_0,w)=0$. The value of $m$ in the ring table is an index into that list giving us the value of $w(z_0)$ that is on the branch given by $(m,n)$. The next column are the ring dimensions separated by inflection points as blue and poles as red. For numerical approximations, we trim the ring dimensions smaller than the distance between singular points. And in the last ring, since it is unbounded, we simply choose a convenient size. In the table above, this trimming is approx $0.001$. Once we have the ring table for a function, and using the technique in Section 1, we can easily generate real and imaginary plots for the function in some range which includes all of the singular points of the function limited by the numerical accuracy of the integration method.

Figure 2 is a plot of the function where we have color-coded the branches in each ring.

Figure 3 shows the individual branches for the function labeled according to the ring table where we have also included sample integration paths in yellow for branches $(2,1)$ in both rings. Recall the notation $(2,1)$ refers to the second root, cycle length of one. If we use the notation $(m,n)$ for the branch then we wish to know the branch integrals for both rings. For example, using the notation $(m,n)$ for the function branch, we would like to know the value of the following integral over the second ring without evaluating the integrals:

$$\frac{1}{2\pi i} \bint \big[(1,1)+(1,2)\big]dz$$ We can compute the power expansions for these branches: \begin{align*} (1,1)&=-\frac{i}{z}-2.25 i z+2.53 iz^3-5.69 iz^5+\cdots\\ (2,1)&=\frac{i}{z}+2.25 iz-2.53 iz^3+5.69 iz^5 +\cdots \end{align*} and thus from Section 2, $$\frac{1}{2\pi i} \bint \big[(1,1)+(1,2)\big]dz=0$$ Now the annular rings are a little more interesting. Recall from single-valued theory, the power expansions of annular regions of a complex-analytic function often has an infinite series of negative powers. This is also the case of algebraic functions. We have for the second ring: \begin{align*} (1,1)&=-2.12i-\frac{0.23i}{z^2}+\frac{0.013i}{z^4}-\frac{0.0014i}{z^6}+\cdots \\ (2,1)&=-2.12i+\frac{0.23i}{z^2}+\frac{0.013i}{z^4}+\frac{0.0014i}{z^6}+\cdots \end{align*} and therefore neither branch has a residue which implies the branch integrals for these branches are both zero which we can confirm directly by integrating over these branches, thus confirming experimentally, Equation 1.

We now consider a more complicated function involving higher-ordered branches and residues which do not sum to zero. Consider $$$$u(z,w)=w^5(3 z^4-7 z^3+z^2-8)+w^4 \left(-4 z^3+4 z+2\right)-3 w^3 z+w^2 \left(-7 z^4-z\right)+w \left(9 z^4+z^3\right)-z^2+3 z+2$$$$ and the ring table in Table 2. This is a genus-12 algebraic function and can be viewed with AFRender. We wish to investigate the following analysis of this ring table:

We can investigate this table numerically and show the following: First note the pole between rings 9 and 10. Therefore the integrals of $w_k$ over the first 8 rings will sum to zero in each ring since these rings enclose no poles. The branches in these rings may or may not have residue terms but the sum over each ring will be zero. Now consider the first pole, $p_1$: If we make the transformation $z\to z+p_1$ and then compute the sum of the residues around this pole in it's first ring, we find that sum is approx $0.048$. Therefore, the sum of the branch integrals over rings 10 through 17 will sum to approx $(2\pi i)0.048$. Now consider the poles between rings $17$ and $18$. Again, we transform the variable $z$ to each of these poles and compute the sum of the residues. These residues are approx $0.2+0.42i$ and $0.2-0.42i$. Now consider the residue integrals over rings $18$ through $20$. The sum of the branch integrals over these branches will now equal $(2\pi i)(0.448)$. And the residue sum over the final pole is approx $0.885$ so that the sum of branch integrals over rings 21 and 21 will be $(2\pi i)0.885$.

Table 2: Ring table for $u(z,w)$
RingBranchesAnnular Domains
1{{1, 1}, {2, 1}, {3, 1}, {4, 1}, {5, 1}}{0.000100, 0.5105}
2{{1, 2}, {3, 1}, {4, 1}, {5, 1}}{0.5107, 0.5528}
3{{1, 4}, {5, 1}}{0.5530, 0.6924}
4{{1, 4}, {5, 1}}{0.6926, 0.8027}
5{{1, 1}, {2, 1}, {3, 2}, {5, 1}}{0.8029, 0.8717}
6{{1, 1}, {2, 1}, {3, 2}, {5, 1}}{0.8719, 0.8851}
7{{1, 2}, {3, 2}, {5, 1}}{0.8853, 0.8885}
8{{1, 2}, {3, 2}, {4, 1}}{0.8887, 0.8945}
9{{1, 1}, {2, 2}, {3, 2}}{0.8947, 0.9042}
{-0.9043}
10{{1, 1}, {2, 2}, {3, 2}}{0.9044, 0.9081}
11{{1, 1}, {2, 2}, {3, 2}}{0.9083, 0.9088}
12{{1, 3}, {2, 2}}{0.9090, 0.9246}
13{{1, 1}, {2, 2}, {3, 1}, {5, 1}}{0.9248, 0.9995}
14{{1, 1}, {2, 1}, {3, 1}, {4, 2}}{0.9997, 1.031}
15{{1, 1}, {2, 1}, {3, 1}, {4, 2}}{1.031, 1.071}
16{{1, 1}, {2, 1}, {3, 1}, {4, 2}}{1.072, 1.102}
17{{1, 1}, {2, 1}, {3, 1}, {4, 2}}{1.102, 1.111}
{0.4241 - 1.0268 I, 0.4241 + 1.0268 I}
18{{1, 1}, {2, 1}, {3, 1}, {4, 2}}{1.111, 1.237}
19{{1, 4}, {3, 1}}{1.237, 2.359}
20{{1, 1}, {2, 1}, {3, 1}, {4, 2}}{2.359, 2.389}
{2.389}
21{{1, 1}, {2, 1}, {3, 1}, {4, 2}}{2.389, 3.430}
22{{1, 1}, {2, 1}, {3, 1}, {4, 1}, {5, 1}}{3.430, 5.430}
The following Mathematica code, once the branch identifiers $(m,n)$ (see previous section for a description of these identifiers), have been determined, can be used to compute the residues:

#### Mathematica code

ringNum = 22;
resNum = 4;
residueList = {0.048, 0.2, 0.2, 0.8852};
myintvals = Table[{rmin, rmax, wstart, wend} = theInitialValues[[ringNum]];
rnorm = (rmin + rmax)/2;
theorder = manifoldOrders[[ringNum,mnum,2]];
xcod[t_] := rnorm*Cos[t]; xdcod[t_] = D[xcod[t], t];
ycod[t_] := rnorm*Sin[t]; ydcod[t_] = D[ycod[t], t];
tstart = thetStart; tend = thetStart + 2*Pi*theorder;
wSheet = theFunctionRoots[[manifoldOrders[[ringNum,mnum,1]]]];
wstart = wSheet /. z -> rnorm*Exp[I*tstart];
mysol = First[NDSolve[{theThetaDeriv /. \[Rho] -> rnorm, \[Psi][tstart] == wstart}, \[Psi], {\[Theta], tstart, tend}]];
myw[t_] := Evaluate[\[Psi][t] /. mysol];
integralValue = NIntegrate[myw[t]*(xdcod[t] + I*ydcod[t]), {t, tstart, tend},
AccuracyGoal -> 5, PrecisionGoal -> 6, MaxRecursion -> 20]; Print["Integral for ", manifoldOrders[[ringNum,mnum]],
" is ", integralValue];
integralValue, {mnum, 1, Length[manifoldOrders[[ringNum]]]}];
sum = 0;
For[i = 1, i <= Length[manifoldOrders[[ringNum]]], i++, sum += myintvals[[i]]; ];
resSum = 0;
For[i = 1, i <= resNum, i++, resSum += residueList[[i]]; ];
Print["Sum of integrals over ring ", ringNum, " is ", sum];
Print["2pi i * sum of residues is: ", resSum*2*Pi*I];
We wish to show now why equation (1) is valid. Consider the first pole at $p_1=-0.904$. We first translate axes via $z\to z+p_1$ and then compute the power expansions around this pole. We obtain: \begin{align*} w_{(1,1)}&=-3.28+143.84z-15202 z^2+\cdots \\ w_{(1,2)}&=0.352+0.422 z-0.92z^2+\cdots \\ w_{(1,3)}&=(0.45-0.88i)-(3.6-2.85i)z-(49.3+25.8i)z^2+\cdots\\ w_{(1,4)}&=(0.45+0.88i)-(3.6-2.85i)z-(49.37+25.8i)z^2+\cdots \\ w_{(1,5)}&=1.87+\frac{0.0481}{z}-136.88z+\cdots \end{align*} So therefore, the sum of the residues around this pole is approx. $0.0481$. Now consider the branch integrals around ring $12$. This ring has a $3$-cycle branch and a $2$-cycle branch. We obtain: \begin{align*} \bint (1,3)dz&\approx -1.2352i\\ \bint (1,2)dz&\approx 1.5376i \end{align*} And we find (by numerical computations), $-1.2352i+1.5376i\approx 2\pi i(0.0481)$. Consider the pole $p_4=2.389$. We again translate via $z\to z+2.389$ and compute the following expansions around this pole: \begin{align*} w_{(1,1)}&=(-0.61-2.51i)-(3.03-1.04i)z+(6.84+8.85i)z^2+\cdots \\ w_{(1,2)}&=(-0.61+2.5i)-(3.03+1.04i)z+(6.84-8.85i)z^2+\cdots \\ w_{(1,3)}&=-0.01+0.02z-0.02z^2+\cdots\\ w_{(1,4)}&=1.07+0.19z+0.04z^2+\cdots \\ w_{(1,5)}&=0.05+\frac{0.885}{z}+5.65z+\cdots \end{align*} Where we have in this case, the sum of the residues is approx $0.885$. We next look at the branch integrals over ring 22 and find: \begin{align*} \bint (1,1)dz&\approx 5.429-1.412\\ \bint (2,1)dz&\approx -5.429-1.412 \\ \bint (3,1)dz&\approx 0 \\ \bint (4,1)dz&\approx 0.0194+5.601i \\ \bint (5,1)dz&\approx -0.0194+5.601i \end{align*} with $\displaystyle \sum_{i=1}^5 \bint (i,1)dz\approx 2\pi i \sum_{s=1}^4 \mathop\res_{z=p_s}=2\pi i(0.885+0.2+0.2+0.048)\approx 8.376i$.

And it turns out there is a simple explanation for this result if we consider the summatory function of $w(z)$ defined by:

$$S[w(z)]=\sum_{i=1}^N \text{w/.NSolve[f(z,w)=0,w]}$$

where the Mathematica expression "w/.NSolve" means retrieve all values of w from the root solutions. $S[w(z)]$ is a single-valued analytic (meromorphic) function of $z$ except at the poles. And it is a simple matter to show, for example in the last case above, $$\sum_{i=1}^5 \bint (i,1)dz=\oint S[w(z)]dz=2\pi i\sum_{s=1}^4 \mathop\res_{z=p_s} S[w(z)].$$