Skip to content

Read the gamma rule's integrand when it is written otherwise - #2096

Merged
Rafael-SOWNet merged 1 commit into
masterfrom
the-gamma-rule-reads-an-exponent-written-otherwise
Oct 23, 2026
Merged

Rafael-SOWNet merged 1 commit into
masterfrom
the-gamma-rule-reads-an-exponent-written-otherwise

Conversation

@Rafael-SOWNet

Copy link
Copy Markdown
Member

Lets the gamma rule (#2083) read its integrand when it is written otherwise, and asks it last at a whole order. Part of #2075.

What it reads now. The rule for x^m F^(a + b x^n) and (c + d x)^m F^(a + b x) read one exponential, one term in x in its exponent, and nothing else in x beside the power.

  • e^(a + c + b x^n + d x^n) has two terms of one degree, now read as (b + d) x^n.
  • f^(a + b x^n) g^(c + d x^n) has two exponentials, now read as one: e^(u ln f + v ln g), or F^(u + v) for one base.
  • (c + d x)^m (k + f x) F^(a + b x) has a polynomial beside the power of the linear. That polynomial is now written in powers of the linear, and each term is the power alone. By parts leaves this shape of (c + d x)^m gamma(2, a + b x).
  • Where gathered terms cancel, it declines. e^x e^(-x)/x is 1/x, and read as a gamma function of order 0 at 0 it was NaN. By parts leaves exactly this beside Shi(a + b x)^2, and the first run of this branch answered Shi(a + b x)^2 and Chi(a + b x)^2 wrongly. Both are tests now.

A whole order, last. At a whole or half-whole order the rule declines, for the elementary, exponential-integral and error-function routes to answer. Where none of them does, it is now asked again at the end of the dispatcher, at any order. (c + d x)^(-1 - 4 n) F^(a + b (c + d x)^n) is a gamma function of order -4, and by parts reaches only -3.

Measured on Rubi's suite, with the harness that reads GAMMA, against 68211405, the whole corpus each side. This branch was measured on 2be40bad, which adds #2088 to that base, after the fix above. It is rebased onto master now.

68211405 this
solved 48,907 of 49,052 48,919
wrong 0 0
rows lost 0

The gains are 2.3:423, 424, 890 and 891, 4.7.6:50, and 8.6:222 and 223; #2091 has since solved the last two on master by another route. The other 5 are #2088's. Time per stream is 1.027, 1.011 and 0.906 of the base's, and allocation 1.0000, 1.0008 and 0.9939. One row's allocation grew in the run, 6.1.7:196, which is the same alone on both builds, as before.

Nine integrals differentiate back in the tests. The suite passes (16,961), and so do the MCP tests (329).

🤖 Generated with Claude Code

https://claude.ai/code/session_012sonx8iAspMiwRwokT1Ura

The rule for x^m F^(a + b x^n) and (c + d x)^m F^(a + b x) read one exponential, one term in x
in its exponent, and nothing else in x beside the power:
- e^(a + c + b x^n + d x^n) had two terms of one degree, now read as (b + d) x^n;
- f^(a + b x^n) g^(c + d x^n) had two exponentials, now read as one, e^(u ln f + v ln g), or F^(u + v)
  for one base;
- (c + d x)^m (k + f x) F^(a + b x) has a polynomial beside the power of the linear, now written in
  powers of the linear, each term then the power alone. By parts leaves this of
  (c + d x)^m gamma(2, a + b x).
Terms gathered so can cancel, and then it declines: e^x e^(-x)/x is 1/x, and read as a gamma
function of order 0 at 0 it was NaN, where by parts leaves it beside Shi(a + b x)^2.
And at a whole or half-whole order it declines, for the elementary, exponential-integral and
error-function routes to answer. Where none of them does, it is now asked last at any order:
(c + d x)^(-1 - 4 n) F^(a + b (c + d x)^n) is a gamma function of order -4, and by parts reaches -3.

Part of #2075.

Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_012sonx8iAspMiwRwokT1Ura
@Rafael-SOWNet Rafael-SOWNet added this to the 2.7.0 milestone Oct 23, 2026
@Rafael-SOWNet
Rafael-SOWNet merged commit ecefbcb into master Oct 23, 2026
34 checks passed
@github-project-automation github-project-automation Bot moved this from Todo to Done in AngouriMath Oct 23, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

Status: Done

Development

Successfully merging this pull request may close these issues.

1 participant