About the Project
20 Theta FunctionsComputation

§20.14 Methods of Computation

The Fourier series of §20.2(i) usually converge rapidly because of the factors q^{(n+\frac{1}{2})^{2}} or q^{n^{2}}, and provide a convenient way of calculating values of \theta_{j}\left(z\middle|\tau\right). Similarly, their z-differentiated forms provide a convenient way of calculating the corresponding derivatives. For instance, the first three terms of (20.2.1) give the value of \theta_{1}\left(2-i\middle|i\right) (=\theta_{1}\left(2-i,e^{-\pi}\right)) to 12 decimal places.

For values of \left|q\right| near 1 the transformations of §20.7(viii) can be used to replace \tau with a value that has a larger imaginary part and hence a smaller value of \left|q\right|. For instance, to find \theta_{3}\left(z,0.9\right) we use (20.7.32) with q=0.9=e^{i\pi\tau}, \tau=-i\ln\left(0.9\right)/\pi. Then \tau^{\prime}=-1/\tau=-i\pi/\ln\left(0.9\right) and q^{\prime}=e^{i\pi\tau^{\prime}}=\exp\left(\pi^{2}/\ln\left(0.9\right)\right)=%
(2.07\dots)\times 10^{-41}. Hence the first term of the series (20.2.3) for \theta_{3}\left(z\tau^{\prime}\middle|\tau^{\prime}\right) suffices for most purposes. In theory, starting from any value of \tau, a finite number of applications of the transformations \tau\to\tau+1 and \tau\to-1/\tau will result in a value of \tau with \Im\tau\geq\sqrt{3}/2; see §23.18. In practice a value with, say, \Im\tau\geq 1/2, \left|q\right|\leq 0.2, is found quickly and is satisfactory for numerical evaluation.