Skip to content

A product of sums in the symbols multiplied out as a polynomial in the partial fractions - #1833

Merged
Rafael-SOWNet merged 4 commits into
masterfrom
symbolic-coefficients-expand-as-polynomials
Oct 9, 2026
Merged

Rafael-SOWNet merged 4 commits into
masterfrom
symbolic-coefficients-expand-as-polynomials

Conversation

@Rafael-SOWNet

Copy link
Copy Markdown
Member

Part of #718.

1/((a + b x^2)^3 (c + d x^2)^3) ran past the corpus's budget, with twelve more of Rubi's: a symbolic quadratic to a power beside other factors. A sample of the stack put all the time in InLowestTermsOverTheSymbols called from Multiplied. The series at a repeated quadratic's roots multiplies coefficient arrays whose entries are products of powers of sums in the symbols, and Entity.Expand multiplies such a product out by enumerating the combinations of its terms as expressions. 1/((1 + x^2)^2 (c + d + 2d x^2)^3 (1 + 2x^2)) spent eighteen seconds there.

InLowestTermsOverTheSymbols now multiplies a product of sums out as a MultivariatePolynomial, which collects its terms as it multiplies, and leaves everything else to Expand. The first version did this for every coefficient. That changed how plain sums like a - b were spelled, and on 4.1.7's csc(x)^2/(a - b sin(x)^4)^2, which master declines in 20 seconds, the spellings no longer matched where the partial fractions read their own output. The search then went 47 levels deep and ran past ten minutes. Only a product of sums is multiplied out as a polynomial now, and that problem is declined in 25 seconds as before.

integrand 2.5.0 master 60b8111c this
1/((a + b x^2)^3 (c + d x^2)^3) declined past 60 seconds 15,289 characters, 1.5 s
1/((d + e x)^2 (a + b x + c x^2)^2) declined past 60 seconds 11,274 characters, 0.7 s
(A + B x)/((a + b x + c x^2)^2 (d + e x + f x^2)) declined past 60 seconds 97,173 characters, 1.8 s
1/((1 + x^2)^2 (c + d + 2d x^2)^3 (1 + 2x^2)) declined 18.7 s the same answer, 0.2 s
1/((a + a sec(x))^(5/2) (c + d sec(x))^3) declined past 60 seconds 9,155 characters, 3.8 s

x stands for e + f x in the last row, which is what was probed. The third answer is long: two general symbolic quadratics, with a case for each sign of each discriminant.

Tests: ARepeatedSymbolicQuadraticIntegralTest, the fourth row, differentiated back and compared at six points.

Measured on 14,109 corpus problems, every one whose integrand is a rational function and every one with a secant or a cosecant in it, at the corpus's 5-second budget, against master 60b8111c:

master this
solved 13898 13911
unevaluated 98 98
wrong 0 0
past the budget 100 87

Thirteen problems are answered here and not on master: twelve of 1.1.2.3, 1.2.1.2, 1.2.1.3, 1.2.1.6, 1.2.1.9 and 1.2.2.3, and one of 4.5.2.1. None go the other way, and no problem moves between declined and past the budget. On the 13,898 both answer the time is 2,405 seconds on master and 2,176 here, 9.5% less.

master this
family 0, independent suites (1814) 1782 1782
family 1, 40 a file (1381) 1341 1341
families 2 to 8, sampled (2410) 2331 2331

The harness counts no answer wrong in either. The thirteen problems the builds disagreed on, run again one build at a time: master answers none within the budget, this all thirteen.

The suite passes: 15,185 passed, 13 skipped, none failed. The allocation gate passes: every gated benchmark allocates what the baseline says. Merged with master 983a612b: the library builds for every target, and the partial-fraction tests pass, 144.

🤖 Generated with Claude Code

https://claude.ai/code/session_012sonx8iAspMiwRwokT1Ura

Rafael-SOWNet and others added 3 commits October 9, 2026 12:06
…actions

Part of #718.

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 9, 2026
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 d9b9f2d into master Oct 9, 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