Skip to content

implement symbolic lower incomplete gamma function #16697

@rwst

Description

@rwst

This is actually a defect because we leave a result from Maxima undefined:

sage: hypergeometric([1],[b],x).simplify_hypergeometric()
(b - 1)*x^(-b + 1)*e^x*gamma_greek(b - 1, x)
sage: gamma_greek
---------------------------------------------------------------------------
NameError                                 Traceback (most recent call last)
<ipython-input-18-6e90901bc5cb> in <module>()
----> 1 gamma_greek

NameError: name 'gamma_greek' is not defined

https://en.wikipedia.org/wiki/Incomplete_gamma_function#Lower_incomplete_Gamma_function

Mathematica seems to have Gamma[a,z] for upper and Gamma[a,0,z] for lower; Maple seems to have upper Gamma. gamma_inc (the upper one in Sage) gets immediately converted to gamma(a,x). The symbolic functions gamma_inc==incomplete_gamma are converted and never returned to the user as expression:

sage: gamma_inc(x,x,hold=True)
gamma(x, x)
sage: incomplete_gamma(x,x,hold=True)
gamma(x, x)
sage: assume(x>0)
sage: integral(t^(s-1)*e^(-t),t,0,x)
-gamma(s, x) + gamma(s)

This ticket should deprecate "incomplete_gamma" and add the symbolic function gamma_inc_lower, leaving open the question of the global alias for and the displayed name of Function_gamma_inc.

Previous part of description:


  1. Provide all three "user input interfaces" gamma_inc, incomplete_gamma and lower_incomplete_gamma, and convert the Maxima gamma_greek to -gamma(a, x) + gamma(a)
  2. Provide all three "user input interfaces" gamma_inc, incomplete_gamma and lower_incomplete_gamma, and convert to gamma(a,x) and gamma(a,0,x)n on output
  3. Provide all three "user input interfaces" gamma_inc, incomplete_gamma and lower_incomplete_gamma, and have incomplete_gamma and lower_incomplete_gamma as result instead of `gamma(...)'
  4. Change the user interface completely to lower_incomplete_gamma and upper_incomplete_gamma
  5. Change the user interface completely to gamma_inc_lower and gamma_inc_upper
  6. Change the user interface completely to gamma(a,x) and gamma(a,0,x)

Depends on #20185

CC: @kcrisman @nbruin

Component: symbolics

Keywords: gamma, incomplete, special, functions

Author: Ralf Stephan

Branch/Commit: 157b268

Reviewer: Buck Evan, Paul Masson

Issue created by migration from https://trac.sagemath.org/ticket/16697

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions