zeta -- the Riemann zeta
function
Introductionzeta(z) represents the Riemann zeta
function sum(k^(-z),k=1..infinity).
Call(s)zeta(z)
Parametersz |
- | an arithmetical expression |
Returnsan arithmetical expression.
z
Side
EffectsWhen called with a floating point argument, the function is
sensitive to the environment variable DIGITS which determines the numerical
working precision.
Related
Functions
Detailszeta returns an unevaluated function call, if the
argument does not evaluate to one of the above numbers.
The float attribute of zeta is a kernel
function, i.e., floating point evaluation is fast. Use
zeta(float(z)) rather than float(zeta(z)),
because the evaluation of the intermediate exact result
zeta(z) may be costly for integers z of large
absolute value.
Example
1We demonstrate some calls with exact and symbolic input data:
>> zeta(-6), zeta(-5), zeta(-4), zeta(-3), zeta(-2), zeta(-1)
0, -1/252, 0, 1/120, 0, -1/12
>> zeta(0), zeta(2), zeta(3), zeta(4), zeta(5), zeta(6), zeta(7)
2 4 6
PI PI PI
-1/2, ---, zeta(3), ---, zeta(5), ---, zeta(7)
6 90 945
>> zeta(1/2), zeta(1 + I), zeta(z^2 -I)
2
zeta(1/2), zeta(1 + I), zeta(z - I)
Floating point values are computed for floating point arguments:
>> zeta(-1001.0), zeta(12.3), zeta(0.5 + 14.13472514*I)
-1.348590824e1771, 1.000199699,
0.0000000002163160213 - 0.000000001358779595 I
zeta has a pole at the point
z=1:
>> zeta(1)
Error: singularity [zeta]
Example
2Looking for roots of the Zeta function, we plot the function f(z)=abs(zeta(z)) along the ``critical line'' of complex numbers with real part 1/2:
>> plotfunc2d(Labels = ["", ""], Title = "", Grid = 500,
abs(zeta(1/2 + y*I)), y = 0..30)

The following procedure is a simple implementation of
the usual Newton method for finding numerical roots of zeta.
Note that numeric differentiation is used within the Newton step,
because MuPAD does not provide a symbolic derivative of
zeta:
>> NewtonStep := proc(z)
local h, f, f2, fprime;
begin
z := float(z);
h := 10^(-DIGITS/2.0)*(1 + abs(z));
f := zeta(z);
f2 := zeta(z + h);
fprime := (f2 - f)/h;
return(z - f/fprime)
end_proc:
The sequence z:=NewtonStep(z) converges to
a root, if the initial value is a sufficiently good approximation of
the root:
>> z:= 1/2 + 21*I: z := NewtonStep(z): z, abs(zeta(z))
0.5002926366 + 21.0220145 I, 0.0003338475592
>> z := NewtonStep(z): z, abs(zeta(z))
0.4999999108 + 21.02203966 I, 0.0000001039451698
>> z := NewtonStep(z): z, abs(zeta(z))
0.5 + 21.02203964 I, 1.387291733e-11
>> delete NewtonStep, z: