Skip to content

The third case of a binomial differential is written back for a negative x too - #1720

Merged
Rafael-SOWNet merged 2 commits into
masterfrom
the-third-binomial-case-written-back-for-every-x
Oct 3, 2026
Merged

Rafael-SOWNet merged 2 commits into
masterfrom
the-third-binomial-case-written-back-for-every-x

Conversation

@Rafael-SOWNet

Copy link
Copy Markdown
Member

Part of #718.

Chebyshev's third case of a binomial differential, x^m (a + b x^n)^(p/q) with (m + 1)/n + p/q whole, is integrated under x = 1/y, and wrote its root back as (b + a/x^n)^(1/q). That is the root for a positive x, and for a negative one only under an odd root, which is real here. Under an even root the answer was wrong for every negative x:

integrand master dbe5b382 this
1/(1 + x^4)^(5/4) 1/(1 + 1/x^4)^(1/4), an even function 1/((1 + x^4)^(1/4)/x)
x^2/(1 + x^4)^(3/4) logarithms and an arctangent of (1 + 1/x^4)^(1/4) the same of (1 + x^4)^(1/4)/x
x^6 (3 + 4 x^4)^(1/4) the same in (4 + 3/x^4)^(1/4) the same in (3 + 4 x^4)^(1/4)/x

Each 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 -2f at 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), whose q-th power is b + a/x^n at every x, 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/intbench has 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) and x^6 (3 + 4x^4)^(1/4), each answered with the integrand's negative for a derivative at every negative x; 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:

master this
solved 745 745
wrong 5 5

The five wrong on both are powers of x whose exponent is -1 as a value and not as written, such as x^(-1 - 3n) (a + b x^n)^3, which this does not touch.

Measured then on the Rubi corpus against master dbe5b382:

master this
family 0, independent suites (1814) 1766 1767
family 1, 40 a file (1381) 1292 1292
families 2 to 8, sampled (2410) 2209 2209

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. Master 3a3d0163 is 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

Rafael-SOWNet and others added 2 commits October 3, 2026 17:10
…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
@Rafael-SOWNet Rafael-SOWNet added this to the 2.6.0 milestone Oct 3, 2026
@Rafael-SOWNet
Rafael-SOWNet merged commit a7088ba into master Oct 3, 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