Repository navigation
Four nested roots with a closed form are integrated - #1787
Merged
Rafael-SOWNet merged 2 commits intoOct 5, 2026
Merged
Rafael-SOWNet merged 2 commits into
Rafael-SOWNet merged 2 commits into
Conversation
Rubi's 1.3.3 gives four nested roots a closed form, and they were declined: sqrt(a + b sqrt(c + d x^2)) with a^2 = b^2 c, which is 2 b^2 d x^3/(3 S^(3/2)) + 2 a x/sqrt(S) for the root S; sqrt(c x^2 + d sqrt(a + b x^4))/sqrt(a + b x^4) with c^2 = b d^2, and 1/((a + b x^n) sqrt(c x^2 + d (a + b x^n)^(2/n))), each the derivative of w = x/sqrt(S) over 1 - k w^2; and sqrt(a x^2 + b x sqrt(c + d x^2))/(x sqrt(c + d x^2)) with a^2 = b^2 d and b^2 c + a = 0, in t = a x + b sqrt(c + d x^2). The integral in w or t is asked of the integrator with a symbolic coefficient named, and the answer is differentiated back before it is returned. Part of #718. Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_012sonx8iAspMiwRwokT1Ura
…tegrated-in-the-quotient-it-is-the-derivative-of # Conflicts: # Sources/AngouriMath/Functions/Continuous/Integration/Integration.Definition.cs
Rafael-SOWNet
deleted the
a-nested-root-is-integrated-in-the-quotient-it-is-the-derivative-of
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.3.3 gives four nested roots a closed form, and all four were declined --
sqrt(1 + sqrt(1 - x^2)), Welz'ssqrt(x^2 + sqrt(1 + x^4))/sqrt(1 + x^4)and Timofeev's1/((1 + x^4) sqrt(-x^2 + sqrt(1 + x^4)))among them:2b86349csqrt(1 + sqrt(1 - x^2))sqrt(x^2 + sqrt(1 + x^4))/sqrt(1 + x^4)1/((1 + x^4) sqrt(-x^2 + sqrt(1 + x^4)))sqrt(a x^2 + b x sqrt(-a/b^2 + a^2 x^2/b^2))/(x sqrt(-a/b^2 + a^2 x^2/b^2))Each answer is differentiated back and compared with the integrand at six points.
What changes.
SolveANestedRootByItsClosedForm, asked afterSolveByTakingARootOfAPerfectSquare, reads the integrand's factors from both sides of the bar as powers and answers four shapes:sqrt(a + b sqrt(c + d x^2))witha^2 = b^2 c, which is2 b^2 d x^3/(3 S^(3/2)) + 2 a x/sqrt(S)for the rootS;sqrt(c x^2 + d sqrt(a + b x^4))/sqrt(a + b x^4)withc^2 = b d^2, and1/((a + b x^n) sqrt(c x^2 + d (a + b x^n)^(2/n))): each is the derivative ofw = x/sqrt(S)over1 - 2 c w^2or1 - c w^2, sinceS' = 2 c x S/(d R)for the inner rootR;sqrt(a x^2 + b x sqrt(c + d x^2))/(x sqrt(c + d x^2))witha^2 = b^2 dandb^2 c + a = 0, which issqrt(2) b/atimes1/sqrt(1 + t^2/a)int = a x + b sqrt(c + d x^2).The integral in
wortis asked of the integrator with its coefficient named, each condition is decided as a value, and the answer is differentiated back at sampled points before it is returned.Tests:
NestedRootClosedFormIntegralTest, seven rows over the four shapes, with symbols and without, differentiated back.Measured first on 1,232 problems with two roots or more, nested or side by side, 228 of them Rubi's 1.3.2, at the corpus's 5-second budget, against master
287c69a7, the branch's base:Measured then on the Rubi corpus against master
287c69a7:The harness counts no answer wrong in either. The 22 problems the two builds disagreed on, pocket and sample together, run again one build at a time: this answers 14 that master does not -- 1.3.2:651-654, 1222-1223, 1326-1328 and 1338-1339, Welz's 49 and 50 and Timofeev's 447 -- and master none that this does not. The other eight take over 12 seconds on either build or run past the budget on both, and the load decides whether they are answered.
The suite on the commit measured,
03360aa6, was cut short in the chain: its test host was stopped at 7.8 GB on a loaded machine. Run again under a 4 GB heap it passes, 14,829 tests. The allocation gate failed in the chain atEvalPolynomialFresh, 65 times the baseline's time and 10.6% more allocation on that loaded machine, and run again it passes, at the baseline's allocation exactly. The head here,3a10335a, merges master2b86349c; the calculus and corpus tests pass on it, 4,301 tests, and the library builds fornetstandard2.0.🤖 Generated with Claude Code
https://claude.ai/code/session_012sonx8iAspMiwRwokT1Ura