Skip to content

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 into
masterfrom
an-even-root-of-a-quotient-splits-by-the-difference-of-its-signs
Oct 4, 2026
Merged

Rafael-SOWNet merged 2 commits into
masterfrom
an-even-root-of-a-quotient-splits-by-the-difference-of-its-signs

Conversation

@Rafael-SOWNet

Copy link
Copy Markdown
Member

Part of #718.

sqrt((1 + x)/x^3) is real for x < -1 as well as for x > 0, and master integrates it as sqrt(1 + x) x^(-3/2), which it is for x > 0 only: below -1 the two differ by a sign, and the answer is wrong at every point there. 2.5.0 declined these:

integrand 2.5.0 master 9588be9e this
sqrt((1 + x)/x^3) declined wrong at every x < -1 sgn(x) times the answer for x > 0, right on both sides
sqrt(x/(1 + x)^3) declined wrong at every x < -1 the same with sgn(1 + x)
((1 + x)/x^3)^(3/2) declined wrong at every x < -1 the same as the first
sqrt((2 + x)/(1 + x)^3) declined wrong at every x < -2 the same with sgn(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 = 4 passed 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| being sgn(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:

master this
solved 170 170
wrong 0 0
solved, both sides checked 170 170
wrong, both sides checked 0 0

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:

master this
family 0, independent suites (1814) 1766 1766
family 1, 40 a file (1381) 1296 1296
families 2 to 8, sampled (2410) 2215 2218

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 master 9588be9e, 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

Rafael-SOWNet and others added 2 commits October 4, 2026 05:06
…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
@Rafael-SOWNet Rafael-SOWNet added this to the 2.6.0 milestone Oct 4, 2026
@Rafael-SOWNet
Rafael-SOWNet merged commit 9d40ce3 into master Oct 4, 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