Skip to content

A polynomial over a power of a quadratic with a sum of symbols in it is reduced - #1712

Merged
Rafael-SOWNet merged 1 commit into
masterfrom
the-remainder-by-a-quadratic-read-by-value
Oct 3, 2026
Merged

Rafael-SOWNet merged 1 commit into
masterfrom
the-remainder-by-a-quadratic-read-by-value

Conversation

@Rafael-SOWNet

Copy link
Copy Markdown
Member

Part of #718.

The table's reduction for N(x)/(a x^2 + b x + c)^n declined whenever a sum of symbols stood among the quadratic's coefficients, so that how a coefficient was written decided whether an integral was answered: x^4/(1/(-b + a) + x^2)^3 was declined where x^4/(1/(a - b) + x^2)^3 is answered, and (1 - b x^2)^3/(c (1 - b x^2) + a d x^2)^3 was declined after 42 s where the same integrand with the two terms of its denominator the other way round is answered in 4.

integrand master 9c2509d8 this
x^4/(1/(-b + a) + x^2)^3 declined after 1.2 s 0.3 s
(1 - b x^2)^3/(c (1 - b x^2) + a d x^2)^3 declined after 42 s 2.2 s
x^4/(d x^2 + b c - a d)^5 declined after 11 s 0.5 s
x^6/(d x^2 + b c - a d)^4 declined after 10 s 0.7 s
(a + b x)^(5/2)/(c + d x)^4 past 60 s 2.8 s
(a + b x)^(3/2)/(c + d x)^5 17.6 s 3.4 s

The last two are what t = sqrt(a + b x) makes of Rubi's 1.1.1.2 (a + b x)^(m/2)/(c + d x)^n.

What changes. The reduction divides the numerator by the quadratic a power at a time and computed the remainder as N - q Q. The division writes the quotient's coefficients simplified and Q was subtracted as it is written, so the terms the division had taken away came back as the difference of two spellings of one value, (1/(a - b) - 1/(-b + a)) x^2, the remainder read as of the second degree, and the reduction stopped. Where the computed remainder is not linear, the remainder the division reports is taken; it has no such term. And an improper fraction, which the recursion declines once it comes down to the first power, is declined before the first division rather than after the last: with symbols in the quadratic each division simplifies every coefficient.

Tests: SymbolicCoefficientIntegralsTest.APolynomialOverAPowerOfAQuadraticWithASumOfSymbolsInIt, six rows, each differentiated back with the symbols pinned.

Measured first on the 356 corpus problems of 1.1.2.3 (a + b x^2)^p (c + d x^2)^q and every eighth of 1.1.1.2 (a + b x)^m (c + d x)^n, at the corpus's 5-second budget, against master 9c2509d8, the branch's base:

master this
solved 344 345
wrong 0 0

Measured then on the Rubi corpus against master 9c2509d8:

master this
family 0, independent suites (1814) 1766 1766
family 1, 40 a file (1381) 1288 1291
families 2 to 8, sampled (2410) 2194 2196

No answer is wrong on either build. The 11 problems the two builds disagreed on, run again one build at a time, are 6 answered here and 3 on master. Two of master's three are answered here too; the third, 1/((a + b x^2)^2 (c + d x^2)^3), took 22 s on master and timed out here, and unbudgeted both builds answer it, in 20 s on master and 21 s here.

The suite passes on the commit measured, 51cc0191, 14,565 tests, and so does the allocation gate.

🤖 Generated with Claude Code

https://claude.ai/code/session_012sonx8iAspMiwRwokT1Ura

…is reduced

The table's reduction for N(x)/(a x^2 + b x + c)^n divides the numerator
by the quadratic a power at a time and computes the remainder as
N - quotient * Q. The division writes the quotient's coefficients
simplified and Q is subtracted as it is written, so with a sum of
symbols among Q's coefficients the terms the division took away came
back as two spellings of one value, the remainder read as of the second
degree, and the reduction declined: x^4/(1/(-b + a) + x^2)^3 where
x^4/(1/(a - b) + x^2)^3 is answered, and x^4/(d x^2 + b c - a d)^5.

Where the computed remainder is not linear, the remainder the division
reports over the divisor is taken. And an improper fraction, which the
recursion declines once it reaches the first power, is declined before
the first division rather than after the last: with symbols in the
quadratic each division simplifies every coefficient.

Part of #718.

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 3, 2026
@Rafael-SOWNet
Rafael-SOWNet merged commit 599dcb7 into master Oct 3, 2026
34 checks passed
@Rafael-SOWNet
Rafael-SOWNet deleted the the-remainder-by-a-quadratic-read-by-value branch October 29, 2026 00:44
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