Repository navigation
Integrate a power beside an exponential of a power as an incomplete gamma function - #2083
Merged
Rafael-SOWNet merged 1 commit intoOct 23, 2026
Conversation
…amma function int x^m F^(a + b x^n) dx is -F^a x^(m + 1) z^(-s) gamma(s, z)/n with z = -b ln(F) x^n and s = (m + 1)/n, and int (c + d x)^m F^(a + b x) dx the same with n = 1 under t = c + d x: x^(m + 1) z^(-s) is constant between the cuts, and gamma(s, z) differentiates to -z^(s - 1) e^(-z) z'. Only where s is neither whole nor half a whole number, whose integrals are elementary, exponential integrals or error functions and keep those answers, or where it is past 30, where parts would take s steps: x^100 e^(-a x) is -a^(-101) gamma(101, a x). Where the constant factor is one number on both half-lines it is written so, and the answer has a value at 0: e^(x^3) is gamma(1/3, -x^3)/3. Two costs this exposed, each fixed here. By parts integrated (a + b ln(c x^n))^p into a gamma function of a logarithm and handed its remainder on, which nothing integrates and the searches sampled thousands of times: three by-parts paths now decline a gamma function of an argument that is not linear. And a definite integral of an answer undefined at a bound, x^2 e^(x^4) from 0, took a limit through l'Hopital's rule for over a minute; it is left as written there. gamma's own limit is taken by continuity where its value is finite. The order is read through Simplify where its symbols cancel: (-1 + n + 1)/n is 1, and (p x)^(n - 1) e^(x^n) keeps its elementary answer. Rubi's suite on the harness that reads GAMMA, against master e62a56d: 48,502 -> 48,634 of 49,052, 0 wrong, 0 rows lost, timeouts 5 -> 2; the gains are 68 in 2.3, 24 in 3.1.2, 12 in 8.6 and the logarithm files. Two rows' allocation grew in the run and is identical alone on both builds. Four tests that pinned a decline answer now, each checked by value. Part of #2075; answers #180's item 22. Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_012sonx8iAspMiwRwokT1Ura
Rafael-SOWNet
force-pushed
the
a-power-beside-an-exponential-as-a-gamma-function
branch
from
October 23, 2026 02:05
d752c58 to
80aad7f
Compare
This was referenced Oct 23, 2026
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.
Answers
∫ x^m F^(a + b x^n) dxand∫ (c + d x)^m F^(a + b x) dxwith the upper incomplete gamma function, where that is what the integral is. Part of #2075; answers #180's item 22,t^(-1/2) e^(-t^(-2)).The rule. With
z = -b ln(F) x^nands = (m + 1)/n,x^(m + 1) z^(-s)is constant between the cuts andgamma(s, z)differentiates to-z^(s - 1) e^(-z) z', so the integral is-F^a x^(m + 1) z^(-s) gamma(s, z)/n. The second shape is the first withn = 1undert = c + d x.sis neither whole nor half a whole number. Those integrals are elementary, exponential integrals or error functions, and keep the answers they had.sis the gamma function, where parts would takessteps.x^100 e^(-a x)is-a^(-101) gamma(101, a x).e^(x^3)isgamma(1/3, -x^3)/3.Two costs it exposed, each fixed here.
(a + b ln(c x^n))^pinto a gamma function of a logarithm and handed on a remainder that nothing integrates. The searches then sampled it three thousand times before declining, and 29 declines in the 3.x files became timeouts (one went from 2.7 s to 116 s). Three by-parts paths now decline a gamma function of an argument that is not linear. Evaluate the incomplete gamma function's series faster #2079 made each evaluation ten times cheaper too.x^2 e^(x^4)from 0, the answer is 0 times an infinity at the bound. Its limit went through l'Hôpital's rule on the whole product for over a minute, and it is left as written there, as master leaves it. Γ's own limit is taken by continuity where its value is finite.limit(gamma(-1, x), x, 0)stays undecided, since the function is about1/xthere.Measured on Rubi's suite, read with the harness that maps
GAMMAandPsi, against mastere62a56d6, the whole corpus each side:The gains are 68 in 2.3, 24 in 3.1.2, 12 in 8.6, 7 each in 3.3 and 3.5, 6 in 3.1.5, and 8 elsewhere. Time and allocation per stream are within 3%. Two rows' allocation grew in the run,
3.3:246and7.3.6:563, and alone they are identical on both builds: 2.46 GB and 1.43 GB.Checked by value, not only by differentiating back, since a derivative that matches is what hid #2080's wrong values:
integral(e^(x^3), x, 0, 1)1.3419044179774…integral(e^(x^2)*x^(1/3), x, 0, 1)1.1717955466629…integral(x^2*e^(x^4), x, 1, 2)1129720.502623949…integral(floor(x)*e^(x^3), x, 0, 2)275.5109837633…Four tests changed, each because an integral they pinned as declined is answered now. Each new answer is checked by its value. A fifth,
(pe x)^(n - 1) e^(x^n)with itspe > 0, failed on the first version and passes unchanged since the order is read throughSimplify:e^(x^3)in the ansatz's decline list is replaced bye^(x^3 + x), which is neither elementary nor a gamma function.floor(x) e^(x^3)over[0, 2]moves to a test of its value.e^(x^3 + x)takes its place among the integrals left as written.x^m ln(x)^n (1 + ln x)is differentiated back.x^n e^(x^n)is differentiated back.The suite passes (16,923) and so do the MCP tests (329).
🤖 Generated with Claude Code
https://claude.ai/code/session_012sonx8iAspMiwRwokT1Ura