Repository navigation
Issue 619 Bug: Solving a system of equations... - #622
Merged
Merged
Conversation
…lyticalEquationSolver.Solve( "{-(x + -1000) / (-1)}", "{x}" ) was returning "{{ } \/ { 1000 } \ { }}". That wasn't being interpreted as a FiniteSet. Getting InnerSimplified results in "{1000}", and that fits the FiniteSet type.
Member
|
Thanks! |
WhiteBlackGoose
marked this pull request as ready for review
January 19, 2024 17:34
This was referenced Apr 24, 2026
Rafael-SOWNet
added a commit
that referenced
this pull request
Oct 1, 2026
…l in it (#1642) By parts against a polynomial chooses the polynomial's antiderivative so that what the other factor's derivative divides by divides it too: against x ln(1 + x) the antiderivative of x is (x^2 - 1)/2, and the remainder is a polynomial. That was done where the division left a number over, and a + b x leaves a symbol: x^2/2 over a + b x leaves a^2/(2 b^2), so x Shi(a + b x)^2 kept x^2/(a + b x) in its remainder and nothing read it. The antiderivative less its value at the root, -a/b, is divisible by the linear, and it is written now as the linear times the quotient, so that the linear cancels as written: x Shi(a + b x)^2 and x Ei(a + b x)^2 are two rounds of parts each. Measured on the Rubi corpus, master at 6c94652 and this change on it, run side by side: family 8 373 -> 376 of 420 (x Ei, x Shi and x Chi of a + b x, squared); family 2 544 of 650, the independent suites 1756 of 1814 and families 1 and 3 to 7 at five a file 800 of 897, on both. 0 wrong everywhere. Run alone, the three are 0 of 3 on master and 3 of 3 here; the fourth problem that moved, 2.3 #622, is 22 s unevaluated on both. The unit tests pass, 14,259. The performance gate passes on d480366e, which is this change on 6c94652: allocation is what the baseline says on all 19 gated benchmarks. SpecialFunctionsByPartsTest has two rows with a shifted argument, each differentiated back with its parameters pinned. Part of #1501. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
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.
#619
I added tests with the inputs described in the issue to the SolveSystem tests.
During debugging, I found that
AnalyticalEquationSolver.Solve( "{-(x + -1000) / (-1)}", "{x}" )was returning
"{{ } \/ { 1000 } \ { }}"That value wasn't fitting the FiniteSet type in the ternary within EquationSolver.InSolveSystem.
I tried simply getting InnerSimplified of the solution, and that worked for the new test cases and didn't break the old ones.
Maybe this isn't the right place to simplify, or FiniteSet should accept the value as is.