Post Reply 
CAS: sometimes doesn't detect Zeta series (Bug?)
01-04-2015, 08:27 AM (This post was last modified: 01-04-2015 08:32 AM by danielmewes.)
Post: #1
CAS: sometimes doesn't detect Zeta series (Bug?)
Per definition, `sum(1/n^s, n, 1, inf) = Zeta(s)` for s > 1.
However Giac doesn't detect this fact consistently, instead failing on evaluating the sum.

These work:
  • `sum(1/n^2, n, 1, inf)` evaluates to `1/6 * pi^2` (i.e. `Zeta(2)`)
  • `sum(1/n^3, n, 1, inf)` evaluates to `Zeta(3)`, which can be numerically evaluated through `approx(Zeta(3))`
  • in fact it seems that for any integer s>1 `sum(1/n^s, n, 1, inf)` evaluates correctly

These however don't work:
  • `sum(1/n^2.5, n, 1, inf)` "evaluates" to `sum(1/n^2.5, n, 1, inf)`
  • same for any other approximate number s
  • `sum(1/n^(5/2), n, 1, inf)` prints four warnings of the form "Warning, choosing root of [1,0,%%%{-4,[1]%%%}+%%%{-2,[0]%%%},0,1] at parameters values [<varying number. Different in each run, for example: 10, 79.52..., 4, 82.899...>]". Then just returns the original expression slightly rewritten `sum(1/(sqrt n * n^2), n, 1, inf)`.
  • `sum(1/n^(5/3), n, 1, inf)` occasionally freezes the Prime (not interruptible by pressing On, nor On+Symb. Requires hard reset). Other times it returns a big useless expression that still contains `n`, but no summation symbol or other definition of it: `-ln(abs(-(n^(1/3))²/((n+1)^(1/3))²+1))*((n+1)^(1/3))²/(n^(1/3))²`. On the PC with Xcas (Giac 1.1.3), this always evaluates to the slightly rewritten input `sum(1/((n^(1/3))^2*n), n, 1, inf)`
  • other fractions for `s` don't seem to work either, unless they simplify to an integer (e.g. `sum(1/n^(4/2), n, 1, inf)` works, since 4/2 = 2).

I would wish that all of these examples would evaluate to `Zeta(s)` (or the exact evaluation thereof we possible, like for even integers `s`).

In addition, the freeze and apparently non-deterministic behavior of `sum(1/n^(5/3), n, 1, inf)` suggest a second bug on the Prime.
Find all posts by this user
Quote this message in a reply
01-05-2015, 02:54 PM
Post: #2
RE: CAS: sometimes doesn't detect Zeta series (Bug?)
There is indeed a bug in the normal code, called by the hypergeometric recognition function, and also a bug in this one. They are now fixed in source and in Xcas.
I do not plan to add recognition of sum(1/n^k,n,...,inf) to Zeta(k) now. Unlike for rational fractions where there is an algorithm (partial fraction expansion), it would only work for this serie, it's too much work for almost no benefit (especially since there is no closed form of Zeta for rationals in giac).
Find all posts by this user
Quote this message in a reply
01-06-2015, 03:47 AM
Post: #3
RE: CAS: sometimes doesn't detect Zeta series (Bug?)
Thanks Bernard!

Quote:I do not plan to add recognition of sum(1/n^k,n,...,inf) to Zeta(k) now. Unlike for rational fractions where there is an algorithm (partial fraction expansion), it would only work for this serie, it's too much work for almost no benefit (especially since there is no closed form of Zeta for rationals in giac).

Sure, sounds reasonable.
The only benefit I can see in transforming this to Zeta(k) is that it would allow using the numeric approximation of Zeta (from GSL?) for such sums. I understand that it's not worth a lot of work though.
Find all posts by this user
Quote this message in a reply
Post Reply 




User(s) browsing this thread: 1 Guest(s)