The elliptic and modular functions below are defined for free arguments only. More information on elliptic functions can be found for example in Chandrasekharan [Cha85], and for modular functions and their use see Koblitz [Kob84].
Let f(z) be a modular function. Then f(z) may be written as a Fourier series f(z) = sum_(n in Z) a_(n) q^(n), where q = e^(2 pi i z), has at most finitely many nonzero coefficients a_(n) with n<0. Such a Fourier expansion of a modular function is called its q-expansion. In this and the next section we present intrinsics for q-expansions of the Eisenstein series and the Weierstrass wp-function.
Let z be a point in the upper half-plane and let L be a lattice in C. The Eisenstein series are defined as the coefficients of the Laurent Series expansion of the Weierstrass wp-function: wp(z, L) = ((1)/(z^2)) + sum_(2 <= k) G_k(L)(2k - 1)z^(2k - 2) where G_k(L) are the Eisenstein series. The normalization E_(2n)(z) = ((1)/(2 zeta(2n))) G_(2n)(z) ensures that E_(2n)(z) has a rational q-expansion.
Given a positive even integer k = 2n and a complex power series z with positive valuation, return the q-expansion of the normalized Eisenstein series E_(2n)(z).
Given a positive even integer k = 2n and a point t in the upper half plane, return the value of E_(2n)(z) at t.
Given a positive even integer k = 2n and a lattice L = [a, b] in the complex plane, return the value of the Eisenstein series E_(2n)(z) relative to the lattice L.
Given a positive even integer k = 2n and a binary quadratic form F = ax^2 + bxy + cy^2, return the value of the Eisenstein series E_(2n)(z) at the point tau = ( - b + Sqrt(b^2 - 4ac) )/(2a)
> C<i> := ComplexField();
> R<z> := PowerSeriesRing(C);
> E4<q> := Eisenstein(4, z);
> E4;
1 + 240*q + 2160*q^2 + 6720*q^3 + 17520*q^4 + 30240*q^5 + 60480*q^6 +
82560*q^7 + 140400*q^8 + 181680*q^9 + 272160*q^10 + 319680*q^11 +
490560*q^12 + 527520*q^13 + 743040*q^14 + 846720*q^15 + 1123440*q^16
+ 1179360*q^17 + 1635120*q^18 + 1646400*q^19 + O(q^20)
We now evaluate this series at the point z1 = 2.5 + i. Since the
expansion is in terms of q rather than z we first must calculate
the point q1 that corresponds to z1.
> q1 := Exp(2*Pi(RealField())*i*(2.5 +i)); > Evaluate(E4, q1); 0.559302852856190773766762411923186142082 + 0.E-29*iIf we are interested only in the value of E_(4) at a single point, then we can compute it directly:
> Eisenstein(4, 2.5 + i); 0.559302852856190773766762411923718318567 + 0.E-28*i
Return a normalized q-expansion of the Weierstrass wp-function: wp(z, L) = ((1)/(z^2)) + sum_(2 <= k) G_k(L)(2k - 1)z^(2k - 2) where G_k(L) are the Eisenstein series and WeierstrassSeries(z, q, p) = (2 pi i)^(-2)wp(q, z/(2 pi i)) Each term is an Eisenstein series, calculated to precision p.
Return a q-expansion as above, but no precision needs to be specified for power series.
Given a complex power series z with positive valuation and a point t =tau in the upper-half complex plane, return the normalized q-expansion of the Weierstrass wp-function. This is equivalent to evaluating the q-series expansion at q = e^(2pi itau).
Given a complex power series z with positive valuation and a lattice L = [a, b] in the complex plane, returns the normalized q-expansion of the Weierstrass wp-function relative to the lattice L.
Given a complex power series z with positive valuation and a binary quadratic form F = ax^2 + bxy + cy^2, this function returns the q-expansion of the Weierstrass wp-function at tau = ( - b + Sqrt(b^2 - 4ac) )/(2a)
The first Jacobi theta-function, theta(q, z), is defined by theta(q, z)=(1/i)sum_(n= - Infinity)^Infinity( - 1)^nq^((n + (1/2))^2)e^((2n + 1)i z)=2sum_(n=0)^Infinity( - 1)^nq^((n + (1/2))^2)sin(2n + 1)z.
Defined this way, theta satisfies theta(q, - z)= - theta(q, z), it is periodic with period 2pi in the second variable: theta(q, z + 2pi)= theta(q, z), and its zeroes are of the form m_1pi + m_2(log x/i) for any integers m_1, m_2.
For a free real or complex number q satisfying | q|<1, return the first of Jacobi's theta functions theta(q, z) as a power series expansion in z.
For real or complex numbers q, z satisfying | q|<1, return the value of theta(q, z), the first of Jacobi's theta functions.
For integer k >= 0, return the k-th derivative theta^((k))(q, 0) of theta(q, z) at z=0.
Given a complex power series z with positive valuation, return the q-expansion of Dedekind's eta-function. Note that the unnormalized series is returned, that is, the factor q^(1/24) is not removed. See [Lan87].
For free complex argument s with positive imaginary part, this returns q^(1/24)prod_(n=1)^Infinity(1 - q^n) where q=e^(2pi i s). This is the actual value of Dedekind's eta-function which is defined by eta(s)=e^(2pi i s/24) prod_(n=1)^Infinity(1 - e^(2pi i ns)).
Define g_2(z) = 60 G_4(z) and g_3(z) = 140G_6(z) where G_4 and G_6 are Eisenstein series. The discriminant of the elliptic curve corresponding to the complex lattice L_z spanned by 1 and z is given by Delta(z) = g_2(z)^3 - 27 g_3(z)^2 = (((2pi i)^6)/(1728)) (E_4(q)^3 - E_6(q)^2) If we take the normalization ( Delta)(z) = (1 /((2pi i)^6)) Delta(z) the q-expansion has rational coefficients.
Given a power series q over the real or complex field with positive valuation, return the q-expansion of the elliptic j-invariant. The expansion begins with j(q) = q^(-1) + 744 q + 196884 q + ... .Note that: j(q) = (((E_4(q))^3)/(Delta(q))) where E_4(q) = Eisenstein(4, q) and Delta(q) = Delta(q).
For free complex argument s with positive imaginary part, this returns the value of the elliptic j-invariant at s. This is a modular function of weight 0 whose Fourier expansion starts with j(s)=e^(-2pi i s) + 744e(2pi i s) + 196884e(2pi i s) + ... .
Given a lattice L = [a, b] in the complex plane, this function returns the value of the elliptic j-invariant of L. This is the j-invariant of tau where tau = a/b or tau = b / a, whichever is in the upper half complex plane.
For a binary quadratic form F = ax^2 + bxy + cy^2 with negative discriminant, this returns the elliptic j-invariant of F. This is the j-invariant of tau where tau = ( - b + Sqrt(b^2 - 4ac)) / (2a).
Given a complex power series z, this function returns a normalized q-series expansion of the discriminant Delta(z).
Given a point t in the upper half plane and a positive integer p, return the normalized q-series expansion of the discriminant Delta(q) evaluated at t to precision p.
Given a pair L = [a,b] of complex numbers generating a lattice in C, return the normalized q-series expansion of the discriminant Delta(q) evaluated at tau where tau = a/b or tau = b / a, whichever is in the upper half complex plane.
For free complex argument s with defined in the upper half-plane, this returns the value of Weber's function f, defined in such a way that j(s)=((f(s)^24 - 16)^3/f(s)^24).
For a complex power series g having positive valuation, this function returns the q-expansion of Weber's f_2 function f_2(x)=sqrt(2)eta(2x)/eta(x) defined in such a way that j(s)=((f_2(s)^24 + 16)^3/f_2(s)^24).
For free complex number s lying in the upper half-plane, this returns the value of Weber's function f_2, defined in such a way that j(s)=((f_2(s)^24 + 16)^3/f_2(s)^24).
> C<i> := ComplexField();
> R<x> := PowerSeriesRing(C);
> f2<q> := WeberF2(x);
> f2;
1.414213562373095048801688724198 +
(1.414213562373095048801688724198 + 0.370240244846530520584656749158*i)*q +
(1.365749227653380607592261217724 + 0.370240244846530520584656749158*i)*q^2 +
(2.77996279002647565639394994192 + 0.366010933793292419482272977069*i)*q^3 +
(2.78023959778761313408864734216 + 0.73625117863982294006692972623*i)*q^4 +
(4.145988825440993741680908559864 + 0.73626567226030370903683781951*i)*q^5 +
(5.56020175541059398072755542234 + 1.102276606053596128519110796579*i)*q^6 +
...