Repository navigation
Integrate the upper incomplete gamma function beside a power or a polynomial - #2078
Merged
Merged
Conversation
…ynomial By parts against the antiderivative Q of what is beside it. The derivative of Gamma(n, u) is -b u^(n - 1) e^(-u) for u = a + b x, so with Q written in powers of u each u^k lands on u^(n + k - 1) e^(-u), the derivative of -Gamma(n + k, u). Beside a polynomial with an offset that is Q Gamma(n, u) - sum_k q_k Gamma(n + k, u), in Rubi's b c - a d for a power of a linear. Beside (d x)^m without one, for any m but -1, it is x^(m + 1) Gamma(n, b x)/(m + 1) - x^m (b x)^(-m) Gamma(m + n + 1, b x)/ (b (m + 1)), where x^m (b x)^(-m) is b^(-m) for a whole m only. Rubi's 8.6, read with a harness copy that maps Maxima's GAMMA(a, x): 63 of 177 solved with the node alone, 144 with this, 0 wrong. The shared harness does not read GAMMA and its corpus stays at 48,305/48,305 with no row moved. MathS.IncompleteGamma now says that its derivative, read through the power, takes the real root at a negative z for an exact order of small odd denominator, where the value takes the principal branch (#204). Part of #2075. Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_012sonx8iAspMiwRwokT1Ura
This was referenced Oct 22, 2026
Merged
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Integrates the upper incomplete gamma function of a linear beside a polynomial or a power of
x, by parts. Part of #2075, on top of #2077's node.The derivative of
Gamma(n, u)is-b u^(n - 1) e^(-u)foru = a + b x, and with the antiderivativeQof what is beside it written in powers ofu, eachu^klands onu^(n + k - 1) e^(-u), which is the derivative of-Gamma(n + k, u):int P(x) Gamma(n, a + b x) dx = Q Gamma(n, u) - sum_k q_k Gamma(n + k, u). For a power(c + d x)^kit is Rubi's form, inb c - a d.x, any exponent but -1, without an offset:int x^m Gamma(n, b x) dx = x^(m + 1) Gamma(n, b x)/(m + 1) - x^m (b x)^(-m) Gamma(m + n + 1, b x)/(b (m + 1)).x^m (b x)^(-m)isb^(-m)only for a wholem. Elsewhere the two powers take their branches separately, and the product is constant only between the cuts.Not beside
1/x, whose integral is a hypergeometric function, nor beside a power of a different linear, which Rubi leaves unintegrated too.Measured with a copy of the corpus harness that reads Maxima's
GAMMA(a, x)asgamma(a, x). The shared harness does not read it yet, so its figures would not move. On the shared harness, the whole corpus is 48,305/48,305 atfde0ca12, with no row moved and no answer's allocation grown (0.985–0.999× of the baseline across the three streams).The 33 rows left:
1/2are elementary, so(d x)^m Gamma(3, b x)arrives as(d x)^m e^(-b x)times a quadratic, which needsx^m e^(-b x)as a gamma function. That is the next PR.Gamma(n <= 0, a + b x)/(c + d x)^k. These need by parts against something other than a polynomial.The function's derivative and the power's real root. The kernel takes the principal branch of
z^a. The derivative-z^(a - 1) e^(-z)goes through the power, and on a negative base the power takes the real root for an exact exponent of odd denominator below 10 (#204). So at a negativez, for such ana, the derivative evaluated is not the derivative of the value.MathS.IncompleteGamma's documentation says so. The tests here differentiate back where the integrands are real, and on the cut only for whole orders beside whole powers, where no such power appears.🤖 Generated with Claude Code
https://claude.ai/code/session_012sonx8iAspMiwRwokT1Ura