Substitute Command
CAS Syntax
- Substitute( <Expression>, <from>, <to> )
-
Replaces in expression all occurrences of from with to and evaluates the result when variables are substituted with values.
-
Substitute((3 m - 3)^2 - (m + 3)^2, m, a)
yields 8 a2 - 24 a. -
Substitute((3 m - 3)^2 - (m + 3)^2, m, 2)
yields -16.
- Substitute( <Expression>, <Substitution List> )
-
Replaces in expression every occurrence of the variables in the substitution list with the corresponding terms or values, and evaluates numerical substitutions.
Substitute(2x + 3y - z, {x = a, y = 2, z = b})
yields 2a - b + 6.