Repository navigation
A symbolic quadratic with a square discriminant, split into its linears where the numerator shares one - #1835
Merged
Rafael-SOWNet merged 3 commits intoOct 10, 2026
Conversation
…rs before the division 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
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.
Part of #718.
(d + e x)^8/(a d e + (c d^2 + a e^2) x + c d e x^2)^2ran past a minute, with eleven more of Rubi's 1.2.1.2: a power of a linear over a power of a quadratic that is that linear times another. The quadratic's discriminant is the square of a polynomial in the symbols,(c d^2 - a e^2)^2, so it is(d + e x)(a e + c d x). Over the quadratic as written, the division of the improper fraction and a substitution search ran out the time. Over its linears the shared power cancels and the rest is answered in a second.SolveByPartialFractionsnow writes such a quadratic as(2A x + B - S)(2A x + B + S)/(4A)before the division, withSfromMultivariatePolynomial.TrySquareRoot(#1831). It does this only where a polynomial numerator vanishes at the root of one of the two linears, which is what the split is for. A quadratic made monic first, with its coefficients over the leading one's symbols, is written over one bar and its numerator split. The numerator's sums are spelled as the split spells its linears, so the shared power is gathered and cancelled before anything else reads the quotient. #1831's helper for a quartic inx^2now takes either step, and its call moves above a comment it had been put in the middle of.24351278(d + e x)^8/(a d e + (c d^2 + a e^2) x + c d e x^2)^2(a + b x)^6/(a c + (b c + a d) x + b d x^2)^2(d + e x)^10/(a d e + (c d^2 + a e^2) x + c d e x^2)^4csc(x)^3/(a + b tan(x)^2)^2xstands fore + f xin the last row, which is what was probed.The first version split every such quadratic. On 7.4.1's
(a + b arccoth(c x)) (d + e ln(1 - c^2 x^2)), which master answers in 13 seconds, parts left1 - c^2 x^2with nothing to cancel against. Split, it ran past two minutes. Now the split happens only where the numerator is a polynomial sharing a linear, and that problem is answered in 12.8 seconds as before.Tests:
ASymbolicQuadraticSplitIntegralTest, the first row and(a + b x)^6/(a c + (b c + a d) x + b d x^2)^3, each differentiated back and compared at six points. The pins putc dabove one. Below about0.6, the conditions these answers carry,not (c d)^68 = 0and the like, evaluate false:(0.54)^60 = 0isTrue. Master's answers have the same conditions. That is #1376's defect, and the case is recorded there.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
24351278:Fourteen problems are answered here and not on master, twelve of 1.2.1.2 and two of 4.3.7, and none the other way. On the 13,912 both answer the time is 2,126 seconds on master and 2,102 here.
The harness counts no answer wrong in either. The fourteen problems the builds disagreed on, run again one build at a time: master answers none within the budget, this all fourteen.
The suite passes: 15,190 passed, 13 skipped, none failed. The allocation gate passes: every gated benchmark allocates what the baseline says. The library builds for every target. The entry in
BREAKING-CHANGES.mdis measured on a build of 2.5.0.🤖 Generated with Claude Code
https://claude.ai/code/session_012sonx8iAspMiwRwokT1Ura