# HP Forums

Full Version: CAS: sometimes doesn't detect Zeta series (Bug?)
You're currently viewing a stripped down version of our content. View the full version with proper formatting.
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,%%%}+%%%{-2,%%%},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.
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).
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.
Reference URL's
• HP Forums: https://www.hpmuseum.org/forum/index.php
• :
{"ft_lang_label":"__label__en","ft_lang_prob":0.8705705,"math_prob":0.9734276,"size":2193,"snap":"2021-21-2021-25","text_gpt3_token_len":719,"char_repetition_ratio":0.15486524,"word_repetition_ratio":0.3141994,"special_character_ratio":0.3620611,"punctuation_ratio":0.19348659,"nsfw_num_words":0,"has_unicode_error":false,"math_prob_llama3":0.9916566,"pos_list":[0],"im_url_duplicate_count":[null],"WARC_HEADER":"{\"WARC-Type\":\"response\",\"WARC-Date\":\"2021-06-21T09:21:39Z\",\"WARC-Record-ID\":\"<urn:uuid:0d5936d9-4955-4a18-8a0d-66b8a423fbf5>\",\"Content-Length\":\"6619\",\"Content-Type\":\"application/http; msgtype=response\",\"WARC-Warcinfo-ID\":\"<urn:uuid:5a2c0eb2-dc5b-4ac5-9014-e52a6ccd2e1b>\",\"WARC-Concurrent-To\":\"<urn:uuid:57bbbba0-2689-460c-ae74-7350bf252c1a>\",\"WARC-IP-Address\":\"209.197.117.170\",\"WARC-Target-URI\":\"https://www.hpmuseum.org/forum/archive/index.php?thread-2792.html\",\"WARC-Payload-Digest\":\"sha1:FIMRDBIBEXZVTSI7IM3BC6W25VLRTG4L\",\"WARC-Block-Digest\":\"sha1:2J5TTPUNZH4SRDG2HDJXDGXJLEHBO5UV\",\"WARC-Identified-Payload-Type\":\"application/xhtml+xml\",\"warc_filename\":\"/cc_download/warc_2021/CC-MAIN-2021-25/CC-MAIN-2021-25_segments_1623488269939.53_warc_CC-MAIN-20210621085922-20210621115922-00430.warc.gz\"}"}