A quotient in x^2 over a power of x and a biquadratic is split in x^2 - #1806
Merged
Rafael-SOWNet merged 1 commit intoOct 6, 2026
Conversation
Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_012sonx8iAspMiwRwokT1Ura
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.
cot(c + d x)^(13/2) (a + b tan(c + d x))^(5/2) (A + B tan(c + d x))is answered in a million characters, after eighteen seconds, and the rest of Rubi's 4.3 rows that put a half-odd power of the cotangent beside one ofa + b tanin thousands to hundreds of thousands. Split inx^2, they are answered in one to two thousand, in under a second:0630504ccot(c + d x)^(13/2) (a + b tan(c + d x))^(5/2) (A + B tan(c + d x))cot(c + d x)^(11/2) (a + b tan(c + d x))^(5/2)(a + b tan(e + f x))^2/(c + d tan(e + f x))^(3/2)tan(c + d x)^4/(a + b tan(c + d x))^(5/2)cot(c + d x)^(5/2)/(a + b tan(c + d x))^(3/2)cot(c + d x)^(3/2)/sqrt(a + b tan(c + d x))The times are the corpus harness's, with its check, both builds measured side by side; the sizes are of the answer the integrator returns, and each is differentiated back at six points with the symbols pinned. Of the rows the two builds both answer, none in a sample of 24 came out longer here, and most are the same answer.
What changes. Under
u = tan(x)and the root of the quotientt = sqrt(u/(a + b u)), these leave a polynomial int^2overt^(2k) Q(t^2), withQ = (1 - b t^2)^2 + a^2 t^4, which was split int: the repeatedt^(2k)beside the quartic went to the conjugates of a sum of two squares (#1804), at length, or, once a whole power of a product had been distributed, to the Hermite reduction, which declined it after seconds.SolveAnEvenPolynomialOverASymbolicBiquadratic, which splitsP(x^2)/Q(x^2)by the two roots inx^2, readsx^(2k) Q(x^2)below the bar now, a power ofxon both sides cancelled first: inw = x^2the terms inw^(-j)are the expansion of the remainder overQatw = 0, by the recurrencer_m = (R_m - b r_(m-1) - c r_(m-2))/a, and what is left,(d + e w)/Q, is the biquadratic's own. With no power ofxbelow the bar it runs as before.Tests:
EvenQuotientOverAPowerOfXAndABiquadraticIntegralTest, six rows, three rational and three of the cotangent, each differentiated back with its answer under 5,000 characters.Measured first on Rubi's 4.3 rows with a root and no
i, 1,095 problems, at the corpus's 5-second budget, against master0630504c:The harness counts no answer wrong in either. On the 1,008 problems both answer, the time goes from 794 seconds to 528.
Measured then on the Rubi corpus against master
0630504c:The harness counts no answer wrong in either.
The 43 problems the two builds disagreed on, pocket and sample together, run again one build at a time: master answers one of them,
sqrt(c + d tan(e + f x)) (A + B tan(e + f x) + C tan(e + f x)^2)/(a + b tan(e + f x))^3, with the same answer as this, and runs past the budget on the other 42; this answers all 43, in 1.3 seconds on average with the check. They are 17 of Rubi's 4.3.2.1, 10 of 4.3.3.1 and 16 of 4.3.4.2: the cotangent's rows, and the whole powers of one tangent sum over a half-odd power of another, which the root of the second leaves in the same shape.The suite passes on the head here,
01735450, which is master0630504cand this change: 15,109 tests, every one reported. The allocation gate passes too: every gated benchmark allocates what the baseline says. The library builds fornetstandard2.0.🤖 Generated with Claude Code
https://claude.ai/code/session_012sonx8iAspMiwRwokT1Ura