Skip to content

A sum of two squares below the bar, beside a repeated factor, is split over its conjugates - #1804

Merged
Rafael-SOWNet merged 2 commits into
masterfrom
a-sum-of-two-squares-below-the-bar-is-split-over-its-conjugates
Oct 6, 2026
Merged

Rafael-SOWNet merged 2 commits into
masterfrom
a-sum-of-two-squares-below-the-bar-is-split-over-its-conjugates

Conversation

@Rafael-SOWNet

Copy link
Copy Markdown
Member

Part of #718.

(c + d tan(x))^(3/2)/(a + b tan(x))^2 ran past two minutes, with the rest of Rubi's 4.3.2.1 that put one root, or two, over a whole power of a tangent sum:

integrand master 15aae3d3 this
(c + d tan(x))^(3/2)/(a + b tan(x))^2 past 60 s 1.4 s, 47,209 characters
(c + d tan(x))^(5/2)/(a + b tan(x))^2 past 60 s 0.8 s, 55,579 characters
(c + d tan(x))^(3/2)/(a + b tan(x))^3 past 60 s 1.2 s, 71,293 characters
x^4/((a d + (x^2 - c) b)^2 ((x^2 - c)^2 + d^2)) past 60 s 4.2 s, 42,592 characters
1/((a + b tan(x))^(3/2) (c + d tan(x))^(3/2)) past 60 s 0.5 s, 18,658 characters
1/((a + b tan(x))^(5/2) (c + d tan(x))^(3/2)) past 60 s 0.7 s, 28,342 characters

What changes. Under u = tan(x) and t = sqrt(c + d u), the 1 + u^2 the tangent leaves is (t^2 - c)^2 + d^2, a quartic beside the square of a d + b (t^2 - c). The split by residues reads factors of the first and second degree only, so the quotient went to the Hermite reduction, which solved for its numerators with the symbols in every entry. SolveByPartialFractions writes a factor that is a sum of two squares, P^2 + Q^2 with the greater of their degrees two, as (P - i Q)(P + i Q) now, beside a repeated factor, and asks the quotient again; over those two every factor is one the split reads. Under the root of the quotient of two such linears the sum is (b - d t^2)^2 + (c t^2 - a)^2, with both parts in t, and the same holds. Not of the first degree: (a + b x)^2 + k^2 is a quadratic every rule reads, by an arctangent.

The constants of that split hold i, and it is short only with them in lowest terms, which #1795 does; this branch is measured on top of it.

Tests: SumOfTwoSquaresBelowTheBarIntegralTest, six rows, one root and two, differentiated back where the roots are real.

Measured on Rubi's 4.3 rows with a root and no i, 1,095 problems, at the corpus's 5-second budget, against #1795's commit 714fb609:

#1795 this
solved 965 1002
unevaluated 11 3
unverifiable on the reals 1 1
past the budget 118 89

The harness counts no answer wrong in either.

The 104 problems the two builds disagreed on, run again one build at a time: #1795's commit answers 32, declines 8 and runs past the budget on 64; this answers 69 and runs past the budget on 35.

The suite on the commit measured, 9e81e67c, passes, 15,047 tests, and so does the allocation gate: every gated benchmark allocates what the baseline says. The head here, b986f4e9, merges master 15aae3d3; the calculus and corpus tests pass on it, 4,364 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 11:44
…t over its conjugates

Under u = tan(x) and t = sqrt(c + d u), the 1 + u^2 of
(c + d tan(x))^(3/2)/(a + b tan(x))^2 is (t^2 - c)^2 + d^2, a quartic beside the
square of a d + b (t^2 - c). The split by residues reads factors of the first
and second degree only, so the quotient went to the Hermite reduction, which
solved for its numerators with the symbols in every entry and ran past two
minutes. A written sum of two squares P^2 + Q^2, the greater of their degrees
two, beside a repeated factor, is written (P - i Q)(P + i Q) now and the
quotient asked again: four rows of 4.3.2.1 with one root over a power of
a + b tan are answered in one to two seconds, and two with two roots, where the
sum is (b - d t^2)^2 + (c t^2 - a)^2 under the root of their quotient.

The constants in that split hold i, and it is short only with them in lowest
terms (#1788's first part).

Part of #718.

Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_012sonx8iAspMiwRwokT1Ura
…s-below-the-bar-is-split-over-its-conjugates
@Rafael-SOWNet Rafael-SOWNet added this to the 2.6.0 milestone Oct 6, 2026
@Rafael-SOWNet
Rafael-SOWNet merged commit ba77f7a 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