An even root of a quotient with an odd power below the bar keeps its sign below zero - #1738
Merged
Rafael-SOWNet merged 2 commits intoOct 4, 2026
Conversation
…sign below zero sqrt((1 + x)/x^3) is real for x < -1 as well as for x > 0, and was integrated as sqrt(1 + x) x^(-3/2), which it is for x > 0 only: the check whether an even root of a quotient comes apart counted a factor below the bar as though it were above it. It counts against those above it now, and where the root does not come apart, a linear's odd power below it comes out with its sign in front of the answer. 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
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.
sqrt((1 + x)/x^3)is real forx < -1as well as forx > 0, and master integrates it assqrt(1 + x) x^(-3/2), which it is forx > 0only: below-1the two differ by a sign, and the answer is wrong at every point there. 2.5.0 declined these:9588be9esqrt((1 + x)/x^3)x < -1sgn(x)times the answer forx > 0, right on both sidessqrt(x/(1 + x)^3)x < -1sgn(1 + x)((1 + x)/x^3)^(3/2)x < -1sqrt((2 + x)/(1 + x)^3)x < -2sgn(1 + x)What changes. The check that decides whether an even root of a quotient may be written apart summed the multiplicities of the factors that can be negative on both sides of the bar alike, so
1 + 3 = 4passed for(1 + x)/x^3, where the phase of the split is above minus below,1 - 3 = -2. A split now needs both sums to be multiples of twice the root's index, which refuses exactly the splits that were wrong and keeps every other. Where the root does not come apart, a linear's odd power below it comes out with its sign in front of the answer,|1 + x|beingsgn(1 + x) (1 + x).Tests:
RootOfAQuotientOnBothSidesIntegralTest, five rows differentiated back at points on both sides, at least two of them below zero and three above; all five are wrong on master.Measured first on the 254 roots of quotients in the corpus, 191 run, at the corpus's 5-second budget, against master
8f3757cd, the branch's base, and again with the harness checking every answer at the negatives of its points as well:The corpus writes these roots with symbols in them, which go through a rule that already takes the sign out, so it holds none of the shapes that were wrong; the tests and the first table do.
Measured then on the Rubi corpus against master
8f3757cd:No answer is wrong in the sample on either build. The six problems the two builds disagreed on have no root of a quotient in them, and run again one build at a time each took about twenty seconds on either, at the edge of the corpus's patience: three came out on master's side of it and none on this one's, which is the machine and not the change -- two of them, measured alone with a minute's budget, take 22 and 24 s on both builds.
The suite passes on the commit measured,
b833c76d, 14,596 tests with 13 skipped, and the allocation gate with it. On the merge with master9588be9e,03bb47e0, the 4,076 calculus and corpus tests pass, and every row of the first table is as it says.🤖 Generated with Claude Code
https://claude.ai/code/session_012sonx8iAspMiwRwokT1Ura