RationalDense - Maple Help

SolveTools[LinearSolvers]

 RationalDense
 fast linear solve over the field of rational numbers

 Calling Sequence RationalDense(eq, var) RationalDense(eq, var, skiptest)

Parameters

 eq - list or set of equations linear in var with rational coefficients var - list or set of variables for eq

Description

 • 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.

Examples

 > $\mathrm{with}\left(\mathrm{SolveTools}\left[\mathrm{LinearSolvers}\right]\right):$

Basic system

 > $\mathrm{sys}≔\left\{x+y=2,x-y=0\right\}:$
 > $\mathrm{vars}≔\left\{x,y\right\}:$
 > $\mathrm{RationalDense}\left(\mathrm{sys},\mathrm{vars}\right)$
 $\left\{{x}{=}{1}{,}{y}{=}{1}\right\}$ (1)

No solution

 > $\mathrm{sys}≔\left\{x+y=2,2x+2y=0\right\}:$
 > $\mathrm{vars}≔\left\{x,y\right\}:$
 > $\mathrm{RationalDense}\left(\mathrm{sys},\mathrm{vars}\right)$

Multiple solutions

 > $\mathrm{sys}≔\left\{x+y=2,2x+2y=4\right\}:$
 > $\mathrm{vars}≔\left\{x,y\right\}:$
 > $\mathrm{RationalDense}\left(\mathrm{sys},\mathrm{vars}\right)$
 $\left\{{x}{=}{2}{-}{y}{,}{y}{=}{y}\right\}$ (2)