11
$\begingroup$

Perhaps I should have included the word "bug" in my question. Here we go

There is a bug in this Limit

Limit[3^s (-1 - 2^-s + Zeta[s]), s -> ∞]
(* 0 *)

which should be 1.

But I withdraw herewith (16 July, 2015) my former statement (8 July, 2015) that there is a bug in a specific Series[].

More elaboration below.

Trying to calculate coefficients of a Dirichlet series $f(s)=\sum _{n=1}^{\infty } a( n) n^{-s}$ using Limit[] reveals a strange behaviour of Mathematica 10.1

Here's a simple example.

Let

f[s_]:=Zeta[s]

and

b[n_, s_] := n^s (f[s] - Sum[1/k^s, {k, 1, n - 1}])

then we would expect to get the first four Dirichlet coefficients from

{Limit[Zeta[s], s -> ∞], 
 Limit[2^s (-1 + Zeta[s]), s -> ∞], 
 Limit[3^s (-1 - 2^-s + Zeta[s]), s -> ∞], 
 Limit[4^s (Zeta[s] - 1 - 2^-s - 3^-s), s -> ∞]}

But the output is

(*
{1, 1, 0, -∞}
*)

The first two limits are ok, the third and fourth limits are wrong, as they must be 1 as well.

On the other hand, plotting b[n,s] shows that the limits are 1.

What's going on here?

Remark:
The standard procedure to calculate the Dirichlet coeffients of a given function f(s) employs this formula

a[n_]:= n^σ Limit[(1/(2 T)
      Integrate[f[σ + I t] n^(I t), {t, -T, T}]), 
   T -> ∞]

For details see https://mathoverflow.net/questions/30975/dirichlet-series-expansion-of-an-analytic-function

But I wanted to take a seemingly simpler approach.

Expansion of Dirichlet series with the function Series[]

It is interesting to study the expansion of a Dirichlet series with the function Series[], and especially about the point about s = ∞. I shall confine the explication here to the case of the famous Riemann zeta function.

The documentation of Series[] points out as an issue:

Some functions cannot be decomposed into series of power-like functions:

Series[Zeta[s], {s, \[Infinity], 10}]

(*
Out[26]= 1 + 2^-s + 3^-s + 4^-s + 5^-s + 6^-s + 7^-s + 8^-s + 9^-s + 10^-s
*)

Now consider this limit for various numbers n of expansion terms

Table[{n, Limit[Series[2^s (Zeta[s] - 1), {s, \[Infinity], n}] // Normal, 
   s -> \[Infinity]]}, {n, 0, 3}]

(*
Out[36]= {{0, 0}, {1, 0}, {2, 1}, {3, 1}}
*)

That is, if we wish to collect terms up to s^k we need to Series[] expand up to ar least k. Sorry for pointing out "trivialities", but we are not dealing with well known power series here.

The next example show the importance of this rule more drastically

Table[{n, Limit[
   Series[3^s (Zeta[s] - 1 - 2^-s), {s, \[Infinity], n}] // Normal, 
   s -> \[Infinity]]}, {n, 0, 5}]

(*
Out[38]= {{0, -\[Infinity]}, {1, -\[Infinity]}, {2, 0}, {3, 1}, {4, 1}, {5, 1}}
*)
$\endgroup$
  • 2
    $\begingroup$ To help with diagnostics: try expanding the expressions you have as a series at infinity. $\endgroup$ – J. M. will be back soon Jul 8 '15 at 9:17
  • $\begingroup$ @J.M.: Ok I'll add it. I did that already for myself before posting hoping to get some insight. But see for yourself. $\endgroup$ – Dr. Wolfgang Hintze Jul 8 '15 at 9:22
  • 1
    $\begingroup$ I only have gedanken Mathematica at the moment, which is why I was asking you to try it for me… :) $\endgroup$ – J. M. will be back soon Jul 8 '15 at 9:26
  • 1
    $\begingroup$ I get the same results in Mathematica version 8. @J.M. I also tried Gedanken Mathematica version 8, but it crashed my kernel... $\endgroup$ – Jens Jul 9 '15 at 22:57
  • 1
    $\begingroup$ Bug fixed in 10.4 (not sure if it had been fixed in an earlier version) $\endgroup$ – user58955 Mar 26 '16 at 4:08
5
$\begingroup$

I have found a simple method to mitigate the limit bug: using an intermediate Series[], the Dirichlet coefficients of a function f[x] can be calculated correctly as a Limit[].

The formulas for the coefficients are

cD := Module[{},
  a[1] = Limit[f[x], x -> ∞];
  a[n_] := 
   a[n] = Limit[
     Series[n^x (f[x] - Sum[a[k] k^-x, {k, 1, n - 1}]), {x, ∞, 
        n}] // Normal, x -> ∞]]

Example 1: Zeta[x]

ClearAll[f, a]
f[x_] := Zeta[x]
cD
t = Table[{n, a[n] }, {n, 1, 10}]

(*
Out[41]= {{1, 1}, {2, 1}, {3, 1}, {4, 1}, {5, 1}, {6, 1}, {7, 1}, {8, 1}, {9, 1}, {10, 1}}
*)

Example 2: 1/Zeta[x]

ClearAll[f, a]
f[x_] := 1/Zeta[x]
cD
t = Table[{n, a[n], MoebiusMu[n] }, {n, 1, 10}]

(*
Out[45]= {{1, 1, 1}, {2, -1, -1}, {3, -1, -1}, {4, 0, 0}, {5, -1, -1}, {6, 1, 1}, {7, -1, -1}, {8, 0, 0}, {9, 0, 0}, {10, 1, 1}}
*)

Example 3: Zeta[2 x]/Zeta[x]

ClearAll[f, a]
f[x_] := Zeta[2 x]/Zeta[x]
cD
t = Table[{n, a[n] , LiouvilleLambda[n]}, {n, 1, 10}]

(*
Out[50]= {{1, 1, 1}, {2, -1, -1}, {3, -1, -1}, {4, 1, 1}, {5, -1, -1}, {6, 1, 1}, {7, -1, -1}, {8, -1, -1}, {9, 1, 1}, {10, 1, 1}}
*)

Example 4: DirichletEta[x]

ClearAll[f, a]
f[x_] := DirichletEta[x]
cD
t = Table[{n, a[n] }, {n, 1, 10}]

(*
Out[9]= {{1, 1}, {2, -1}, {3, 1}, {4, -1}, {5, 1}, {6, -1}, {7, 1}, {8, -1}, {9, 1}, {10, -1}}
*)

Example 5: RamanujanTauL[x] not applicable

ClearAll[f, a]
f[x_] := RamanujanTauL[x]

Method not applicable because both

Limit[RamanujanTauL[x], x -> ∞]

(*
Out[19]= Limit[RamanujanTauL[x], x -> ∞]
*)

and

Series[RamanujanTauL[x], {x, ∞, 2}]

(*
Out[20]= RamanujanTauL[x]
*)

Are returned unevaluated.

Observations

1) This method to calculate the Dirichlet coefficients is limited by the ressources of the machine and those of Mathematica.

2) Cross reference What are the terms of the sequence generated by Zeta(3s)/Zeta(s)? (March 19, 2015) Here I have used the naive limit approach for the first time.

$\endgroup$
  • $\begingroup$ Does your approach work on DirichletEta[] and RamanujanTauL[]? $\endgroup$ – J. M. will be back soon Jul 16 '15 at 9:04
  • $\begingroup$ @J.M.: I have included these examples in my answer. $\endgroup$ – Dr. Wolfgang Hintze Jul 16 '15 at 10:27
  • $\begingroup$ Wunderbar! Danke! $\endgroup$ – J. M. will be back soon Jul 16 '15 at 10:32
  • $\begingroup$ My pleasure ! . $\endgroup$ – Dr. Wolfgang Hintze Jul 16 '15 at 13:01
  • $\begingroup$ I have revised my original question. $\endgroup$ – Dr. Wolfgang Hintze Jul 16 '15 at 13:41

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.