Skip to content

A shared symbol among a denominator sum's coefficients comes out in front of it - #1403

Merged
Rafael-SOWNet merged 3 commits into
masterfrom
denominator-content
Sep 17, 2026
Merged

Rafael-SOWNet merged 3 commits into
masterfrom
denominator-content

Conversation

@Rafael-SOWNet

@Rafael-SOWNet Rafael-SOWNet commented Sep 17, 2026 •

Copy link
Copy Markdown
Member

tan(x)/(a + a csc(x)) came back unevaluated while tan(x)/(1 + csc(x)) was answered in a quarter of a second. Traced: under u = sin(x) the denominator is (a u + a)(1 - u^2), a symbolic linear beside a rational quadratic that shares its root, which the symbolic split declines (rightly — the root is not that block's alone); under the half-angle it is -a t^6 - 2a t^5 - a t^4 + a t^2 + 2a t + a, a sextic with a symbol in every coefficient, which nothing factors — where it is a times -(t - 1)(t + 1)^3 (t^2 + 1).

Change. In SolveByPartialFractions, before the denominator is refactored over the rationals: every written sum among its factors whose coefficients share a symbol is written as its content times its primitive part — the content by PolynomialGcd.ContentIn over the coefficients as polynomials in the symbols — so (a u + a) is a (u + 1), and the refactoring that follows finds the repeated (u + 1). The lowest power of the variable every term holds comes out the same way: a u^4 + b u^3 is u^3 (a u + b), which is what u = sin(x) makes of cot(x)^3/(a + b csc(x)), and neither the refactoring over the rationals nor the symbolic split reads a symbolic polynomial for the monomial it is a multiple of. Whole powers of the sum only: (c e + d e x)^(1/3) is e^(1/3) (c + d x)^(1/3) for a positive e and not for a negative one, and a symbol is neither — a first version read the fractional power too and answered #1386's sin(a + b (c + d x)^(1/3))/(c e + d e x)^(1/3) with e^(1/3) pulled out, right where e > 0 only, and that row is back to unevaluated. Once, since a primitive factor has no content to take out; the numerator is not read, since a factor there is not what stops anything.

Measured. Rubi's family 4 sample (422, six per file): 243 → 255, 0 wrong — tan(x)/(a + a csc(x)), tan(x)^4/…, sec(x)^2/…, sin(x)^4/(a + a cos(x)), cos(c + d x)^4/(a + a sin(c + d x))^2, (c + d x)/(a + a sin(e + f x))^2, cot^2/(a + a sec)^2 and two more powers of (a + a sin) from the symbol content, then cot(x)^3/(a + b csc(x)), 1/(a + b csc(c + d x)^2) and cot^4 sqrt(a + b tan^2) from the monomial (second commit); no row goes the other way (one sqrt(a + a sin)/(sin (c + d sin)) reads Unsolved at 9.4 s on one run and Timeout on the other, both past the budget). The 1,774-problem independent suite: 1706/1774, 0 wrong, 0 timeouts, verdicts identical to master. All four test suites green; DenominatorContentTest (6 rows, each at a = 2 and a = -3) with its .editorconfig section; BREAKING-CHANGES entry.

Part of #718.

🤖 Generated with Claude Code

https://claude.ai/code/session_012sonx8iAspMiwRwokT1Ura

Rafael-SOWNet and others added 3 commits September 17, 2026 17:42
…ront of it

tan(x)/(a + a csc(x)) came back unevaluated while tan(x)/(1 + csc(x)) was answered: under
u = sin(x) the denominator is (a u + a)(1 - u^2), a symbolic linear beside a rational quadratic
that shares its root, which the symbolic split declines, and under the half-angle it is a
sextic with a in every coefficient, which nothing factors. A written sum below the bar whose
coefficients share a symbol is now that symbol times a polynomial over the rationals -- the
content, by the multivariate gcd of the coefficients, and the primitive part -- before the
denominator is refactored, so the repeated factor is found and the rational machinery answers.
Once, since a primitive factor has no content to take out.

Rubi's family 4 sample: ten more rows, the powers of (a + a sin) and (a + a sec) among them;
the 1774-problem suite is unchanged at 1706 with 0 wrong.

Part of #718.

Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_012sonx8iAspMiwRwokT1Ura
…m as well

a u^4 + b u^3 is u^3 (a u + b), what u = sin(x) makes of cot(x)^3/(a + b csc(x)), and neither
the refactoring over the rationals nor the symbolic split reads a symbolic polynomial for the
monomial it is a multiple of. Family 4: three more rows.

Part of #718.

Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_012sonx8iAspMiwRwokT1Ura
@Rafael-SOWNet

Copy link
Copy Markdown
Member Author

Merged master (#1401 and #1402; one same-anchor conflict in .editorconfig, both kept). On the merge: the new test classes and the corpus gate green, the 1,774-problem suite 1706/1774 with 0 wrong and 0 timeouts, verdicts identical to master, 89.6 s → 83.6 s.

@Rafael-SOWNet
Rafael-SOWNet merged commit a189e62 into master Sep 17, 2026
31 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