Repository navigation
Beside the roots of two linears, a polynomial over a power of a third is integrated by undetermined coefficients - #1697
Merged
Rafael-SOWNet merged 6 commits intoOct 2, 2026
Conversation
… is integrated by undetermined coefficients Rubi's 1.1.1.6, a polynomial beside sqrt(c + d x) sqrt(e + f x) with symbols in the linears, went through the quotient of the two roots. Its rational function in t is over a power of d - f t^2 that grows with the degree of the polynomial, and (A + B x + C x^2) sqrt(c + d x) sqrt(e + f x) took more than 4 GB; with one more linear below the bar it ran past every budget. Now T/((g + h x)^k S), S the product of the two roots and T a polynomial, is U S plus multiples of two integrals. The polynomial part solves R = U' Q + U Q'/2 + lambda, which is triangular, and each power of the third linear below the bar comes down to the integral of 1/((g + h x) S) by the recurrence its derivative gives. The two integrals left are an artanh and an arctan of sqrt(c + d x)/sqrt(e + f x), each exact wherever sqrt(z)^2 = z, which is everywhere. Each of the nineteen 1.1.1.6 problems tried is answered, in under a second, and differentiates back. Part of #718. Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_012sonx8iAspMiwRwokT1Ura
…inears Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_012sonx8iAspMiwRwokT1Ura
…with a symbol in them With numbers in both linears the combining of roots and the quotient substitution answer, in their own forms, and the rule is for the symbols that those declined or took gigabytes over: below the top, where the combining does not run, it would otherwise answer what they did, in another form. Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_012sonx8iAspMiwRwokT1Ura
…-the-roots-of-two-linears # Conflicts: # Sources/Tests/UnitTests/Calculus/TwoLinearRadicalsIntegralTest.cs
The integral of 1/S is a logarithm for one sign of d/b and an arctangent for the other, and the third kind's is the same in rho. Where the quantity has symbols in it, both are given, each provided where it holds, as 1/(a - x^2) is answered. One form alone is complex, by a constant, on the side where the other is real, and an answer that writes each linear once checks its arms there. Part of #718. Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_012sonx8iAspMiwRwokT1Ura
…-the-roots-of-two-linears
Rafael-SOWNet
deleted the
a-polynomial-beside-the-roots-of-two-linears
branch
October 29, 2026 00:43
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.
Rubi's 1.1.1.6 is
P(x) (a + b x)^m (c + d x)^n (e + f x)^p. With symbols in the linears, a polynomial besidesqrt(c + d x) sqrt(e + f x)went through the quotient of the two roots,t = sqrt(c + d x)/sqrt(e + f x). Its rational function intis over a power ofd - f t^2that grows with the degree ofP.(A + B x + C x^2) sqrt(c + d x) sqrt(e + f x)took more than 4 GB of memory that way, and nothing over a third linear below the bar was answered:(A + B x + C x^2) sqrt(c + d x) sqrt(e + f x)(e + f x)^3 (A + B x + C x^2) sqrt(a + b x) sqrt(a c - b c x)(A + B x + C x^2) sqrt(c + d x) sqrt(e + f x)/(a + b x)^3(A + B x + C x^2) sqrt(c + d x)/((a + b x) sqrt(e + f x))(A + B x + C x^2)/((e + f x)^2 sqrt(a + b x) sqrt(a c - b c x))Of the 19 problems that master leaves unsolved in a sample of 40 from 1.1.1.6, this answers all 19, each in under a second on a loaded machine, and each differentiates back. On master, 8 ran past 4 GB, 9 ran past a 10 s budget, and 2 had not stopped a minute after they were cancelled.
What changes. Write
S = sqrt(c + d x) sqrt(e + f x)andQ = (c + d x)(e + f x). The integrand isT/((g + h x)^k S)withTa polynomial. Becausesqrt(z)^2 = zfor every complexz,S' = Q'/(2 S). Then:Tfrom(g + h x)^kup are a polynomialR.int R/SisU S + lambda int 1/S, whereR = U' Q + U Q'/2 + lambda, a triangular system for the coefficients ofU.g + h xcomes down toint 1/((g + h x) S), by the recurrence the derivative ofS (g + h x)^(1-j)gives.sqrt(c + d x)/sqrt(e + f x). Each differentiates back whereversqrt(z)^2 = z, which is everywhere. Each is real for one sign of the quantity under its roots: for a number, the form for its sign is written; for a quantity with symbols, both are, each provided where it holds, as1/(a - x^2)is answered.The recurrence runs with a symbol for the third linear's root, so that everything it computes is polynomial in it, and
-g/hgoes back once at the end, written homogeneous ingandh.The rule takes only linears with a symbol in them. It runs after the combining of roots and before the quotient substitution, and with numbers in both linears those two answer as before.
Tests:
TwoLinearRadicalsIntegralTest.APolynomialBesideTheRootsOfTwoLinears(eight rows) andOverAPowerOfAThirdLinear(four), each differentiated back with the symbols pinned. The helper there zeroedCto drop the integration constant, which here is a coefficient: the constant isC_1where the integrand has aC, and the helper now leaves the answer alone then.Measured on the Rubi corpus against master
eaf3cde5, the branch's base, with both builds side by side:No answer is wrong on either build.
And on the whole of Rubi's 1.1.1.3 to 1.1.1.7, 2690 problems, this branch answers 2529 against master's 2388. Ten that master answered ran out of time here, but re-run side by side they come out the same on both builds: three answered and seven out of time on each. They were near the budget either way.
Thirty problems moved between the two runs, so I re-ran each alone on both builds. This branch answers 27 of them and master 4, neither wrongly, and none that master answers is lost. The one in family 6 that moved the other way, 6.7.1:180, is among them: alone, this branch answers it and master runs out of time, so it is near the budget on both.
The suite passes, 14,364 tests on a fresh build, and so does the allocation gate. Both were run before the two commits below.
Master
58581667is merged in since; its one conflict was rows both sides added toTwoLinearRadicalsIntegralTest. On the merge, #1683's1/(e^atanh(a x) (c - c/(a x))^(3/2))ran out of time. Writing each linear once, it came to two linear radicals over a third linear. The logarithm this branch wrote for a symbolic quantity was complex, by a constant, on the interval that arm checks, so the arm failed. With both forms given by sign, the integral is answered in 0.8 s, against 2 s on master. The calculus tests pass on that merge witha34dbc3b, 3,711 of them. After the merge with58581667, the four test classes nearest the change pass, 101 tests. The 151 problems the pocket gained, and the 30 moves, were run again on the final commit: all still answered, none wrong.🤖 Generated with Claude Code
https://claude.ai/code/session_012sonx8iAspMiwRwokT1Ura