Function Repository Resource:

MakeEllipticFunction

Source Notebook

Build an elliptic function with given periods, zeros and poles

Contributed by: Jan Mangaldan

ResourceFunction["MakeEllipticFunction"][z,{p1,p2},{r1,},{s1,}]

builds an elliptic function of complex argument z with periods p1 and p2, zeros ri and poles si.

Details

The periods {p1,p2} define the fundamental period parallelogram for the resulting elliptic function. Their ratio must have nonzero imaginary part.
The number of zeros ri must be equal to the number of poles si, and must satisfy the congruence relation for some integers m and n.
A zero or pole of multiplicity k must be specified k times.
ResourceFunction["MakeEllipticFunction"][z,{p1,p2},{r1,},{s1,},f] gives an elliptic function built from the function f. Possible values of f include EllipticTheta and WeierstrassSigma, with EllipticTheta being the default.

Examples

Basic Examples (3) 

Build an elliptic function over a square lattice, with two zeros and two poles:

In[1]:=
f[z_] = ResourceFunction["MakeEllipticFunction"][
  z, {2, 2 I}, {1/2, (1 + I)/2}, {0, I/2}]
Out[1]=

Plot the real and imaginary parts of the elliptic function over a subset of the reals:

In[2]:=
ReImPlot[f[x], {x, -2, 2}, PlotLegends -> "ReIm"]
Out[2]=

Plot the real and imaginary parts of the elliptic function over a subset of the complex plane:

In[3]:=
ComplexContourPlot[{Re[f[z]] == 0, Im[f[z]] == 0}, {z, -2 - 2 I, 2 + 2 I}]
Out[3]=

Scope (2) 

Form an elliptic function with a single and a double zero and a triple pole:

In[4]:=
f[z_] = ResourceFunction["MakeEllipticFunction"][
  z, {2, 2 I}, {1/3 + 1/3 I, 1/3 + 1/3 I, -2/3 - 2/3 I}, {0, 0, 0}]
Out[4]=

Plot over the complex plane:

In[5]:=
ComplexPlot[f[z], {z, 2}, ColorFunction -> "CyclicLogAbsArg"]
Out[5]=

Form an elliptic function over the rhomboidal lattice with two triple zeros and one triple pole using the elliptic theta function:

In[6]:=
f1[z_] = ResourceFunction["MakeEllipticFunction"][
   z, {2, 1 + I Sqrt[3]}, {0, 0, 0, 2 + (2 I)/Sqrt[3], 2 + (2 I)/Sqrt[3], 2 + (2 I)/Sqrt[3]}, {1, (1 + I Sqrt[3])/2, (3 + I Sqrt[3])/2, 1 + I/Sqrt[3], 1 + I/Sqrt[3], 1 + I/Sqrt[3]}, EllipticTheta] // Quiet
Out[6]=

Use the Weierstrass sigma function to build the elliptic function:

In[7]:=
f2[z_] = ResourceFunction["MakeEllipticFunction"][
   z, {2, 1 + I Sqrt[3]}, {0, 0, 0, 2 + (2 I)/Sqrt[3], 2 + (2 I)/Sqrt[3], 2 + (2 I)/Sqrt[3]}, {1, (1 + I Sqrt[3])/2, (3 + I Sqrt[3])/2, 1 + I/Sqrt[3], 1 + I/Sqrt[3], 1 + I/Sqrt[3]}, WeierstrassSigma] //
   Quiet
Out[7]=

Show both functions in the complex plane:

In[8]:=
{ComplexContourPlot[{Re[f1[z]] == 0, Im[f1[z]] == 0}, {z, -3 - 3 I, 3 + 3 I}, PlotLabel -> "\[CurlyTheta]"], ComplexContourPlot[{Re[f2[z]] == 0, Im[f2[z]] == 0}, {z, -3 - 3 I, 3 + 3 I}, PlotLabel -> "\[Sigma]"]}
Out[8]=

The two functions differ by a constant multiple:

In[9]:=
ReImPlot[f1[x]/f2[x], {x, -2, 2}, PlotLegends -> "ReIm"]
Out[9]=
In[10]:=
N[f1[1/2]/f2[1/2]]
Out[10]=

Possible Issues (1) 

MakeEllipticFunction is left unevaluated if it is not possible to build an elliptic function from the specified data:

In[11]:=
ResourceFunction[
 "MakeEllipticFunction"][z, {Sqrt[2], 3 I}, {GoldenRatio, Power[2, (
  3)^-1]}, {0, I}]
Out[11]=

Version History

  • 1.0.0 – 09 March 2021

Source Metadata

Related Resources

License Information