The Math Forum

Search All of the Math Forum:

Views expressed in these public forums are not endorsed by NCTM or The Math Forum.

Math Forum » Discussions » sci.math.* » sci.math.symbolic

Notice: We are no longer accepting new posts, but the forums will continue to be readable.

Topic: incomplete-Gamma-based zeta, Li, and Phi numerics
Replies: 2   Last Post: Nov 22, 2012 7:35 PM

Advanced Search

Back to Topic List Back to Topic List Jump to Tree View Jump to Tree View   Messages: [ Previous | Next ] Topics: [ Previous | Next ]

Posts: 1,245
Registered: 4/26/08
incomplete-Gamma-based zeta, Li, and Phi numerics
Posted: Nov 19, 2012 4:55 PM
  Click to see the message monospaced in plain text Plain Text   Click to reply to this topic Reply

I have looked into R.E. Crandall's formulae for the numerical evaluation
of the Riemann zeta function, the polylogarithm, and the Lerch
transcendent, which appeared earlier this year:


These functions are here evaluated for complex orders and arguments via
rapidly convergent series in the upper incomplete gamma function. The
following machine-readable Derive expressions with corrections of some
misprints and misconceptions should facilitate their implementation in
computer-algebra systems. The auxiliary functions S(r) := r/(r^2)^(1/2)
and sinc(x) := sin(x)/x are used.

1. "Bernoulli series" formula for the Riemann zeta function (eq. 15):


The summation limits are preset for about 10 decimal digits accuracy.
This expansion beomes impractical for large Im(s) since the terms grow
exponentially with Im(s) whereas zeta(s) grows only logarithmically.
Note that the Bernoulli numbers BERNOULLI(n) vanish for odd n > 1.

2. "Riemann splitting" formula for the Riemann zeta function (eq. 16,


Here too, the summation limits are preset for about 10 digits accuracy,
and the expansion beomes impractical for large Im(s). Both remarks apply
to the other functions too, and will not be repeated.

3. "Bernoulli series" formula for the Hurwitz zeta function (eq. 29):


This expansion holds for all a /= 0, -1, -2, ... (My redefinition of
BERNOULLI_POLY(n,x) removes a minor problem with the implementation of
the Bernoulli polynomials in Derive.)

4. "Riemann splitting" formula for the Hurwitz zeta function (eq. 30):


Here, pi^s has been corrected to pi^(s/2). For 0 < Re(a) <= 1 if Im(a)
<= 0, and for 0 <= Re(a) < 1 if Im(a) > 0, this formula returns the
customary Hurwitz zeta function. Application of the functional equation
zeta(s,a) = zeta(s,a+1) + a^(-s) then allows to compute zeta(s,a) for
any other value of a. The Riemann zeta function is recovered for a=1:
zeta(s,1) = zeta(s).

5. "Bernoulli series" formula for the polylogarithm (eq. 34):


Here, the omission of a prefactor (2 pi)^(s-1) has been corrected, and
the polylogarithm argument has been converted from exp(-x) to z. This
expansion holds for any z /= 1, for z=1 one has to substitute Li(s,1) =
zeta(s). Note that Li(s,z) has a pole at z=1 if Re(s) <= 1.

6. "Riemann splitting" formula for the polylogarithm (eq. 37):


Here, the factors z^n and exp(- 2 pi i a u) have been corrected to 1.
This expansion hold for all complex z, although it returns Li(s,1) =
zeta(s) for Re(s) <= 1 too. Note that 2 cosh(n ln(z)) = z^n + z^(-n) and
2 sinh(n ln(z)) = z^n - z^(-n).

7. "Riemann splitting" formula for the Lerch transcendent (eq. 14):


For 0 < Re(a) <= 1 if Im(a) <= 0, and for 0 <= Re(a) < 1 if Im(a) > 0,
this formula returns the customary Lerch transcendent (not some
variant). Application of the functional equation Phi(z,s,a) = z
Phi(z,s,a+1) + a^(-s) then allows to compute Phi(z,s,a) for any other
value of a. The polylogarithm is recovered for a=1: z Phi(z,s,1) =
Li(s,z). The expansion returns Phi(1,s,a) = zeta(s,a) for Re(s) <= 1
too, whereas Phi(z,s,a) has a pole at z=1 if Re(s) <= 1. Note that exp(-
(2 pi i u + ln(z)) a) = exp(- 2 pi i u a) / z^a. The functional equation
(7) for the Lerch transcendent is not entirely correct, the corrected
equation was posted earlier this year in the thread "Inversion Lerch


Because the Derive kernel doesn't implement the upper incomplete gamma
function, I had to define it in order to check the above expansions:

_*z/(q_+i_),i_-1],[q_,i_],[s,m],m)) SUB 1

_+i_),i_-1],[q_,i_],[z,m],m)) SUB 1

incomplete_gamma(s,z,m:=30):=IF([23*RE(z),6.5*IM(z)]^2<m^2 OR (R~
E(z)<0 AND 6.5*ABS(IM(z))<m),gamma_fraction1(s,z,m),gamma_fracti~

This delivers 10 decimal digits for arbitrary complex z, but only as
long as s stays in the complex vicinity of s = 1/2. So this simple code
is in need of refinement: Nothing is done about the cancellation of
diverging terms near nonpositive integer s, and the fixed evaluation
depth of the continued fractions produces inaccurate results if z
happens to be close to a pole of the m-th convergent: the pole loci form
chains that sweep across the z-plane as s and m vary, whereas my
switching between the continued fractions is ignorant of s.

The series expansion of Gamma(s,z) in terms of generalized Laguerre
polynomials (eq. 25) simply reproduces the convergents of Legendre's
continued fraction (eq. 24):

gamma_fraction2(s,z,m) =
= (s-1)*gamma_series4(s-1,z,m) + z^(s-1)*exp(-z)


n_!*ll SUB n_*ll SUB (n_+1)),n_,1,m))

(My redefinition of GENERALIZED_LAGUERRE(n,a,x) removes a minor problem
with the implementation of the generalized Laguerre polynomials in
Derive.) Thus, the series can be used to analyze the convergence
behavior of the continued fraction, but it makes no sense at all to
compute Gamma(s,z) in this way.

Convergents of the complementary continued fraction obey a very similar

gamma_fraction1(s,z,m) = 1/s*(gamma_series3(s+1,z,m) - z^s*exp(-z))


n_!*ll SUB n_*ll SUB (n_+1)),n_,1,m))

How do the free computer-algebra systems compute Gamma(10^-100,-10),
say, to ten decimal digits? Do they try to evaluate continued fractions
only away from denominator roots?


Point your RSS reader here for a feed of the latest messages in this topic.

[Privacy Policy] [Terms of Use]

© The Math Forum at NCTM 1994-2018. All Rights Reserved.