Riemann Zeta Function in Java

Older version of this page can be accessed here.

Riemann Zeta Function around the origin

The series Zeta =Riemann Zetaconverges in the half plane for each s=x+iy where x=Re(s) > 1.

It is known as the Riemann Zeta Function. The following serves as an extension or analytic continuation of Zeta for other values in the complex plane.

ζ(s) Alternating Zeta Function Real(s)>0 except at Real(s) =1

Equation (17) in [ew1]

Let s' = 1- s then

= 2(2π)-s'cos(s'π/2)Γ(s')ζ(s')

Real(s) < 0

Equation (10) in [ew1]

The clickable image above shows the domain of the zeta function (coloured by values of its range) with a pole at s = 1, one non-trivial zero in the upper right-hand corner and its conjugate at the bottom right-hand corner along the so-called critical (blue) line at x=1/2. You can also see the location of the so-called trivial zeros along the x-axis (y=0) at x = -2, -4 -6, and so on.

You can run a Java implementation of this by clicking the left image above.
(You need at least Java 1.5 Update 9 or later!)

Definitions : the Domain is a collection or set of complex numbers s=x+iy which may be imagined in terms of the corresponding pairs of numbers (x,y) in the ordinary plane. The Range is another collection or set of complex numbers w=u+iv given by some rule or mapping such as f(s) above. The point (x,y) or s=x+iy in the domain where the f(x+iy) = zero in the range is called a ZERO of the function.

Note : s = x+iy represents a complex number where i = square root of -1 (negative 1).

Riemann postulated that all the non-trivial zeros of this analytic continuation only occur on the line x = 1/2. So far no one has found a way to prove or disprove this statement, though most mathematicians suspect that Riemann's hypothesis is true.

Zeta

Figure 1

Definition : Modulus or length of f(s)=u+iv is defined as = (u^2+v^2)^(1/2)

The left image of Fig. 1 is the mapping of the analytic continuation in the range or w-plane of the straight line x=1/2 fixed, y=[0.0,55.0] in the domain or z-plane. The image on the right is the graph of the modulus of the range.

You can run a Java implementation of this by clicking the image of Fig. 1 above.
(You need at least Java 1.5 Update 9 or later!)

Note : In this Java program, a left mouse click will zoom in, right mouse will zoom out.

Figure 2

Figure 2

Fig. 2 is the plot of the modulus of f(x+iy)) against y[0,50] varying x from 0 to 1/2

Figure 3

Figure 3

Fig. 3 is the plot of the modulus of f(x+iy) against y[50.1,100] varying x from 0 to 1/2

As x is varied, you can see how the modulus or length of the Zeta function only ever approaches or is near zero when x approaches or is near 1/2. It has been numerically verified that the billions of non-trivial zeros occur on x=1/2, the so-called critical line, though that still does not constitute a rigorous mathematical proof.

The Java program above gives you a dynamic feel for this behaviour.

Figure 4

Figure 4

Fig. 4 is a comparison of two algorithms for approximating the modulus of the Rieman Zeta function at x=1/2 varying y[0,50].

The purple graph represents Z(y) as generated by the Riemann-Siegel method. This was provided by a C implementation by Glen Pugh in his 1992 Master of Science project. Its absolute (positive) value is in close agreement with the blue graph which is the modulus of f(s) as generated by Euler-van Wijngaarden algorithm for accelerating convergence of infinite series [wp].

3D Plot Modulus

The image above is an attempt at plotting the modulus of the zeta functions as a function of (x,y) in the plane with the x-axis cut along the so-called critical line of x=1/2 showing the non-trivial zeros for y =[-40,40] using a combination of Java and the PLPLOT software.

Figure 5

Figure 5.

If one imagines the complex plane split into four equal coloured areas as in Fig. 5 above, then it is possible to see which areas of the domain are mapped to the respective quadrants in the range by f(s) as shown in Fig. 6. zeros in the domain occur exactly where the four colours meet.

Riemann Zeta FunctionRiemann Zeta Function Contour Lines

Figure 6.

Fig. 6 shows the origin and the first four non-trivial zeros in the domain around x=[-16,16] y =[-32,32]. The trivial zeros can be seen to the left in the middle of the images, they occur when y = 0 and x = -2,-4,-6, and so on.

First Derivative of the Riemann Zeta FunctionFirst Derivative of the Riemann Zeta Function Contours

Figure 7.

Fig. 7 shows the origin and the first derivative of the Riemann Zeta Function in the domain around x=[-16,16], y =[-32,32]. The Riemann Hypothesis is equivalent to showing that the first derivative of has NO zeros in the interval 0 < Re(s) < 1/2

Second Derivative of the Riemann Zeta FunctionSecond Derivative of the Riemann Zeta Function Contours

Figure 8.

Fig. 8 shows the origin and the Second derivative of the Riemann Zeta Function in the domain around x=[-16,16], y =[-32,32]. Note that the second derivative of Zeta has two zeros near -0.36 ± 3.59i

The Riemann Hypothesis also implies that the second derivative of Zeta has NO zeros in the interval 0 < Re(s) < 1/2

Figure 9

Figure 9.

The left image above whose dimensions are approx. x=[0.13,0.88], y=[13.78,14.49] shows a close up of the first zero at x=1/2, y=14.13472514173469379045 and it also indicates which numbers in the domain centred about the first zero map onto the four quadrants in the range (middle image) whose dimensions are approx. x=[-0.38,0.31] y=[-0.41,0.37].

The image on the far right shows a plot of x against the modulus of f(x+iy). The lowest point occurs where x=1/2.

Figure 10

Figure 10.

The left image above whose dimensions are approx. x=[0.25,0.75], y=[236.28,236.78] shows a close up of the 100th. zero at x=1/2, y=236.5242296658162058 approx. and it also indicates which numbers in the domain centred about the 100th. zero map onto the four quadrants in the range (middle image) whose dimensions are approx. x=[-2.6,1.5] y=[-1.02,1.65].

The image on the far right shows a plot of x against the modulus of f(x+iy). The lowest point occurs where x=1/2.

Frequency of the spacing of the first 100000 zeroes

Figure 11.

The table of 100,000 zeros was obtained from Andrew Odlyzko:
Tables of zeros of the Riemann zeta function

Figure 12

Figure 12.

References

[ao] Odlyzko, Andrew, Home Page

Tables of zeros of the Riemann zeta function

[br] Riemann, Bernhard, Ueber die Anzahl der Primzahlen unter einer gegebenen Grösse

Riemann's original paper introducing his famous hypothesis, English translation in PS, PDF

[cyy] Yildirim, C. Yalçin, "A note on the second and third derivatives of Zeta" AMS, vol 124, No.8 1996

[ew] Weisstein, Eric W., et al.,

[ew1] "Riemann Zeta Function" From MathWorld--A Wolfram Web Resource
[ew2] "
Riemann Hypothesis" From MathWorld--A Wolfram Web Resource.

[gp] Pugh, Glen, Home Page

Riemann Hypothesis in a Nutshell - with animated plot of the zeta zeros.
Riemann Zeta Function Animation - zeta(1/2+it) in the complex plane

[hc] Cohen, Henry, Villegas, Fernando Rodriguez, Zagier, Don,

Convergence Acceleration of Alternating Series

available courtesy of Experimental Mathematics Volume 9 (2000)

[hl] Lundmark, Hans,

"Visualizing complex analytic functions using domain coloring"

[ja] Arias-de-Reyna, J.,

X-ray of the Riemann Zeta Function

[jbc] Conrey, J., Brian,

"The Riemann Hypothesis", Notices of the AMS (March 2003)

[js]Sondow, Jonathan

zeros of the Alternating Zeta Function on the Line Real(s) = 1

Amer. Math. Monthly 110 (2003) 435-437.

Available at http://arxiv.org/abs/math.NT/0209393

[kd] Devlin, K., "How Euler discovered the zeta function"

[wp] Press, William H., Flannery, Brian P., Teukolsky, Saul A., Vetterling, William T.,

Numerical Recipes in C: The Art of Scientific Computing
Cambridge University Press, 1988

See pp. 143-6 for Euler-van Wijngaarden algorithm.

Copyright © T. Majlath 2000-2009

Last Updated on 21 May 2009
By T. Majlath
Email: tmajlath AT melbpc.org.au