SYST
instruction.
Type a list containing the linear equations and as last element put
the list of unknowns. Here:
{ 'M*X+Y=-2' 'M*X+(M-1)*Y=2' { X Y } }
SYST
or SOLGEN
.
For SYST
, you get the solution at level 1, the list of particular
cases at level 2 and the original system at level 3. For SOLGEN
you get the same results but at level 2, 3 and 4 and the paramatrized
solution at level 1.
On the above example, we get at level 1:
:X:'-2/(M-2)' :Y:'4/(M-2)'
At level 2, you get the list of pivots. The result returned by
SYST
and SOLGEN
is incorrect if one of the pivot is 0.
Here level 2 is:
{ 'M^2-2*M' '-M+2' -1 'M+-2'}
Using M SOLV
, we see that
we have to solve for the particular cases m=0 and m=2.
The commands SYST
and SOLGEN
create
a variable named SYSTEM
to help solving particular cases.
To solve for m=2,
recall SYSTEM
on the stack, type 'M=2' EXEC
,
and call SYST
.
For systems, the SOLGEN
program provides another way of writing
the solution as an affine space of solutions.
Recall the matrix on the stack (simply hit SYSTEM
), type:
'M=0' EXEC SOLGEN
you get at level 2:
If { }, { X Y }=:{ X -2 }
(level 1 is the same as the result of SYST
).
This means that (x,-2) is solution for every x. The If
statement shows necessary conditions for the system to have solutions
(here no condition, but if we try m=2 instead of m=0 the system
has no solution: the If
statement is If { '0=-1'}
never
fulfilled).
Another way to solve the system is the
enter the matrix of the system
{ {M 1 -2} { M 'M-1' 2 } }
and call rref
to reduce it. You get at level 1:
{ { 'M^2-2*M' 0 '-2*M' } { 0 'M-2' 4 } }
.
This means that:
{ 1 'M-2'}
MATRIX
(which is created if the argument
contains at least one parameter).
Recall this matrix and type:
'M=2' EXEC
M
by 2 in the original matrix.
Now type rref
again, you get:
{ { 2 1 -2 } { 0 0 4 } }