Skip to content

A symbolic cubic's linear factors are found before the partial fractions - #1841

Merged
Rafael-SOWNet merged 3 commits into
masterfrom
symbolic-linear-factors-of-a-cubic
Oct 10, 2026
Merged

Rafael-SOWNet merged 3 commits into
masterfrom
symbolic-linear-factors-of-a-cubic

Conversation

@Rafael-SOWNet

Copy link
Copy Markdown
Member

Part of #718.

Partial fractions over a symbolic polynomial need its linear factors, and nothing looked for them when the coefficients had symbols in them. WithSymbolicLinearFactorsFound now tries a polynomial of degree three or more with symbols in it, when its leading and constant coefficients are single terms. The candidates are linears u ± v x, with u a divisor of the constant term and v one of the leading coefficient, as for rational roots over the integers. The ones that divide exactly are written apart. If the numerator holds one of them too, it is cancelled from both sides, once per power, before the partial fractions run. Without that cancellation, 1/(a sec x + b tan x)^4 went from a 3-second decline to a timeout.

2.5.0 and master 3c86dda7 declined all six of these rows:

integrand Rubi length time
1/((a + b x)(c + d x)(h + f x)), multiplied out 1.3.1:25 288 0.4 s
the same, squared 1.3.1:26 3,047 1.3 s
the same, cubed 1.3.1:27 10,662 2.4 s
sec(c + d x)^6/(a cos(c + d x) + b sin(c + d x)) 4.7.2:150 5,573 0.1 s
sec(c + d x)^3/(a cos(c + d x) + b sin(c + d x))^4 4.7.2:177 9,322 1.5 s
1/(a sec x + b tan x)^4 4.7.7:354 6,548 0.3 s

Lengths are characters of Stringize(). All six ran in one process, in this order.

Rubi corpus, both arms built from 88354428, fix against master:

  • Files 0–8, plus a 14,817-row pocket: the pocket goes from 14,619 to 14,625 solved. Every file has the same counts in both arms, and both arms have 0 wrong.
  • Rows that moved: the six above. A rerun of only those rows gives 6/6 solved on this branch, graded by differentiating back. On master the same rerun gives 5 declined and 1 timeout.
  • Allocation gate: passed.
  • Unit suite: 15,195 passed, 0 failed, 13 skipped (net10.0).

BREAKING-CHANGES.md has an entry, A symbolic cubic's linear factors are found before the partial fractions. SymbolicLinearFactorsOfACubicIntegralTest integrates the cubic and its square, and checks each answer differentiates back at sampled points.

🤖 Generated with Claude Code

https://claude.ai/code/session_012sonx8iAspMiwRwokT1Ura

@Rafael-SOWNet Rafael-SOWNet added this to the 2.6.0 milestone Oct 10, 2026
@Rafael-SOWNet
Rafael-SOWNet merged commit fae1367 into master Oct 10, 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