Repository navigation
A quadratic is split over a root it shares with a linear beside it - #1693
Merged
Merged
Conversation
Writing each linear once read a quadratic's roots only where they were a monomial and its negative. Rubi's 1.2.1.2 and 1.2.1.4 have a d e + (c d^2 + a e^2) x + c d e x^2, which is (d + e x)(a e + c d x), beside a power of d + e x: under a power that is not whole, nothing splits it, and (d + e x)^(7/2)/(a d e + ...)^(3/2) was declined. A quadratic beside a linear under a root now takes the linear's root where it vanishes there, and its other root by the sum of the two. The two roots of the shared linear are then one whole power of it, and where that leaves two linears or fewer the rule answers: (d + e x)^(7/2)/(a d e + ...)^(3/2) is K (d + e x)^2/(a e + c d x)^(3/2). Beside a whole power of the linear, (d + e x)^3 sqrt(a d e + ...), the split would leave two roots where there was one, and the rules for a quadratic under a root answer it as written; beside a third linear, x sqrt(a d e + ...)/(d + e x), it would leave a product of three. In both the quadratic is read whole. 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
…ver-a-root-it-shares
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.
Writing each linear once (#1683) read a quadratic's roots only where they are a monomial and its negative. Rubi's 1.2.1.2 and 1.2.1.4 put
a d e + (c d^2 + a e^2) x + c d e x^2, which is(d + e x)(a e + c d x), beside a power ofd + e x. Under a power that is not whole, nothing split it, and the integral was declined or ran out of time.A quadratic now takes the root of a linear written elsewhere in the integrand where it vanishes there, and its other root by the sum of the two. Each linear is then written once, with
Kin front, as in #1683:sqrt(d + e x)/sqrt(a d e + (c d^2 + a e^2) x + c d e x^2)(d + e x)^(3/2)/sqrt(a d e + ...)(d + e x)^(7/2)/(a d e + ...)^(3/2)(f + g x)(a d e + ...)^(3/2)/(d + e x)^(3/2)(d + e x)^(5/2)/((f + g x)(a d e + ...)^(5/2))sqrt(a d e + ...)/((f + g x)^(7/2) sqrt(d + e x))The split is made only where the shared linear stands under a root too, so that its two roots come together as one whole power, and only where that leaves two linears or fewer. Beside a whole power of the linear, as in
(d + e x)^3 sqrt(a d e + ...), the split would leave two roots where there was one, and the rules for a quadratic under a root answer it as written. Beside a third linear, as inx sqrt(a d e + ...)/(d + e x), it would leave a product of three that the rules for two don't answer, and written so that one grows past what fits in memory. In both cases the quadratic is read whole, as on master.Tests:
EachLinearWrittenOnceIntegralTest.IsAnsweredWithEachLinearOncegains three rows with the shared root,(d + h x)^(7/2)/(a d h + ...)^(3/2)among them, each differentiated back with the symbols pinned. All three are declined on master.BesideAThirdLinearTheQuadraticIsReadWholehas two rows with a third linear, the first of which runs out of memory if the split is made there.Measured on the Rubi corpus against master
7edf3285, both builds side by side. Every problem of 1.2.1.2 and 1.2.1.4 witha d e + (c d^2 + a e^2) x + c d e x^2in it, 431 whose answers are in functions the library has, at the corpus's 5-second budget:145 more are answered, and none that master answers is lost. On the 204 that both answer, the total time is 401 s here against 390 s on master, under load. Twelve that neither answers now run to the budget, where master declines them in under half a second. After the split they are a power of the linear below the bar beside one root,
K/((d + e x)^5 (a e + c d x)^(3/2)), or two linear radicals,K (f + g x)^(5/2)/sqrt(a e + c d x), which the rules for those don't finish in five seconds.The corpus chain ran on an earlier commit of this branch, which also split a square and split beside a whole power of the linear. Against the same master it measured family 0 at 1758 on both, family 1 at 40 a file at 1126 against 1119, and the samples of families 2 to 8 at 2141 against 2140, with no wrong answers on either build. This commit splits in a subset of those cases.
The suite passes on this commit, 14,374 tests, and so does the allocation gate. Master
61de03deis merged in since, without conflicts, and the calculus tests pass on the merge, 3,698 of them.🤖 Generated with Claude Code
https://claude.ai/code/session_012sonx8iAspMiwRwokT1Ura