Repository navigation
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
Conversation
…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
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
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 - 2bin, andits 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_kwithdthelast 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 perarm 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 ofa. The test thatpinned its decline is repinned to the answer.
Rubi sample (463 problems, 5 s budget), against the #1312 master this branch is cut from:
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