AngouriMath

Navigation

LinearSystemSolver


← Back to list of classes

Description

Summary

A linear system with fewer equations than unknowns, answered as the family of all its
solutions: the unknowns a row reduction leaves free become parameters, and the rest are
written in terms of them.
#212

Remarks

2x - 4y = 12 for x and y is the issue's own example. It has
infinitely many solutions and one degree of freedom, so the answer is a single row
[12/2 + 2t, t] rather than a list of them, and the t in it is a variable
the caller did not name.
The answer type did not need changing, which is why this is small. A solution is a
row of Matrix whose i-th entry is the i-th unknown's value, and nothing
says those entries may not mention a variable. The same device already carries the
constant of integration out of the ODE solver, and
InSolveSystem(System.Collections.Generic.List{AngouriMath.Entity},System.ReadOnlySpan{AngouriMath.Entity.Variable},AngouriMath.Entity,AngouriMath.Core.Budgets.BudgetLedger) already mints one t for the single case
where its recursion bottoms out unconstrained
(#550).
Reached only where the count is short, which is the one shape that had no answer
at all — SolveSystem threw WrongNumberOfArgumentsException for it before
reaching any elimination. A square system that is rank-deficient is left to the
eliminator, which already answers it; taking those here as well would change answers that
are not wrong.
Rational coefficients on the unknowns, and that is a soundness requirement rather than
a convenience.
Row reduction has to decide whether a pivot is zero, and the general
test available here is structural — Matrix.ReducedRowEchelonForm asks
a == 0, which an expression that is zero everywhere without being written as
0 fails. Choosing such a pivot divides by zero and produces a wrong family rather
than no answer. Over the rationals the question is decidable, so it is asked there. The
constant term is under no such restriction: it is never a pivot, so
2x - 4y = k is answered with k symbolic.

Members

























Angouri © 2019-2023 · Project's repo · Site's repo · Octicons · Transparency · 4378 pages online