EllipticTheta[a,u,q]
gives the theta function
.
EllipticTheta[a,q]
gives the theta constant
.
EllipticTheta
EllipticTheta[a,u,q]
gives the theta function
.
EllipticTheta[a,q]
gives the theta constant
.
Details
- Mathematical function, suitable for both symbolic and numerical manipulation.
.
.
.
.- The
are only defined within the unit q disk,
; the unit disk forms a natural boundary of analyticity. - Within the unit q disk,
and
have branch cuts from
to
. - For certain special arguments, EllipticTheta automatically evaluates to exact values.
- EllipticTheta can be evaluated to arbitrary numerical precision.
- EllipticTheta automatically threads over lists.
- EllipticTheta can be used with Interval and CenteredInterval objects. »
Examples
open all close allBasic Examples (3)
Scope (20)
Numerical Evaluation (5)
EllipticTheta[2, 5, .5]EllipticTheta[3, .4, .5]N[EllipticTheta[3, 1 / 4, 1 / 3], 25]The precision of the output tracks the precision of the input:
EllipticTheta[3, 4, .50005555555500055005]EllipticTheta[3, .4 + I, .5I]Evaluate efficiently at high precision:
EllipticTheta[2, 5, .5`100]//TimingEllipticTheta[2, 5, .5`10000];//TimingEllipticTheta can be used with Interval and CenteredInterval objects:
EllipticTheta[2, 1, Interval[{0.47, 0.48}]]EllipticTheta[2, 1, CenteredInterval[1 / 4, 1 / 100]]Specific Values (3)
EllipticTheta[1, 0, 0]EllipticTheta evaluates symbolically for special arguments:
Table[EllipticTheta[j, z, 0], {j, 4}]EllipticTheta[1, Pi, 1 / 2]Find the first positive minimum of EllipticTheta[3,x,1/2]:
xmin = x /. FindRoot[D[EllipticTheta[3, x, 1 / 2]] == 0, {x, 2}]//QuietPlot[EllipticTheta[3, x, 1 / 2], {x, -1, 4}, Epilog -> Style[Point[{xmin, EllipticTheta[3, xmin, 1 / 2]}], PointSize[Large], Red]]Visualization (2)
Plot the EllipticTheta function for various parameters:
Plot[{EllipticTheta[1, x, 1 / 2], EllipticTheta[2, x, 1 / 2], EllipticTheta[3, x, 1 / 2], EllipticTheta[4, x, 1 / 2]}, {x, -6, 6}]ComplexContourPlot[Re[EllipticTheta[4, z, 1 / 3]], {z, -4 - 4I, 4 + 4 I}, Contours -> 24]ComplexContourPlot[Im[EllipticTheta[4, z, 1 / 3]], {z, -4 - 4I, 4 + 4 I}, Contours -> 24]Function Properties (10)
Real and complex domains of EllipticTheta:
Table[FunctionDomain[EllipticTheta[a, x, q], {x, q}], {a, 4}]Table[FunctionDomain[EllipticTheta[a, z, q], {z, q}, Complexes], {a, 4}]EllipticTheta is a periodic function with respect to
:
Table[FunctionPeriod[EllipticTheta[a, z, q], z], {a, 4}]EllipticTheta threads elementwise over lists:
EllipticTheta[{1, 2, 3, 4}, z, q]EllipticTheta[2, {Pi / 2, Pi}, 1 / 2]FunctionAnalytic[EllipticTheta[1, x, q], x, Assumptions -> 0 < q < 1]For example,
has no singularities or discontinuities:
FunctionSingularities[EllipticTheta[1, x, 1 / 2], x]//QuietFunctionSingularities[EllipticTheta[1, x, 1 / 2], x]//QuietFunctionDiscontinuities[EllipticTheta[1, x, 1 / 2], x]//Quiet
is neither nondecreasing nor nonincreasing:
FunctionMonotonicity[EllipticTheta[1, x, 1 / 2], x]FunctionInjective[EllipticTheta[1, x, 1 / 2], x]Plot[{EllipticTheta[1, x, 1 / 2], 1}, {x, -6, 6}]FunctionSurjective[EllipticTheta[1, x, 1 / 2], x]Plot[{EllipticTheta[1, x, 1 / 2], -5}, {x, -6, 6}]
is neither non-negative nor non-positive:
FunctionSign[EllipticTheta[1, x, 1 / 2], x]
is neither convex nor concave:
FunctionConvexity[EllipticTheta[1, x, 1 / 2], x]TraditionalForm formatting:
EllipticTheta[a, z, q] // TraditionalFormEllipticTheta[a, q] // TraditionalFormGeneralizations & Extensions (1)
EllipticTheta can be applied to a power series:
EllipticTheta[2, z, q - (q^2/2) + (q^3/9) + O[q]^4]Applications (11)
Plot theta functions near the unit circle in the complex q plane:
Plot[Re[EllipticTheta[1, 0.5, 0.9 Exp[I ϕ]]], {ϕ, -π, π}]Plot[Re[EllipticTheta[1, 0.5, 0.97 Exp[I ϕ]]], {ϕ, -π, π}]The number of representations of
as a sum of four squares:
Table[
SeriesCoefficient[Series[EllipticTheta[3, 0, q] ^ 4, {q, 0, n}], n], {n, 10}]Table[SquaresR[4, n], {n, 10}]Verify Jacobi's triple product identity through a series expansion:
Series[EllipticThetaPrime[1, q] - EllipticTheta[2, q]EllipticTheta[3, q]EllipticTheta[4, q], {q, 0, 9}]Conformal map from an ellipse to the unit disk:
w[z_, {a_, b_}] := With[{q = ((a - b/a + b))^2, aze = ArcSin[(z/Sqrt[a^2 - b^2])]}, (EllipticTheta[1, aze, q]/EllipticTheta[4, aze, q])]ParametricPlot[ReIm[w[ρ (2 Cos[φ] + I Sin[φ]), {2, 1}]], {ρ, 0, 1}, {φ, 0, 2π}, Mesh -> 15]Green's function for the 1D heat equation with Dirichlet boundary conditions and initial condition
:
T[{x_, t_}, x0_, L_] := (1/2L) (EllipticTheta[3, (π/2L) (x - x0), E^-((π/L))^2t] - EllipticTheta[3, (π/2L)(x + x0), E^-((π/L))^2t])Plot the time‐dependent temperature distribution:
Plot3D[T[{x, t}, 0.6, 1], {x, 0, 1}, {t, 0.01, 1 / 2}]Form Bloch functions of a one‐dimensional crystal with Gaussian orbitals:
ψ[𝓀_, x_, ϕ_] := (E^-(π ϕ x^2/2) EllipticTheta[3, π 𝓀 - (π I ϕ x/2), E^-π / 2 ϕ]/Sqrt[(2/ϕ) E^-(4 𝓀^2 π/ϕ)EllipticTheta[3, -(4 I 𝓀 π/ϕ), E^-(4 π/ϕ)]])Plot Bloch functions as a function of the quasi‐wave vector:
Plot3D[Re[ψ[𝓀, x, 1]], {x, -12, 12}, {𝓀, 0, 1 / 2}]Electrostatic potential in a NaCl‐like crystal with point-like ions:
q[x_, t_] := EllipticTheta[2, 2 π x, E^-t^2]φ[{x_, y_, z_}] := (16/π) NIntegrate[t q[x, t]q[y, t]q[z, t], {t, 0, ∞}]Plot the potential in a plane through the crystal:
ListContourPlot[Table[φ[{x, y, 0.3}], {x, -1, 1, 1 / 25}, {y, -1, 1, 1 / 25}]]A concise form of the Poisson summation formula:
x^1 / 4 EllipticTheta[3, 0, E^π x] == (2UnitStep[Im[x]] - 1) I x^-1 / 4 EllipticTheta[3, 0, E^π / x]% /. x -> -2.An asymptotic approximation for a finite Gaussian sum:
AsymptoticSum[E^-k^2, {k, 1, n}, {n, ∞, 2}]//FullSimplifyCompare the approximate and exact values for
:
% /. {n -> 10.}Underoverscript[∑, k = 1, 10]E^-k^2//NClosed form of iterates of the arithmetic‐geometric mean:
ArithmeticGeometricMeanIteration[n_, a_, b_] := With[{z = EllipticNomeQ[1 - ((b/a))^2]}, ArithmeticGeometricMean[a, b]{EllipticTheta[3, 0, z^2^n]^2, EllipticTheta[4, 0, z^2^n]^2}]Compare the closed form with explicit iterations:
Table[ArithmeticGeometricMeanIteration[n, 3., 5.], {n, 0, 4}]NestList[{Mean[#], GeometricMean[#]}&, {3., 5.}, 4]Form any elliptic function with given periods, poles and zeros as a rational function of EllipticTheta:
makeEllipticFunction[z_, {ω1_, ω3_}, zeros_List, poles_List] := Module[{c = π / (2 ω1), q = Exp[I π ω3 / ω1]},
(Product[EllipticTheta[1, c (z - r), q], {r, zeros}] / Product[EllipticTheta[1, c (z - s), q], {s, poles}]) (EllipticTheta[1, c (z - Last[poles]), q] / EllipticTheta[1, c (z - Last[poles] - (Total[zeros] - Total[poles])), q])] /; Length[zeros] == Length[poles] && Resolve[Exists[{μ, ν}, Element[{μ, ν}, Integers], Total[zeros] - Total[poles] == μ ω1 + ν ω3]]Form an elliptic function with a single and a double zero and a triple pole:
f[z_] = makeEllipticFunction[z, {1, I}, {1 / 3 + 1 / 3 I, 1 / 3 + 1 / 3 I, -2 / 3 - 2 / 3 I}, {0, 0, 0}]Plot the resulting elliptic function:
ComplexPlot[f[z], {z, -1.5 - 1.5I, 1.5 + 1.5I}, ColorFunction -> "CyclicReImLogAbs"]Properties & Relations (2)
Numerically find a root of a transcendental equation:
FindRoot[EllipticTheta[1, z, 1 / 3]^3 + EllipticTheta[3, z, 1 / 3] + z == 2, {z, 2}]Sum can generate elliptic theta functions:
Sum[(-1) ^ n q ^ (n ^ 2), {n, Infinity}]Possible Issues (4)
Machine-precision input is insufficient to give a correct answer:
EllipticTheta[1, 10. ^ 30, 1 / 2]Use arbitrary-precision arithmetic to obtain the correct result:
N[EllipticTheta[1, 10 ^ 30, 1 / 2], 20]The first argument must be an explicit integer between 1 and 4:
EllipticTheta[1 + (E + 1) ^ 2 - E ^ 2 - 2E - 1, 3., 1 / 2]Simplify[%]EllipticTheta has the attribute NHoldFirst:
Attributes[EllipticTheta]Different argument conventions exist for theta functions:
{Plot[EllipticTheta[1, z, (1/2)], {z, 0, 2π}],
Plot[EllipticTheta[1, (z/2π), (1/2)], {z, 0, 2π}]}{Plot[EllipticTheta[1, 2, q], {q, 0.1, 0.8}],
Plot[EllipticTheta[1, 2, Exp[I π (I τ)]], {τ, 0.1, 0.8}]}Neat Examples (1)
Visualize a function with a boundary of analyticity:
Module[{f, r = 0.995},
f[z_ ? NumberQ] := If[Abs[z] > r, 0, Sin[Arg[EllipticTheta[3, 1, z]] / 2] ^ 2];
DensityPlot[f[qx + I qy], {qx, qy}∈Disk[{0, 0}, r], PlotPoints -> 90, PlotRange -> All, Frame -> False, ColorFunction -> (Hue[2.72 #]&)]]ParametricPlot3D[{qr Cos[qϕ], qr Sin[qϕ], Abs[EllipticTheta[2, 2, qr E^I qϕ]]}, {qϕ, -π, π}, {qr, 0, 0.99}, BoxRatios -> {1, 1, 0.66}]See Also
ModularLambda DedekindEta KleinInvariantJ InverseEllipticNomeQ QPochhammer EllipticThetaPrime SiegelTheta WeierstrassSigma
Function Repository: MockTheta MakeEllipticFunction EisensteinE
Tech Notes
Related Guides
Related Links
History
Introduced in 1988 (1.0) | Updated in 2017 (11.2) ▪ 2021 (13.0) ▪ 2022 (13.1)
Text
Wolfram Research (1988), EllipticTheta, Wolfram Language function, https://reference.wolfram.com/language/ref/EllipticTheta.html (updated 2022).
CMS
Wolfram Language. 1988. "EllipticTheta." Wolfram Language & System Documentation Center. Wolfram Research. Last Modified 2022. https://reference.wolfram.com/language/ref/EllipticTheta.html.
APA
Wolfram Language. (1988). EllipticTheta. Wolfram Language & System Documentation Center. Retrieved from https://reference.wolfram.com/language/ref/EllipticTheta.html
BibTeX
@misc{reference.wolfram_2026_elliptictheta, author="Wolfram Research", title="{EllipticTheta}", year="2022", howpublished="\url{https://reference.wolfram.com/language/ref/EllipticTheta.html}", note=[Accessed: 12-June-2026]}
BibLaTeX
@online{reference.wolfram_2026_elliptictheta, organization={Wolfram Research}, title={EllipticTheta}, year={2022}, url={https://reference.wolfram.com/language/ref/EllipticTheta.html}, note=[Accessed: 12-June-2026]}