Skip to content

Arms no real coefficients reach are left out of a symbolic quadratic's antiderivative - #1783

Merged
Rafael-SOWNet merged 2 commits into
masterfrom
unreachable-arms-are-left-out-of-a-quadratic-denominators-antiderivative
Oct 5, 2026
Merged

Rafael-SOWNet merged 2 commits into
masterfrom
unreachable-arms-are-left-out-of-a-quadratic-denominators-antiderivative

Conversation

@Rafael-SOWNet

Copy link
Copy Markdown
Member

Part of #718.

An integrand over a quadratic with symbols in it is answered by arms on the quadratic's leading coefficient and on the sign of its discriminant 4 a c - b^2, and two of those arms could not be reached:

integrand 2.5.0 master b1af529d this
1/(1 + q x^2) 4 arms, 269 characters 4 arms, 269 characters 3 arms, 226 characters
1/(3 + q x^2)^2 4, 446 4, 446 3, 368
1/(x (a + q x)) 4, 303, no value at a point where it has one 4, 303 3, 212
1/(x (a + q x))^2 4, 467, the same 4, 467 3, 315
1/(x (a + b x^n)) 4, 417, the same 4, 417 3, 296

Each answer is differentiated back and compared with the integrand at six points.

What changes. IntegrateRationalQuadratic and IntegrateOverPowerOfQuadratic leave out:

  • the arm for a zero discriminant where there is no linear term and the constant one is a number other than 0: the discriminant is 4 a c there, zero only where a is, which the arm before it takes -- and the arm left out divided by a;
  • the arm for a positive discriminant where there is no constant term and the middle coefficient is real as written, symbols and real numbers by arithmetic and whole powers: the discriminant is -b^2 there. Real as written only: under sqrt(-(a + b x)^2) the middle coefficient is sqrt(-b^2) a/b, and the discriminant a^2 is positive; RootOfAPerfectSquareIntegralTest holds a row of that.

An answer is up to a third shorter, and so is every answer built on one: 1/(x (a + b x^n)) comes to 1/(u (a + b u)).

Tests: QuadraticDenominatorArmsTest, four rows with three arms each, differentiated back with the parameter positive and negative.

Measured first on Rubi's 1.1.2.2, 1.2.1.1 and 1.3.1, 1,300 problems, at the corpus's 5-second budget, against master 287c69a7, the branch's base:

master this
solved 1249 1249
wrong 0 0
past the budget 7 7

Measured then on the Rubi corpus against master 287c69a7:

master this
family 0, independent suites (1814) 1772 1772
family 1, 40 a file (1381) 1308 1305
families 2 to 8, sampled (2410) 2301 2293

The harness counts no answer wrong in either. The 11 problems the two builds disagreed on are the 11 the sample lost here, each past the budget; run again one build at a time, both builds answer the same seven of them and run past the budget on the same four.

The suite passes on the commit measured, 99ae5eee, 14,826 tests, and the allocation gate passed. The head here, a2a3750b, merges master b1af529d; the calculus and corpus tests pass on it, 4,280 tests, and the library builds for netstandard2.0.

🤖 Generated with Claude Code

https://claude.ai/code/session_012sonx8iAspMiwRwokT1Ura

Rafael-SOWNet and others added 2 commits October 5, 2026 04:48
…s antiderivative

An integrand over a quadratic with symbols in it is answered by arms on its
leading coefficient and the sign of its discriminant 4 a c - b^2, and two of
them could not be reached: with no linear term and a number for the constant
one, the discriminant is zero only where the leading coefficient is, which the
first arm takes, and that arm divided by it; and with no constant term and a
middle coefficient real as written, it is -b^2, never positive. Both are left
out. Real as written only: under a root of the negative of a square the middle
coefficient is imaginary and the discriminant positive.

Part of #718.

Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_012sonx8iAspMiwRwokT1Ura
…e-left-out-of-a-quadratic-denominators-antiderivative
@Rafael-SOWNet Rafael-SOWNet added this to the 2.6.0 milestone Oct 5, 2026
@Rafael-SOWNet
Rafael-SOWNet merged commit 2b86349 into master Oct 5, 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