sagemath / sage

Main repository of SageMath. Now open for Issues and Pull Requests.
https://www.sagemath.org
Other
1.18k stars 409 forks source link

incomplete gamma identities #18956

Open 288355e8-9d09-499d-848c-6ddf957e701a opened 8 years ago

288355e8-9d09-499d-848c-6ddf957e701a commented 8 years ago

This work depends on #16697, but I'd like to start it now.

There is a quite simple identity for the incomplete gamma functions:

gamma(x) == gamma_inc_lower(x, y) + gamma_inc(x, y)

In the mathematica three-argument-gamma notation, this is a bit more clearly true:

gamma(x, 0, oo) == gamma(x, 0, y) + gamma(x, y, oo)

What bits of sage do I need to patch to teach the simplifier about this identity? Is this something I can do as a plain-old user? Also, what bits of the documentation cover this aspect of symbolic symplification, from both user and contributor perspectives?

Depends on #16697

CC: @paulmasson

Component: symbolics

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

rwst commented 8 years ago
comment:1

The simplify*/expand* member functions are covered in http://doc.sagemath.org/html/en/reference/calculus/sage/symbolic/expression.html. Most of them use Maxima. If you have a function that does this rewrite it should be added in this module, and probably also to one of the simplify*/expand* functions. As to the details, best would be a function named expand_xyz because you expand gamma(x), or rewrite_xyz. The same documentation contains specifics on pattern matching and overall expression manipulation, which is needed here.

As to the second identity, we still haven't the gamma with three parameters.

288355e8-9d09-499d-848c-6ddf957e701a commented 8 years ago
comment:2

Thanks!

To be clear, there's just one identity here, with two notations. I expect if/when we gain a three-argument gamma, the simplification logic won't need to be modified in order to Just Work.