Opened 6 years ago
Last modified 13 days ago
#17737 new defect
wrap Maxima's factorial/gamma conversions/expansions
Reported by: | rws | Owned by: | |
---|---|---|---|
Priority: | major | Milestone: | sage-9.4 |
Component: | symbolics | Keywords: | |
Cc: | kcrisman, ktkohl, tmonteil, charpent | Merged in: | |
Authors: | Reviewers: | ||
Report Upstream: | N/A | Work issues: | |
Branch: | Commit: | ||
Dependencies: | Stopgaps: |
Description (last modified by )
To be most clear to the user (and staying in sync with current ticket discussions) I rather propose four functions:
gamma_to_factorial
- usesimplify_full
(?)factorial_to_gamma
- usemakegamma
withmaxima.eval("gamma_expand:true")
expand_gamma
- e.g.,gamma(n+1) --> n*gamma(n)
, usemakegamma
withmaxima.eval("gamma_expand:false")
, alsogamma_expand
simplify_gamma
- e.g.,n*gamma(n) --> gamma(n+1)
, usemakegamma
withmaxima.eval("gamma_expand:true")
. Could be an alias to 2) or left out.
This ticket will *not include one of these in another simplify*
function.
Change History (8)
comment:1 Changed 6 years ago by
- Description modified (diff)
comment:2 Changed 6 years ago by
- Description modified (diff)
comment:3 Changed 6 years ago by
- Milestone changed from sage-6.5 to sage-wishlist
comment:4 Changed 6 years ago by
- Cc kcrisman added
comment:5 Changed 6 years ago by
- Cc ktkohl added
comment:6 Changed 3 years ago by
- Cc tmonteil added
comment:7 Changed 3 months ago by
- Cc charpent added
- Milestone changed from sage-wishlist to sage-9.3
- Type changed from enhancement to defect
As of 5.44.0, Maxima
uses a genfact
function that Sage
may translate, but does not know how to use/evaluate explicitly :
sage: arccos(x).maxima_methods().powerseries(x,0).subs(x==0) 1/2*pi + sum(0^(2*i7 + 1)*genfact(2*i7 - 1, i7, 2)/((2*i7 + 1)*genfact(2*i7, i7, 2)), i7, 0, +Infinity) sage: arccos(x).maxima_methods().powerseries(x,0).subs(x==0).simplify() 1/2*pi sage: arcsin(x).maxima_methods().powerseries(x,0) sum(x^(2*i2 + 1)*genfact(2*i2 - 1, i2, 2)/((2*i2 + 1)*genfact(2*i2, i2, 2)), i2, 0, +Infinity) sage: genfact(3,2,2) --------------------------------------------------------------------------- NameError Traceback (most recent call last) <ipython-input-19-b78e3f7f3947> in <module> ----> 1 genfact(Integer(3),Integer(2),Integer(2)) NameError: name 'genfact' is not defined
However, something in Sage
seem to have some access to some definition of genfact
:
sage: arccos(x).maxima_methods().powerseries(x,0).subs(x==0) 1/2*pi + sum(0^(2*i7 + 1)*genfact(2*i7 - 1, i7, 2)/((2*i7 + 1)*genfact(2*i7, i7, 2)), i7, 0, +Infinity) sage: arccos(x).maxima_methods().powerseries(x,0).subs(x==0).simplify() 1/2*pi
But I'm unable to find where:
charpent@zen-book-flip:/usr/local/sage-9$ grep -lr genfact * local/lib/ecl-20.4.24/maxima.fas local/lib/fricas/target/x86_64-pc-linux-gnu/algebra/GHENSEL.fas local/lib/maxima/5.44.0/binary-ecl/maxima local/share/maxima/5.44.0/share/builtins-list.txt local/share/maxima/5.44.0/share/orthopoly/orthopoly.lisp local/share/maxima/5.44.0/tests/rtest15.mac local/share/maxima/5.44.0/tests/rtest_gamma.mac local/share/maxima/5.44.0/doc/html/index.hhk local/share/maxima/5.44.0/doc/html/maxima_363.html local/share/maxima/5.44.0/doc/html/maxima_364.html local/share/maxima/5.44.0/doc/html/maxima_singlepage.html local/share/maxima/5.44.0/doc/html/maxima_50.html local/share/maxima/5.44.0/src/nparse.lisp local/share/maxima/5.44.0/src/simp.lisp local/share/maxima/5.44.0/src/series.lisp local/share/maxima/5.44.0/src/asum.lisp local/share/maxima/5.44.0/src/suprv1.lisp local/share/maxima/5.44.0/src/option.lisp local/share/info/maxima.info-1 local/share/info/maxima-index.lisp local/share/info/maxima.info local/share/info/maxima.info-3 local/share/emacs/site-lisp/maxima-font-lock.el
This is a defect, but quite consonant to the current "wishlist". Modifying the ticket as needed.
comment:8 Changed 13 days ago by
- Milestone changed from sage-9.3 to sage-9.4
Setting new milestone based on a cursory review of ticket status, priority, and last modification date.
Such a feature would be awesome, in particular in a combinatorial context, it could be nice if Sage were able to transform
gamma(n+1/2)
intofactorial(2n)/(4^n*factorial(n))*sqrt(pi)
, see e.g.