Opened 4 years ago

Closed 4 years ago

#19836 closed enhancement (fixed)

expansion of zeta using stieltjes-constants

Reported by: behackl Owned by:
Priority: major Milestone: sage-7.2
Component: symbolics Keywords:
Cc: rws Merged in:
Authors: Benjamin Hackl Reviewers: Ralf Stephan
Report Upstream: N/A Work issues:
Branch: f1d9bfa (Commits) Commit: f1d9bfa8a16e4dfb73b054da0a29bddc253d084a
Dependencies: #19834 Stopgaps:

Description

With the implementation of Stieltjes-constants from #19834 the expansion of the zeta-function can be improved to something like

sage: zeta(s).series(s==1)
1/(s-1) + euler_gamma - stieltjes(1)/2 * (s-1) + stieltjes(2)/6 * (s-1)^2  + ...

(see https://en.wikipedia.org/wiki/Stieltjes_constants).

Change History (9)

comment:1 Changed 4 years ago by behackl

  • Cc rws added

I suppose that---given the stieltjes-function is implemented in pynac---this only requires a change in the zeta1_series function in pynac.

I think I can adapt this and make a pull request on github; at least if there is a stieltjes-function.

comment:2 Changed 4 years ago by rws

  • Dependencies set to #19834

Yes. Dependency is set. This ticket would then just add doctesting of the expansion.

comment:3 follow-up: Changed 4 years ago by behackl

I've created a pull request here. Assuming this gets merged into pynac, the doctest here:

https://github.com/sagemath/sage/blob/master/src/sage/functions/transcendental.py#L81-L82

will fail and has to be removed in the ticket where pynac is updated.

This ticket here would then add the respective doctest of the form

sage: zeta(x).series(x==1, 4)
1*(x - 1)^(-1) + (euler_gamma) + (-1/2*stieltjes(1))*(x - 1) + (1/6*stieltjes(2))*(x - 1)^2 + (-1/24*stieltjes(3))*(x - 1)^3 + Order((x - 1)^4)

Or do you suggest a different procedure?

comment:4 in reply to: ↑ 3 Changed 4 years ago by rws

Replying to behackl:

Or do you suggest a different procedure?

It's fine. Maybe add one of the examples I just asked about in the pull requests.

comment:5 follow-up: Changed 4 years ago by rws

With the changes I get this, correct?

sage -t src/sage/functions/transcendental.py
**********************************************************************
File "src/sage/functions/transcendental.py", line 81, in sage.functions.transcendental.Function_zeta.__init__
Failed example:
    zeta(x).series(x==1, 1)
Expected:
    1*(x - 1)^(-1) + (euler_gamma + log(2) + log(pi) + 2*zetaderiv(1, 0)) + Order(x - 1)
Got:
    1*(x - 1)^(-1) + (euler_gamma) + Order(x - 1)
**********************************************************************

comment:6 in reply to: ↑ 5 Changed 4 years ago by behackl

Replying to rws:

With the changes I get this, correct?

sage -t src/sage/functions/transcendental.py
**********************************************************************
File "src/sage/functions/transcendental.py", line 81, in sage.functions.transcendental.Function_zeta.__init__
Failed example:
    zeta(x).series(x==1, 1)
Expected:
    1*(x - 1)^(-1) + (euler_gamma + log(2) + log(pi) + 2*zetaderiv(1, 0)) + Order(x - 1)
Got:
    1*(x - 1)^(-1) + (euler_gamma) + Order(x - 1)
**********************************************************************

Exactly, that is the doctest I mentioned above.

comment:7 Changed 4 years ago by behackl

  • Authors set to Benjamin Hackl
  • Branch set to u/behackl/functions/zeta-stieltjes-doc
  • Commit set to f1d9bfa8a16e4dfb73b054da0a29bddc253d084a
  • Status changed from new to needs_review

I've adapted the documentation of zeta(s) in order to reflect the special expansion at s==1; everything else has already happened on other tickets. :-)


New commits:

bdac71f19834: implement symbolic Stieltjes constants
0e1162bMerge tag '7.1.beta1' into symbolics/stieltjes-constants
f1d9bfamention stieltjes-constants in documentation of zeta

comment:8 Changed 4 years ago by rws

  • Milestone changed from sage-7.0 to sage-7.2
  • Reviewers set to Ralf Stephan
  • Status changed from needs_review to positive_review

LGTM.

comment:9 Changed 4 years ago by vbraun

  • Branch changed from u/behackl/functions/zeta-stieltjes-doc to f1d9bfa8a16e4dfb73b054da0a29bddc253d084a
  • Resolution set to fixed
  • Status changed from positive_review to closed
Note: See TracTickets for help on using tickets.