WeierstrassP[u,{g2,g3}]
gives the Weierstrass elliptic function
.
WeierstrassP
WeierstrassP[u,{g2,g3}]
gives the Weierstrass elliptic function
.
Details
- Mathematical function, suitable for both symbolic and numerical manipulation.
gives the value of
for which
. - For certain special arguments, WeierstrassP automatically evaluates to exact values.
- WeierstrassP can be evaluated to arbitrary numerical precision.
- WeierstrassP can be used with CenteredInterval objects. »
Examples
open all close allBasic Examples (4)
WeierstrassP[2., {1, 2}]Plot over a subset of the reals:
Plot[WeierstrassP[x, {1, 2}], {x, -4, 4}]Plot over a subset of the complexes:
ComplexPlot3D[WeierstrassP[z, {1, 2}], {z, -2 - 2I, 2 + 2I}, PlotLegends -> Automatic]Series expansion at the origin:
Series[WeierstrassP[x, {g2, g3}], {x, 0, 12}]Scope (29)
Numerical Evaluation (7)
WeierstrassP[5., {1, 2}]//ChopWeierstrassP[12., {3, 2}]//ChopN[WeierstrassP[1 / 3, {1, 2}], 50]The precision of the output tracks the precision of the input:
WeierstrassP[3.111111111111111111111111, {1, 2}]WeierstrassP[2. + I, {I, I + 2}]Evaluate efficiently at high precision:
WeierstrassP[12`100, {3, 2}]//TimingWeierstrassP[13`10000, {4, 2}];//Timing//QuietWeierstrassP can be used with CenteredInterval objects:
WeierstrassP[CenteredInterval[1 / 2 + I / 3, (1 + I) / 10 ^ 9], {CenteredInterval[1 + I, (1 + I) / 10 ^ 9], CenteredInterval[3 / 4, 1 / 10 ^ 9]}]Compute average case statistical intervals using Around:
WeierstrassP[ Around[2, 0.01], {12, -8}]Compute the elementwise values of an array:
WeierstrassP[{{1 / 2, -1}, {1, 1 / 2}}, {12, -8}]Or compute the matrix WeierstrassP function using MatrixFunction:
MatrixFunction[WeierstrassP[#, {12, -8}]&, {{1 / 2, 1}, {0, 1 / 2}}]Specific Values (3)
Find the first positive minimum of WeierstrassP[x,1/2,1/2]:
xmin = x /. FindRoot[D[WeierstrassP[x, {1 / 2, 1 / 2} ], x] == 0, {x, 1}]Plot[WeierstrassP[x, {1 / 2, 1 / 2} ], {x, -6, 6}, Epilog -> Style[Point[{xmin, WeierstrassP[xmin, {1 / 2, 1 / 2} ]}], PointSize[Large], Red]]WeierstrassP automatically evaluates to simpler functions for certain parameters:
WeierstrassP[1, {12, -8}]Find a few singular points of WeierstrassP[x,{1/2,1/2}]:
xmin1 = FindRoot[D[WeierstrassP[x, {1 / 2, 1 / 2} ], x] == 0, {x, 1}][[1, 2]];
xmin2 = FindRoot[D[WeierstrassP[x, {1 / 2, 1 / 2} ], x] == 0, {x, 4}][[1, 2]];
a = xmin2 - xmin1//ChopTable[WeierstrassP[m a, {1 / 2, 1 / 2}], {m, -3, 3}]//QuietVisualization (2)
Plot the WeierstrassP function for various parameters:
Plot[{WeierstrassP[u, {2, 3}], WeierstrassP[u, {4, 3}], WeierstrassP[u, {4, 5}]}, {u, -4, 4}]ComplexContourPlot[Re[WeierstrassP[z, {1, 2}]], {z, -3 - 3I, 3 + 3I}, Contours -> 24]ComplexContourPlot[Im[WeierstrassP[z, {1, 2}]], {z, -3 - 3I, 3 + 3I}, Contours -> 24]Function Properties (10)
Real domain of WeierstrassP:
FunctionDomain[WeierstrassP[x, {g1, g2}], {x, g1, g2}]//FullSimplifyWeierstrassP is an even function with respect to x:
WeierstrassP[-x, {Subscript[``g``, 2], Subscript[``g``, 3]}]WeierstrassP threads elementwise over lists in its first argument:
WeierstrassP[{u1, u2}, {g2, g3}]
is not an analytic function of
:
FunctionAnalytic[WeierstrassP[x, {g1, g2}], x, Assumptions -> {g1, g2}∈ℝ]It has both singularities and discontinuities:
FunctionSingularities[WeierstrassP[x, {g1, g2}], x]//FullSimplifyFunctionDiscontinuities[WeierstrassP[x, {g1, g2}], x]//FullSimplify
is neither nondecreasing nor nonincreasing:
FunctionMonotonicity[WeierstrassP[x, {1, 2}], x]FunctionInjective[WeierstrassP[x, {1, 2}], x]//QuietPlot[{WeierstrassP[x, {1, 2}], 2}, {x, -6, 6}]FunctionSurjective[WeierstrassP[x, {3, 1}], x]Plot[{WeierstrassP[x, {3, 1}], -2}, {x, -5, 5}]
is neither non-negative nor non-positive:
FunctionSign[WeierstrassP[x, {1, 2}], x]
is neither convex nor concave:
FunctionConvexity[WeierstrassP[x, {1, 2}], x]//QuietTraditionalForm formatting:
WeierstrassP[z, {Subscript[g, 2], Subscript[g, 3]}] // TraditionalFormDifferentiation (2)
First derivative with respect to
:
D[WeierstrassP[u, {Subscript[``g``, 2], Subscript[``g``, 3]}], u]Higher derivatives with respect to
:
Table[D[WeierstrassP[u, {Subscript[``g``, 2], Subscript[``g``, 3]}], {u, k}], {k, 1, 4}]//FullSimplifyPlot the higher derivatives with respect to
:
Plot[Evaluate [% /. { Subscript[``g``, 2] -> 2, Subscript[``g``, 3] -> 3}, {u, -2.5, 2.5}, PlotLegends -> {"First Derivative", "Second Derivative", "Third Derivative", "Fourth Derivative"}]]Integration (3)
Compute the indefinite integral using Integrate:
Integrate[WeierstrassP[z, {g2, g3}], z]FullSimplify[D[%, z]]Integrate[WeierstrassP[z, {g2, g3}], {z, -1, 1}]Integrate[z WeierstrassP[z^2, {2, 3}], z]//FullSimplifyIntegrate[ WeierstrassP[z, {1, 2}]^2, {z, -2, 2}]//FullSimplifyIntegrate[(WeierstrassP[z, {g2, g3}] - WeierstrassE3[{g2, g3}]) ^ -2, z]Series Expansions (2)
Find the Taylor expansion using Series:
Series[WeierstrassP[x, {g2, g3}], {x, 0, 8}]Plots of the first three approximations around
:
terms = Normal@Table[Series[WeierstrassP[x, {3, 1}], {x, 0, m}], {m, 1, 5, 2}];
Plot[{WeierstrassP[x, {3, 1}], terms}, {x, -4, 4}]Taylor expansion at a generic point:
Series[WeierstrassP[x, {g2, g3}], {x, x0, 2}]//Normal// FullSimplifyApplications (5)
Express roots of a cubic through WeierstrassP:
With[{g2 = 2, g3 = 3}, x /. NSolve[4 x ^ 3 - g2 x - g3 == 0, x]]Module[{g2 = 2, g3 = 3, ω1, ω3}, {ω1, ω3} = WeierstrassHalfPeriods[N[{g2, g3}]];WeierstrassP[{ω1, -ω1 - ω3, ω3}, {g2, g3}]//Sort]Uniformization of a generic elliptic curve
:
{a0, a1, a2, a3, a4} = {1, 2, 3, 2, 1};
f[x_] := a0 x^4 + 4 a1 x^3 + 6 a2 x^2 + 4 a3 x + a4z0 = First[x /. Solve[f[x] == 0, x]]{ℊ2, ℊ3} = {a0 a4 - 4 a1 a3 + 3 a2^2, a0 a2 a4 + 2 a1 a2 a3 - a2^3 - a0 a3^2 - a1^2 a4};The parametrized uniformization:
x[z_] = z0 + f'[z0] / (4(WeierstrassP[z, {ℊ2, ℊ3}] - 1 / 24f''[z0]));
y[z_] = -f'[z0]WeierstrassPPrime[z, {ℊ2, ℊ3}] / (4(WeierstrassP[z, {ℊ2, ℊ3}] - 1 / 24f''[z0]) ^ 2);Check the correctness of the uniformization:
f[x[1 / 2]] - y[1 / 2] ^ 2//SimplifyDefine the Dixon elliptic functions:
cm[z_] := (3 WeierstrassPPrime[z, {0, 1 / 27}] + 1/3 WeierstrassPPrime[z, {0, 1 / 27}] - 1)sm[z_] := (6 WeierstrassP[z, {0, 1 / 27}]/1 - 3 WeierstrassPPrime[z, {0, 1 / 27}])These functions are cubic generalizations of Cos and Sin:
{sm'[z] == cm[z]^2 , cm'[z] == -sm[z]^2 , cm[z]^3 + sm[z]^3 == 1} /. z -> 1.5Real and imaginary periods of the Dixon elliptic functions:
{p1, p2} = 2WeierstrassHalfPeriods[{0, 1 / 27}]Plot the Dixon elliptic functions on the real line:
Plot[{cm[z], sm[z]}, {z, -2p1, 2p1}, PlotLegends -> {"cm", "sm"}]Visualize the Dixon elliptic functions in the complex plane:
{ComplexPlot[cm[z], {z, -p1 - 2p2, p1 + 2p2}], ComplexPlot[sm[z], {z, -p1 - 2p2, p1 + 2p2}]}//GraphicsRowSeries expansions of the Dixon elliptic functions:
{Series[cm[z], {z, 0, 12}], Series[sm[z], {z, 0, 12}]}Plot an elliptic function over a period parallelogram:
Module[{g2 = 2., g3 = 3, ω1, ω3},
{ω1, ω3} = WeierstrassHalfPeriods[{g2, g3}];Graphics[GeometricTransformation[ContourPlot[Evaluate[Im[Sign[WeierstrassP[(ω1 + I ω3) x - I (x + I y) ω3, {g2, g3}]]]], {x, -1, 1}, {y, -1, 1}, MaxRecursion -> 1]//First, Transpose[{ReIm[ω1], ReIm[ω3]}]]]]Compute the invariants corresponding to the lemniscatic case of the Weierstrass elliptic function, in which the ratio of the periods is
:
{g2, g3} = WeierstrassInvariants[{(1/2), (I/2)}]Parameterization of the Chen–Gackstatter minimal surface:
x[w_] := Re[π w - WeierstrassZeta[w, {g2, 0}] - (π/g2)WeierstrassPPrime[w, {g2, 0}]]y[w_] := Im[π w + WeierstrassZeta[w, {g2, 0}] - (π/g2)WeierstrassPPrime[w, {g2, 0}]]z[w_] := Sqrt[(6π/g2)]Re[WeierstrassP[w, {g2, 0}]]ParametricPlot3D[With[{w = r E^I θ}, {x[w], y[w], z[w]}], {r, 1 / 5, 4 / 5}, {θ, -π, π}, Mesh -> False]Properties & Relations (5)
Table[D[WeierstrassP[z, {g2, g3}], {z, k}], {k, 3}]Integrate expressions involving WeierstrassP:
Integrate[WeierstrassP[z, {g2, g3}] ^ 5, z]WeierstrassP is closely related to the elliptic exponential function EllipticExp:
ellipticExp[u_, {a_, b_}] := {4 WeierstrassP[2u, {(1/4)((a^2/3) - b), (1/8)(a/3)((b/2) - ((a/3))^2)}] - a / 3, 4WeierstrassPPrime[2u, {(1/4)((a^2/3) - b), (1/8)(a/3)((b/2) - ((a/3))^2)}]}ellipticExp[0.5, {3, 4}]EllipticExp[0.5, {3, 4}]WeierstrassP is periodic, with periods equal to twice the half-periods:
WeierstrassP[z + 2WeierstrassHalfPeriodW1[{g2, g3}], {g2, g3}]WeierstrassP[z + 2WeierstrassHalfPeriodW2[{g2, g3}], {g2, g3}]WeierstrassP[z + 2WeierstrassHalfPeriodW3[{g2, g3}], {g2, g3}]WeierstrassP values at its half-periods:
WeierstrassP[WeierstrassHalfPeriodW1[{g2, g3}], {g2, g3}]WeierstrassP[WeierstrassHalfPeriodW2[{g2, g3}], {g2, g3}]WeierstrassP[WeierstrassHalfPeriodW3[{g2, g3}], {g2, g3}]Possible Issues (1)
Neat Examples (1)
Plot a doubly periodic function over the complex plane:
Module[{g2 = 3, g3 = 1 + I, ω1, ω3}, {ω1, ω3} = WeierstrassHalfPeriods[{g2, g3}]//N;ParametricPlot3D[{Re[x ω1 + y ω3], Im[x ω1 + y ω3], Re[WeierstrassP[x ω1 + y ω3, {g2, g3}]]}, {x, -3, 3}, {y, -3, 3}, Mesh -> False, PlotRange -> {-3, 3}]]Tech Notes
Related Guides
Related Links
History
Introduced in 1988 (1.0) | Updated in 1996 (3.0) ▪ 2023 (13.3)
Text
Wolfram Research (1988), WeierstrassP, Wolfram Language function, https://reference.wolfram.com/language/ref/WeierstrassP.html (updated 2023).
CMS
Wolfram Language. 1988. "WeierstrassP." Wolfram Language & System Documentation Center. Wolfram Research. Last Modified 2023. https://reference.wolfram.com/language/ref/WeierstrassP.html.
APA
Wolfram Language. (1988). WeierstrassP. Wolfram Language & System Documentation Center. Retrieved from https://reference.wolfram.com/language/ref/WeierstrassP.html
BibTeX
@misc{reference.wolfram_2026_weierstrassp, author="Wolfram Research", title="{WeierstrassP}", year="2023", howpublished="\url{https://reference.wolfram.com/language/ref/WeierstrassP.html}", note=[Accessed: 12-June-2026]}
BibLaTeX
@online{reference.wolfram_2026_weierstrassp, organization={Wolfram Research}, title={WeierstrassP}, year={2023}, url={https://reference.wolfram.com/language/ref/WeierstrassP.html}, note=[Accessed: 12-June-2026]}