Skip to content

A linear system with symbols in its entries is solved over polynomials in the symbols, fraction-free, so that its zeros are zeros and its answers are one fraction each - #1314

Merged
Rafael-SOWNet merged 1 commit into
masterfrom
symbolic-partial-fraction-coefficients
Sep 13, 2026
Merged

Rafael-SOWNet merged 1 commit into
masterfrom
symbolic-partial-fraction-coefficients

Conversation

@Rafael-SOWNet

Copy link
Copy Markdown
Member

The elimination behind partial fractions, the reciprocal substitution and
the cube-root ansatz runs on entities, whose arithmetic collects nothing:
with symbols in the entries its zero test is numeric, so it pivots on what
may be zero and declines a consistent system it has left 2b - 2b in, and
its answers are what the arithmetic wrote. 1/((x + 1) sqrt(x^2 + x + b))
through the Euler substitution came back correct in 24 KB, with
partial-fraction coefficients like (2b - 2b) beside terms that were zero;
1/((x + a) sqrt(x^2 + b x + c)) in 77 KB and thirteen seconds.
1/((x^2 + a)^2 (x + 1)) was declined, and a test pinned that.

Where every entry is a polynomial over Q in the symbols, the system is now
solved as such first: Bareiss' fraction-free elimination keeps every
intermediate a polynomial -- a minor of the augmented matrix, divided
exactly by the previous pivot -- so every zero is a zero, and the
Gauss-Jordan form of it (Nakos, Turner and Williams, 1997) reduces above
the pivot too, so at the end each pivot row reads d x_k = n_k with d the
last pivot: one fraction per unknown, both sides primitive with the
rational they were scaled by in front, in lowest terms where the gcd
finds them, and no back-substitution to compound them. An entry outside
that ring -- a number outside Q, a symbol under a root or below the bar --
or an intermediate past the term ceiling hands the system back to the
elimination on entities, unchanged.

1/((x + a) sqrt(x^2 + b x + c)) is one arctangent or one logarithm per
arm of a piecewise on the discriminant, under 2 KB, in half a second;
1/((x^2 + a)^2 (x + 1)) is answered, on both signs of a. The test that
pinned its decline is repinned to the answer.

Rubi sample (463 problems, 5 s budget), against the #1312 master this branch is cut from:

master at #1312     404/463, 0 wrong, 0 timeouts, 99-100 s
with this           405/463, 0 wrong, 0 timeouts, 97 s

One more, nothing lost: Moses 114, (-A^2 - B^2)/(B (1 + w^2)^2 (1 - (A^2 + B^2) w^2/(B^2 (1 + w^2)))), 3.5 s to decline before and 0.3 s to answer now. No other problem moved by more than noise.

Independent of #1313, which pins the symbols and solves on the support it finds; the two compose -- the pinned solve calls this one -- and conflict only in the file, on the line both add before the elimination.

The five test suites are green.

Part of #718.

🤖 Generated with Claude Code

https://claude.ai/code/session_012sonx8iAspMiwRwokT1Ura

…s in the symbols, fraction-free, so that its zeros are zeros and its answers are one fraction each

The elimination behind partial fractions, the reciprocal substitution and
the cube-root ansatz runs on entities, whose arithmetic collects nothing:
with symbols in the entries its zero test is numeric, so it pivots on what
may be zero and declines a consistent system it has left `2b - 2b` in, and
its answers are what the arithmetic wrote. `1/((x + 1) sqrt(x^2 + x + b))`
through the Euler substitution came back correct in 24 KB, with
partial-fraction coefficients like `(2b - 2b)` beside terms that were zero;
`1/((x + a) sqrt(x^2 + b x + c))` in 77 KB and thirteen seconds.
`1/((x^2 + a)^2 (x + 1))` was declined, and a test pinned that.

Where every entry is a polynomial over Q in the symbols, the system is now
solved as such first: Bareiss' fraction-free elimination keeps every
intermediate a polynomial -- a minor of the augmented matrix, divided
exactly by the previous pivot -- so every zero is a zero, and the
Gauss-Jordan form of it (Nakos, Turner and Williams, 1997) reduces above
the pivot too, so at the end each pivot row reads `d x_k = n_k` with `d` the
last pivot: one fraction per unknown, both sides primitive with the
rational they were scaled by in front, in lowest terms where the gcd
finds them, and no back-substitution to compound them. An entry outside
that ring -- a number outside Q, a symbol under a root or below the bar --
or an intermediate past the term ceiling hands the system back to the
elimination on entities, unchanged.

`1/((x + a) sqrt(x^2 + b x + c))` is one arctangent or one logarithm per
arm of a piecewise on the discriminant, under 2 KB, in half a second;
`1/((x^2 + a)^2 (x + 1))` is answered, on both signs of `a`. The test that
pinned its decline is repinned to the answer.

Rubi sample: +1 (Moses 114, a symbolic rational function that took 3.5 s
to decline and 0.3 s to answer), 0 wrong, 0 timeouts.

Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_012sonx8iAspMiwRwokT1Ura
@Rafael-SOWNet
Rafael-SOWNet merged commit 1794d49 into master Sep 13, 2026
31 checks passed
@Rafael-SOWNet
Rafael-SOWNet deleted the symbolic-partial-fraction-coefficients branch September 13, 2026 20:01
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