Skip to content

Powers of two linears whose exponents sum to a whole number below -2 are integrated - #1756

Merged
Rafael-SOWNet merged 5 commits into
masterfrom
two-linear-powers-whose-exponents-sum-to-a-whole-number
Oct 4, 2026
Merged

Rafael-SOWNet merged 5 commits into
masterfrom
two-linear-powers-whose-exponents-sum-to-a-whole-number

Conversation

@Rafael-SOWNet

@Rafael-SOWNet Rafael-SOWNet commented Oct 4, 2026 •

Copy link
Copy Markdown
Member

Part of #718.

(a + b x)^m (c + d x)^(-3 - m) was declined, while (a + b x)^m (c + d x)^(-2 - m) was answered: the sum -2 makes the product the derivative of the two powers raised by one, which a rule reads, and nothing read a lower sum. 2.5.0 declined them too:

integrand 2.5.0 master a27661f3 this
(a + b x)^m (c + d x)^(-3 - m) declined declined in 0.4 s
x^(n - 4)/(a + b x)^n declined declined in 0.03 s
(a + b x)^m (c + d x)^(-5 - m) (p + q x)^3 declined declined in 0.03 s
(a + b x) (c + d x)^(n - 4)/(p + q x)^n declined declined in 0.02 s
(a + b x)^m (c + d x)^(-4 - m) (p + q x) (g + h x) declined declined in 0.02 s
(a + b x)^(5/2)/(c + d x)^(11/2) declined in 0.3 s the two powers times a polynomial, in 0.04 s

Each answer is differentiated back with the symbols pinned and compared as a complex number at x = -2.3, -1.1, -0.4, 0.4, 1.1, 2.3; the times include that.

What changes. Powers of two linears L1 = a1 + b1 x and L2 = a2 + b2 x whose exponents A and B sum to a whole number -k, k >= 2, beside a polynomial P of degree at most k - 2, are integrated under t = L1/L2. There x = (a1 - a2 t)/(b2 t - b1), L2 = D/(b2 t - b1) and dx = -D dt/(b2 t - b1)^2 for D = a1 b2 - a2 b1, so the integrand is, up to a factor constant on each interval, -D^(1 - k) t^A S(t) with S a polynomial, and the antiderivative is sum_i s_i t^(A + i + 1)/(A + i + 1). Since t^(A + i + 1) is t^A t^(i + 1) for a whole i + 1, the constant factor and t^A come back as the two powers as written: the answer is L1^A L2^B times a polynomial in x, exact wherever the integrand is defined, and taking each A + i + 1 to be nonzero, as the integrator does everywhere. A closed rule, so it answers at any depth -- under u = sin(y), the powers of 1 ± sin(y) beside one another ask exactly this. #1754, merged, asks that question for symbolic powers of a ± a sin, and on the merge with it the thirteen of Rubi's family 4 it left, (a + a sin)^m (c - c sin)^(-3 - m) and its kin, are answered in 0.1 to 0.9 seconds, where either alone ran past eight.

Tests: TwoLinearPowersIntegralTest, six rows differentiated back with the symbols pinned, on both sides of zero; five are declined on master, and the sixth, (a + b x)^(5/2)/(c + d x)^(11/2), numeric, was answered and is answered here by this rule, the same function written as the two powers times a polynomial.

Measured first on the 358 problems of Rubi's 1.1.1.2 to 1.1.1.4 with two powers of linears that are not whole and sum to a whole number below -1, 339 run, at the corpus's 5-second budget, against master 8f3757cd, the branch's base:

master this
solved 310 330
wrong 0 0
past the budget 2 3

The one past the budget here and not on master, (2 + 3x)^5/((1 - 2x)^(5/2) (3 + 5x)^(3/2)), a polynomial of degree five beside a sum of -4 that the rule leaves alone, takes 24 to 25 seconds on both builds run alone, at the edge of the harness's patience.

Measured then on the Rubi corpus against master 8f3757cd:

master this
family 0, independent suites (1814) 1766 1766
family 1, 40 a file (1381) 1296 1299
families 2 to 8, sampled (2410) 2215 2215

The harness counts no answer wrong in the pocket or the sample on either build. Of the 34 problems the two builds disagreed on, pocket and sample together, run again one build at a time, master answers 2 and this 24. The 22 more are Rubi's two linear powers summing to a whole number below -2, alone or beside a polynomial, answered in a hundredth to four tenths of a second. The two both answer take twenty-one to twenty-three seconds, and the other ten run past the budget on both.

The suite passes on the commit measured, ce598c76, 14,597 tests with 13 skipped, and the allocation gate with it. On the merge with master a27661f3, 6f416e97, the 4,159 calculus and corpus tests that run pass, with 2 skipped. Every row of the first table is as it says on the merge. The head, 9e002f3d, reads the polynomials' terms by key and value, which netstandard2.0 has, and carries master 9848e467; CI is green on it.

🤖 Generated with Claude Code

https://claude.ai/code/session_012sonx8iAspMiwRwokT1Ura

Rafael-SOWNet and others added 3 commits October 4, 2026 10:03
…are integrated

Under t = L1/L2 the product L1^A L2^B, with A + B = -k and k >= 2 whole,
beside a polynomial of degree at most k - 2, is a power of t beside a
polynomial in t. Since t^(A + i + 1) is t^A t^(i + 1) for a whole i + 1,
the antiderivative is the two powers as written times a polynomial in x,
exact wherever the integrand is defined. Only the sum -2 was answered.

Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_012sonx8iAspMiwRwokT1Ura
Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_012sonx8iAspMiwRwokT1Ura
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.6.0 milestone Oct 4, 2026
Rafael-SOWNet and others added 2 commits October 4, 2026 18:07
…0 has

Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_012sonx8iAspMiwRwokT1Ura
Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_012sonx8iAspMiwRwokT1Ura
@Rafael-SOWNet
Rafael-SOWNet merged commit ce4d1a1 into master Oct 4, 2026
34 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant