SolveTools[LinearSolvers]
RationalDense
fast linear solve over the field of rational numbers
Calling Sequence
Parameters
Description
Examples
RationalDense(eq, var)
RationalDense(eq, var, skiptest)
eq
-
list or set of equations linear in var with rational coefficients
var
list or set of variables for eq
The RationalDense command computes the solution(s) of the input dense rational linear system. If there exist no solutions NULL is returned. It follows the same form of input and output as SolveTools:-Linear.
If the option skiptest is given, any correctness checks are skipped and the answer has a small chance of being incorrect. it should only be used if the user has an efficient way to check the answer in their result. (The test is not slow, but does generally take several times more computation time than the rest of the computation.)
For more details on the underlying algorithm, see RationalDenseNullSpace which does the work.
with⁡SolveToolsLinearSolvers:
Basic system
sys≔x+y=2,x−y=0:
vars≔x,y:
RationalDense⁡sys,vars
x=1,y=1
No solution
sys≔x+y=2,2⁢x+2⁢y=0:
Multiple solutions
sys≔x+y=2,2⁢x+2⁢y=4:
x=2−y,y=y
See Also
SolveTools:-Linear
SolveTools:-LinearSolvers:-RationalDenseNullSpace
Download Help Document