Advanced maths

Jacobi theta function calculator with nome and argument

Evaluate Jacobi theta1 through theta4 and their first two argument derivatives for a real nome.

Your numbers

Enter finite values within the stated bounds; coordinate rows may use commas.
Enter finite values within the stated bounds; coordinate rows may use commas.

Calculated on your device. Your inputs aren’t sent to us.

Your result

Ready when you are

Enter your inputs and select Calculate.

Report an issue

Behind the numbers

How this calculation works

Evaluate Jacobi theta1 through theta4 and their first two argument derivatives for a real nome.

THE FORMULAθ3(z,q)=1+2Σqⁿ² cos(2nz); θ1 uses odd sine harmonics with q^(n+1/2)².

A worked example

At q=0.2,z=0.4, theta1≈0.4710539467 and theta3≈1.2785884902.

Good to know

Real nome0.0001–0.8 and real argument within±20radians. Fourier sums with rapidly decreasing tails and100-term cap. Derivatives are with respect to argument z, not nome q; complex periods and near-unit nomes unsupported.

Four related functions with fixed conventions

Jacobi theta functions form a family of four periodic or quasiperiodic analytic functions. Their Fourier series differ by sine versus cosine terms, alternating signs and integer versus half-integer exponents of the nome. Those differences determine zeros, symmetry and normalization.

This calculator uses the argument-and-nome convention theta j of z and q. It does not ask for the lattice parameter tau directly. In the common relation q equals exp pi i tau, the factor pi is part of the convention and should not be omitted when converting from a lattice description.

Rapid Fourier decay for a real nomeq = 0.2, z = 0.4θ3 ≈ 1.278588θ1 is oddθ2, θ3, θ4 are even
Scroll across to see the full diagram.
For q=0.2, theta3 starts with1 and a leading2q cos(2z) correction.

Compare this with the Jacobi elliptic sn cn dn calculator from argument and parameter. Evaluate theta 1 through theta 4 and derivatives under a stated nome convention; sn, cn and dn are elliptic ratios rather than the underlying theta outputs.

Argument and nome play different roles

The argument z is entered in radians. It controls the trigonometric oscillations in the series. The real nome q lies strictly between zero and one and controls how strongly higher Fourier modes are suppressed. It is not an angular argument or a plain frequency multiplier.

As q approaches one, many more modes become relevant. The page therefore imposes an upper bound of zero-point-eight instead of claiming an unimplemented modular-transformation treatment of every near-unit nome. A valid mathematical theta function outside this range is not a valid input to this bounded implementation.

Checking the default Fourier sums

At q equal to zero-point-two and z equal to zero-point-four, theta1 is approximately 0.4710539467 and theta3 is approximately 1.2785884902. The other two theta values and all first and second argument derivatives appear in the returned table.

For theta3, the leading correction to one is twice q times cos of twice z. The next correction uses q to the fourth power and cos of four z, so it is already much smaller for the default nome. This explains the rapid numerical convergence without replacing the full sum by its first term.

How the four series are assembled

Theta1 and theta2 use odd angular frequencies, with powers q to n-plus-one-half squared. Theta1 uses a sine and alternating signs; theta2 uses a cosine without that alternation. Theta3 and theta4 start with one and then use even cosine frequencies and integer-square nome powers.

The implementation generates all four families together. Each series contribution also supplies its analytic first and second derivatives by differentiating the sine or cosine factor. This avoids estimating derivatives from finite differences of nearly equal function values at nearby arguments.

Convergence and stopping behavior

Terms shrink essentially as q to a squared index, much faster than an ordinary geometric sequence at the supported nomes. The stopping test accounts for the frequency factors appearing in second derivatives, not just the undifferentiated function term. A hard term cap also bounds computation.

Finite arithmetic still limits relative accuracy near a zero, where a small absolute rounding error can represent a large relative discrepancy. Compare absolute residuals or suitable identities there. Displayed decimal places are a formatting choice rather than a guarantee of a fixed number of correct relative digits at every argument.

Symmetry and derivative checks

Theta1 is odd in the argument, while theta2, theta3 and theta4 are even. Consequently theta1 vanishes at zero and the first derivatives of the other three vanish there. These identities offer simple checks that do not require a second numerical special-function library.

Shifting the argument by pi gives the expected periodic or sign-changing behavior according to the family. Ensure another implementation uses the same z normalization before comparing. Some interfaces absorb pi into their argument, making a direct comparison of equally written numeric inputs misleading.

Using values without changing the problem

Theta functions are building blocks for elliptic functions, heat kernels and lattice sums, but those applications impose additional parameter conventions. This page supplies the named theta values and argument derivatives. It does not infer a physical period, modulus or two-dimensional lattice from a real nome alone.

If your model supplies a complex nome, convert and evaluate it with a library that explicitly supports that domain. Replacing a complex nome by its magnitude discards phase information and generally changes the function. The restricted real-nome interface makes that unsupported substitution impossible to do silently.

A few questions, answered

Are derivatives taken with respect to q?

No. The returned derivatives are with respect to the argument z in radians.

Why is q limited to0.8?

This implementation uses bounded Fourier summation and does not implement all near-unit-nome acceleration cases.

Which theta function is odd?

Theta1 is odd in the argument; the other three returned theta functions are even.

Can I enter tau instead of the nome?

No. Convert using the intended convention first; this interface expects q, not tau.

Find your calculator

Start typing to explore the library.