zeta

Riemann zeta function.

Category: Mathematics > Mathematical Functions

Syntax

Y = zeta(z)

Evaluates the Riemann zeta function at z.

Description

For real(z) > 1 the zeta function is the sum 1 + 1/2^z + 1/3^z + ..., and it is extended to the rest of the complex plane by analytic continuation, with a single pole at z = 1. At even integers it has exact forms: zeta(2) = pi^2/6, zeta(4) = pi^4/90.

With a symbolic argument such as sym(2) the result is exact. The nontrivial zeros all lie in the strip 0 < real(z) < 1, and the Riemann hypothesis says they lie on real(z) = 1/2.

Input arguments

z
Real or complex scalar or array, or a symbolic number.

Output arguments

Y
Values of zeta(z), with the size of z. zeta(1) is Inf.

Example

Numeric and exact values

zeta([2 3 4])
zeta(sym(2))
zeta(sym(4))
Output
ans = 1×3

    1.6449    1.2021    1.0823
ans = pi^2/6
ans = pi^4/90

See also

bernoulli polylog harmonic logint