Next: Rational Expression, Previous: Algebraic Operators, Up: Algebra [Contents][Index]
Here eqn_i is an equation for i = 1 … n and where
var_j is a variable for j = 1 … m.
eliminate
returns a list of equations obtained by eliminating the
variables var_1, …, var_m from the equations
eqn_1, …, eqn_n.
e39 : eliminate([x^2+y=0,x^3+y=0],[x]); 2 e39: 0 = - y - y e40 : eliminate([x+y+z=3,x^2+y^2+z^2=3,x^3+y^3+z^3=3],[x,y]); e40: 0 = 1 - z
The equation eqn must contain an occurrence of variable var.
suchthat
returns an expression for all complex values of
var satisfying eqn. suchthat
is useful for
extracting an expression from an equation.
e0 : a*x+b*y+c = 0; e0: 0 = c + a x + b y e1 : suchthat(x, e0); - c - b y e1: --------- a
If an expression rather than an equation is given to suchthat
, it
is as though the equation exp=0
was given.
e2 : suchthat(x, e0); - c - b y e2: --------- a
An alternative infix notation is also available for suchthat
.
When used in combination with the ‘{ }’ notation for or
,
the set notation used by some textbooks results.
If var in eqn has multiple roots, a named
field extension will be introduced to represent any one of those
roots. When multiple values are returned, the result (in disp2d
and standard
grammars) is wrapped with ‘{ }’.
e3 : x | a*x^2 + b*x + c; 2 ext3: {:@ | 0 = c + b :@ + a :@ } e3: ext3 e4 : e3 ^ 2; - c - b ext3 e4: ------------ a
Returns the rule defining named field extension extsym.
e5 : extrule(ext3); 2 e5: 0 = c + b ext3 + a ext3
The function or
takes as inputs one or more equations or
values. If the inputs are equations, then or
returns an equation
which is equivalent to the assertion that at least one of the input
equations holds. If the inputs to or
are values instead of two
equations, then the function or
returns a multiple value. If the
inputs to or
consist of both equations and values, then or
will return the multiple values.
e1 : or(x=2,y=3); e1: 0 = -6 + 3 x + (2 - x) y e2 : or(2,3); 2 e2: {:@ | 0 = -6 + 5 :@ - :@ } e3 : e2^2; 2 e3: {:@ | 0 = -36 + 13 :@ - :@ } e4 : or(x=2,17); e4: 17
‘{eqn, … }’ can be used as an alternate syntax for
or
:
e5 : {+1, -1}; 2 e5: {:@ | 0 = -1 + :@ }
Next: Rational Expression, Previous: Algebraic Operators, Up: Algebra [Contents][Index]