Skip to content

EllipticTheta ​

The Jacobi theta function ϑa(u,q)\vartheta_a(u,q), a=1,2,3,4a=1,2,3,4 (DLMF 20.2), Wolfram's nome convention ∣q∣<1|q|<1.

✓ checked against that system · ! checked, with disagreements (hover a chip)Wolfram LanguageEllipticTheta!
EllipticTheta(a, u, q)the a-th Jacobi theta function (a = 1, 2, 3, or 4), argument u, nome q.
Typed signatures
TypePackageApplies
(number, number, number) -> numberanalyticalways

Domain: Special functions

Details
  • qq is the nome, ∣q∣<1|q| < 1 — the same convention mpmath's jtheta(a, u, q) uses, not the "half-period ratio" τ\tau some other references parameterize by.
  • Direct q-series (DLMF 20.2.1-20.2.4), term-summed until three consecutive terms fall under 10−1510^{-15} or 20000 terms are reached.
  • Declines when ∣q∣≥1|q| \ge 1 (the series does not converge there at all), or when ∣q∣|q| is close enough to 1 that convergence isn't reached within that term cap — no modular (Jacobi imaginary) transform is implemented to extend the series further.
  • aa must be a concrete integer 1, 2, 3, or 4; any other value (including a symbolic a) stays unevaluated.
  • Verified against mpmath's jtheta and a Wolfram kernel at complex u, complex q, AND real negative q.
  • Numeric only — a symbolic u or q stays unevaluated; a floating-point argument (or N()) evaluates directly.

Examples

22 more kept as data, checked against the oracles
Basic #

A floating-point argument evaluates directly to a decimal

live ↗
InN(EllipticTheta(3,0.3,0.2))N(\mathrm{EllipticTheta}(3, 0.3, 0.2))Out1.331 293 558 113 586 51.331\,293\,558\,113\,586\,5

Known value · mpmath 1.3.0 jtheta

Scope #

Each of the four theta functions (a = 1)

live ↗
InN(EllipticTheta(1,0.3,0.2))N(\mathrm{EllipticTheta}(1, 0.3, 0.2))Out0.353 430 543 747 624 50.353\,430\,543\,747\,624\,5

Known value · mpmath 1.3.0 jtheta

A complex argument u

live ↗
InN(EllipticTheta(3,0.3+0.1i,0.2))N(\mathrm{EllipticTheta}(3, 0.3+0.1i, 0.2))Out1.338 012 245 244 520 2−0.046 698 857 386 200 96i1.338\,012\,245\,244\,520\,2-0.046\,698\,857\,386\,200\,96i

Known value · mpmath 1.3.0 jtheta

A negative real nome q

live ↗
InN(EllipticTheta(3,1,−0.3))N(\mathrm{EllipticTheta}(3, 1, -0.3))Out1.239 061 275 954 2731.239\,061\,275\,954\,273

Known value · mpmath 1.3.0 jtheta

A complex nome q, together with a complex u

live ↗
InN(EllipticTheta(2,0.5+0.5i,0.1+0.2i))N(\mathrm{EllipticTheta}(2, 0.5+0.5i, 0.1+0.2i))Out1.482 111 803 583 081 8+0.163 554 249 597 655 97i1.482\,111\,803\,583\,081\,8+0.163\,554\,249\,597\,655\,97i

Known value · mpmath 1.3.0 jtheta

At nome q=0q=0 only the constant term survives: ϑ3(u,0)=1\vartheta_3(u,0)=1

live ↗
InEllipticTheta(3,0.5,0)\mathrm{EllipticTheta}(3, 0.5, 0)Out11
Properties #

theta1(0,q) is 0 for any q — an odd function of u

live ↗
InN(EllipticTheta(1,0,0.5))N(\mathrm{EllipticTheta}(1, 0, 0.5))Out0.00.0

Known value · mpmath 1.3.0 jtheta

Possible issues #

|q| ≥ 1 is declined — the series diverges there

live ↗
InN(EllipticTheta(3,0.3,1))N(\mathrm{EllipticTheta}(3, 0.3, 1))OutEllipticTheta(3,0.3,1)\mathrm{EllipticTheta}(3, 0.3, 1)

Symbolic arguments are left unevaluated rather than guessed at

live ↗
InEllipticTheta(3,u,q)\mathrm{EllipticTheta}(3, u, q)OutEllipticTheta(3,u,q)\mathrm{EllipticTheta}(3, u, q)

u = 10^30 spans far more than 10^6 periods of π: u this far out has no argument reduction against its real period, so the guard in exceedsDoublePrecision's sibling (periodsExceedDouble, ce-patches/support/precise.ts) declines rather than return a wrong value.

live ↗
InN(EllipticTheta(1,1030,12))N(\mathrm{EllipticTheta}(1, 10^{30}, \frac{1}{2}))OutEllipticTheta(1,1.0⋅1030,0.5)\mathrm{EllipticTheta}(1, 1.0\cdot10^{30}, 0.5)

The true value (mpmath, dps=30) — still not computed here. Argument reduction at bignum precision (reduce u mod π before collapsing to a double) is deferred; this example only pins the gap, not a fix.

live ↗

Known value · mpmath 1.3.0 jtheta

About
Examples33
Checked againstWolfram Language 31 agree1 differ
CrosswalkWolfram Language

See also: EllipticThetaPrime, JacobiSN