EllipticFunctions.jl documentation

Jacobi theta functions and related functions.

using EllipticFunctions
using Images
# array of complex values.
z = (1:-0.001:-1) .* im .+ (-1:0.001:1)';
# function z->RGB 
function colormap(z)
    if isinf(z) || isnan(z)
        return RGB(0, 0, 0)
    end
    r = mod(abs(z), 1.0)
    g = 2 * mod(angle(z), 0.5)
    b = mod(real(z) * imag(z), 1.0)
    if isnan(b)
        return RGB(0, 0, 0)
    end
    return RGB(
        (1.0 - cos(r-0.5))*8.0,
        (1.0 - cos(g-0.5))*8.0,
        (1.0 - cos(b-0.5))*8.0
    )
end
# function to be plottes
function f(z)
    return EllipticFunctions.wzeta(z; tau = 0.1 + 3im)
end
# raster image
image = colormap.(f(3*z))

Functions

The Weierstrass elliptic functions $\wp$, $\sigma$ and $\zeta$ are vectorized in the variable $z$. That means you do not need to use broadcasting in order to apply them to an array of $z$ values (this would be slower).

EllipticFunctions.ljtheta1Function
ljtheta1(z, tau)

Logarithm of the first Jacobi theta function.

Arguments

  • z: complex number or vector/array of complex numbers
  • tau: complex number with nonnegative imaginary part
EllipticFunctions.jtheta1Function
jtheta1(z, tau)

First Jacobi theta function.

Arguments

  • z: complex number or vector/array of complex numbers
  • tau: complex number with nonnegative imaginary part
EllipticFunctions.ljtheta2Function
ljtheta2(z, tau)

Logarithm of the second Jacobi theta function.

Arguments

  • z: complex number or vector/array of complex numbers
  • tau: complex number with nonnegative imaginary part
EllipticFunctions.jtheta2Function
jtheta2(z, tau)

Second Jacobi theta function.

Arguments

  • z: complex number or vector/array of complex numbers
  • tau: complex number with nonnegative imaginary part
EllipticFunctions.ljtheta3Function
ljtheta3(z, tau)

Logarithm of the third Jacobi theta function.

Arguments

  • z: complex number or vector/array of complex numbers
  • tau: complex number with nonnegative imaginary part
EllipticFunctions.jtheta3Function
jtheta3(z, tau)

Third Jacobi theta function.

Arguments

  • z: complex number or vector/array of complex numbers
  • tau: complex number with nonnegative imaginary part
EllipticFunctions.ljtheta4Function
ljtheta4(z, tau)

Logarithm of the fourth Jacobi theta function.

Arguments

  • z: complex number or vector/array of complex numbers
  • tau: complex number with nonnegative imaginary part
EllipticFunctions.jtheta4Function
jtheta4(z, tau)

Fourth Jacobi theta function.

Arguments

  • z: complex number or vector/array of complex numbers
  • tau: complex number with nonnegative imaginary part
EllipticFunctions.jtheta1dashFunction
jtheta1dash(z, tau)

Derivative of the first Jacobi theta function.

Arguments

  • z: complex number or vector/array of complex numbers
  • tau: complex number with nonnegative imaginary part
EllipticFunctions.lambdaFunction
lambda(tau)

Lambda modular function.

Arguments

  • tau: complex number with nonnegative imaginary part
EllipticFunctions.kleinjFunction
kleinj(tau)

Klein j-invariant function.

Arguments

  • tau: complex number with nonnegative imaginary part
EllipticFunctions.CarlsonRDFunction
CarlsonRD(x, y, z)

Carlson 'RD' integral.

Arguments

  • x,y,z: complex numbers; at most one of them can be zero
EllipticFunctions.CarlsonRFFunction
CarlsonRF(x, y, z)

Carlson 'RF' integral.

Arguments

  • x,y,z: complex numbers; at most one of them can be zero
EllipticFunctions.CarlsonRJFunction
CarlsonRJ(x, y, z)

Carlson 'RJ' integral.

Arguments

  • x,y,z,p: complex numbers; at most one of them can be zero
EllipticFunctions.ellipticEFunction
ellipticE(phi, m)

Incomplete elliptic integral of the second kind.

Arguments

  • phi: complex number, the amplitude
  • m: complex number, the squared modulus
ellipticE(m)

Complete elliptic integral of the second kind.

Arguments

  • m: complex number, the squared modulus
EllipticFunctions.ellipticFFunction
ellipticF(phi, m)

Incomplete elliptic integral of the first kind.

Arguments

  • phi: complex number, the amplitude
  • m: complex number, the squared modulus
EllipticFunctions.ellipticKFunction
ellipticK(m)

Complete elliptic integral of the first kind.

Arguments

  • m: complex number, the squared modulus
EllipticFunctions.ellipticPIFunction
ellipticPI(phi, n, m)

Incomplete elliptic integral of first kind.

Arguments

  • phi: complex number, the amplitude
  • n: complex number, the characteristic
  • m: complex number, the squared modulus
EllipticFunctions.ellipticZFunction
ellipticZ(phi, m)

Jacobi Zeta function.

Arguments

  • phi: complex number, the amplitude
  • m: complex number, the squared modulus
EllipticFunctions.EisensteinE2Function
EisensteinE2(q)

Eisenstein E-series of weight 2.

Arguments

  • q: nome, complex number; it must not be a negative real number and its modulus must be strictly smaller than 1
EllipticFunctions.EisensteinE4Function
EisensteinE4(q)

Eisenstein E-series of weight 4.

Arguments

  • q: nome, complex number; it must not be a negative real number and its modulus must be strictly smaller than 1
EllipticFunctions.ellipticInvariantsFunction
ellipticInvariants(omega1, omega2)

Weierstrass elliptic invariants $g_1$ and $g_2$ from the half-periods.

Arguments

  • omega1,omega2: the Weierstrass half periods, complex numbers
EllipticFunctions.halfPeriodsFunction
halfPeriods(g2, g3)

Half-periods $\omega_1$ and $\omega_2$ from the elliptic invariants.

Arguments

  • g2,g3: the Weierstrass elliptic invariants, complex numbers
EllipticFunctions.wpFunction
wp(z; tau, omega)

Weierstrass p-function. One and only one of the parameters tau, omega or g must be given.

Arguments

  • z: complex number or vector/array of complex numbers
  • tau: half-periods ratio, complex number with non negative imaginary part
  • omega: half-periods, a pair of complex numbers
  • g: elliptic invariants, a pair of complex numbers
  • derivative: order of differentiation, 0, 1, 2 or 3
EllipticFunctions.wsigmaFunction
wsigma(z; tau, omega)

Weierstrass sigma-function. One and only one of the parameters tau, omega or g must be given.

Arguments

  • z: complex number or vector/array of complex numbers
  • tau: half-periods ratio, complex number with non negative imaginary part
  • omega: half-periods, a pair of complex numbers
  • g: elliptic invariants, a pair of complex numbers
EllipticFunctions.wzetaFunction
wzeta(z; tau, omega)

Weierstrass zeta-function. One and only one of the parameters tau, omega or g must be given.

Arguments

  • z: complex number or vector/array of complex numbers
  • tau: half-periods ratio, complex number with non negative imaginary part
  • omega: half-periods, a pair of complex numbers
  • g: elliptic invariants, a pair of complex numbers
EllipticFunctions.thetaCFunction
thetaC(z, tau)

Neville C-theta function. Only one of the parameters tau or m must be supplied.

Arguments

  • z: complex number or vector/array of complex numbers
  • tau: complex number with nonnegative imaginary part
  • m: complex number, square of the elliptic modulus
EllipticFunctions.thetaDFunction
thetaD(z, tau)

Neville D-theta function. Only one of the parameters tau or m must be supplied.

Arguments

  • z: complex number or vector/array of complex numbers
  • tau: complex number with nonnegative imaginary part
  • m: complex number, square of the elliptic modulus
EllipticFunctions.thetaNFunction
thetaN(z, tau)

Neville N-theta function. Only one of the parameters tau or m must be supplied.

Arguments

  • z: complex number or vector/array of complex numbers
  • tau: complex number with nonnegative imaginary part
  • m: complex number, square of the elliptic modulus
EllipticFunctions.thetaSFunction
thetaS(z, tau)

Neville S-theta function. Only one of the parameters tau or m must be supplied.

Arguments

  • z: complex number or vector/array of complex numbers
  • tau: complex number with nonnegative imaginary part
  • m: complex number, square of the elliptic modulus
EllipticFunctions.jellipFunction
jellip(kind, u; tau, m)

Jacobi elliptic functions. Only one of the parameters tau or m must be supplied.

Arguments

  • kind: a string with two characters among 'c', 'd', 'n' or 's'; this string specifies the function: the two letters respectively denote the basic functions sn, cn, dn and 1, and the string specifies the ratio of two such functions, e.g. ns=1/sn and cd=cn/dn
  • u: complex number or vector/array of complex numbers
  • tau: complex number with nonnegative imaginary part
  • m: complex number, square of the elliptic modulus
EllipticFunctions.amFunction
am(u, m)

Amplitude function.

Arguments

  • u: complex number or vector/array of complex numbers
  • m: complex number, square of the elliptic modulus

Index