Skip to content

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 into
masterfrom
an-even-quotient-over-a-power-of-x-and-a-biquadratic-is-split-in-x-squared
Oct 6, 2026
Merged

Rafael-SOWNet merged 1 commit into
masterfrom
an-even-quotient-over-a-power-of-x-and-a-biquadratic-is-split-in-x-squared

Conversation

@Rafael-SOWNet

Copy link
Copy Markdown
Member

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 of a + b tan in thousands to hundreds of thousands. Split in x^2, they are answered in one to two thousand, in under a second:

integrand master 0630504c this
cot(c + d x)^(13/2) (a + b tan(c + d x))^(5/2) (A + B tan(c + d x)) past the budget; 1,023,850 characters given a minute 0.5 s, 2,552 characters
cot(c + d x)^(11/2) (a + b tan(c + d x))^(5/2) past the budget; 103,416 characters given a minute 0.2 s, 1,271 characters
(a + b tan(e + f x))^2/(c + d tan(e + f x))^(3/2) past the budget; 29,867 characters given a minute 0.2 s, 2,292 characters
tan(c + d x)^4/(a + b tan(c + d x))^(5/2) past the budget; 12,051 characters given a minute 0.2 s, 1,435 characters
cot(c + d x)^(5/2)/(a + b tan(c + d x))^(3/2) 7.4 s, 5,467 characters 0.1 s, 1,047 characters
cot(c + d x)^(3/2)/sqrt(a + b tan(c + d x)) 1.9 s, 4,424 characters 0.1 s, 755 characters

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 quotient t = sqrt(u/(a + b u)), these leave a polynomial in t^2 over t^(2k) Q(t^2), with Q = (1 - b t^2)^2 + a^2 t^4, which was split in t: the repeated t^(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 splits P(x^2)/Q(x^2) by the two roots in x^2, reads x^(2k) Q(x^2) below the bar now, a power of x on both sides cancelled first: in w = x^2 the terms in w^(-j) are the expansion of the remainder over Q at w = 0, by the recurrence r_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 of x below 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 master 0630504c:

master this
solved 1008 1051
unevaluated 2 2
unverifiable on the reals 1 1
past the budget 84 41

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:

master this
family 0, independent suites (1814) 1782 1782
family 1, 40 a file (1381) 1340 1340
families 2 to 8, sampled (2410) 2326 2327

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 master 0630504c and this change: 15,109 tests, every one reported. The allocation gate passes too: every gated benchmark allocates what the baseline says. The library builds for netstandard2.0.

🤖 Generated with Claude Code

https://claude.ai/code/session_012sonx8iAspMiwRwokT1Ura

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 6, 2026
@Rafael-SOWNet
Rafael-SOWNet merged commit 2d3dc6a into master Oct 6, 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