The third case of a binomial differential is written back for a negative x too - #1720
Merged
Rafael-SOWNet merged 2 commits intoOct 3, 2026
Merged
Conversation
…ive x too Chebyshev's third case is integrated under x = 1/y, and its root, whose q-th power is b + a/x^n, was written back as (b + a/x^n)^(1/q): that root for a positive x, and for a negative one only under an odd root. 1/(1 + x^4)^(5/4) came out as 1/(1 + 1/x^4)^(1/4), an even function whose derivative is the integrand's negative for every negative x. It is written back as (a + b x^n)^(1/q)/x^(n/q) now, which has the same q-th power everywhere. Part of #718. Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_012sonx8iAspMiwRwokT1Ura
…case-written-back-for-every-x
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.
Chebyshev's third case of a binomial differential,
x^m (a + b x^n)^(p/q)with(m + 1)/n + p/qwhole, is integrated underx = 1/y, and wrote its root back as(b + a/x^n)^(1/q). That is the root for a positivex, and for a negative one only under an odd root, which is real here. Under an even root the answer was wrong for every negativex:dbe5b3821/(1 + x^4)^(5/4)1/(1 + 1/x^4)^(1/4), an even function1/((1 + x^4)^(1/4)/x)x^2/(1 + x^4)^(3/4)(1 + 1/x^4)^(1/4)(1 + x^4)^(1/4)/xx^6 (3 + 4 x^4)^(1/4)(4 + 3/x^4)^(1/4)(3 + 4 x^4)^(1/4)/xEach integrand is real on the whole line. Checked exactly in sympy at
x = -0.71, -0.43, 0.37, 1.31: on master the derivative of the answer minus the integrand is-2fat the two negative points and 0 at the positive ones; here it is 0 at all four.What changes. The root is written back as
(a + b x^n)^(1/q)/x^(n/q), whoseq-th power isb + a/x^nat everyx, so the answer is right on both sides of zero under either root. The case came in with #1288, after 2.5.0, which declined these three.Tests:
BinomialDifferentialTest.TheThirdCaseOnBothSidesOfZero, six rows real on both sides of zero, each differentiated back at three negative and three positive points. On master the three under a fourth root fail.The corpus does not see this. It compares at positive points, and at negative ones only where it cannot compare at positive ones.
work/intbenchhas a switch for it now,IB_BOTHSIDES=1, which also compares at the negatives of the positive points. On master it counts three of Timofeev's problems wrong this way,(3 + 4x^4)^(1/4)/x^2,x^2 (3 + 4x^4)^(5/4)andx^6 (3 + 4x^4)^(1/4), each answered with the integrand's negative for a derivative at every negativex; here all three are right on both sides, checked with the library's own settings at five negative and three positive points.Measured first on every fourth problem of Rubi's 1.1.2.2 and 1.1.3.2, 794 run, at the corpus's 5-second budget, against master
dbe5b382, the branch's base:The five wrong on both are powers of
xwhose exponent is-1as a value and not as written, such asx^(-1 - 3n) (a + b x^n)^3, which this does not touch.Measured then on the Rubi corpus against master
dbe5b382:No answer is wrong on either build. The one problem the two builds disagree on, run again one build at a time, is Timofeev's
cos(x) (-cos(x)^2 - 5 sin(x)^2)^(3/2), complex-valued on the whole line: on master its answer differs from the integrand at a sample point and is left unverifiable, and here it checks out.The suite passes on the commit measured,
764400de, 14,594 tests, and so does the allocation gate. Master3a3d0163is merged in since, without conflicts, and the calculus tests pass on the merge, 3,965 of them.🤖 Generated with Claude Code
https://claude.ai/code/session_012sonx8iAspMiwRwokT1Ura