4-70 Computer Algebra Commands
Description: Substitutes a value for a variable in an expression. The value can be numeric or an expression.
This is similar to the Where function, denoted by the symbol |, but SUBST substitutes
without evaluating the resulting expression.
Access: Algebra, …×L, P
ALG
Input: Level 2/Argument 1: An expression.
Level 1/Argument 2: The value or expression to be substituted.
Output: The expression with the substitution made.
Flags: Exact mode must be set (flag –105 clear).
Numeric mode must not be set (flag -3 clear).
Radians mode must be set (flag –17 set).
Example: Substitute x = z+1 for x in the following expression, and apply the EXPAND command to
simplify the result:
x
2
3x 7++
Command: SUBST(X^2+3*X+7,X=Z+1)
EXPAND(ANS(1))
Result: Z^2+5*Z+11
See also: | (where command)
SUBTMOD
Type: Function
Description: Performs a subtraction, modulo the current modulus.
Access: Arithmetic, !Þ MODULO L
Input: Level 2/Argument 1: The object or number to be subtracted from.
Level 1/Argument 2: The object or number to subtract.
Output: The result of the subtraction, modulo the current modulus.
Flags: Exact mode must be set (flag –105 clear).
Numeric mode must not be set (flag -3 clear).
Radians mode must be set (flag –17 set).
SYLVESTER
Type: Command
Description: For a symmetric matrix A, returns D and P where D is a diagonal matrix and
A = P
T
DP
Access: !Ø
QUADF
Input: A symmetric matrix.
Output: Level 2/Item 1: the diagonal matrix, D.
Level 1/Item 2: The matrix P.
Flags: Exact mode must be set (flag –105 clear).
Numeric mode must not be set (flag -3 clear).
Radians mode must be set (flag –17 set).
Example: Rewrite in P
T
DP form the matrix:
1 2
2 4
Command: SYLVESTER([1, 2][2, 4])