6.59.4 List of variables of an algebraic expressions:
algvar
The
algvar
command finds the symbolic variable names in an expression, but orders them.
algvar
takes one argument:
expr
, an expression.
algvar(
expr
)
returns the list of the symbolic variable names used in
expr
, ordered by the algebraic extensions required to build
expr
.
Examples.
Input:
algvar(y+x*sqrt(z))
Output:
⎡
⎣
⎡
⎣
y
,
x
⎤
⎦
,
⎡
⎣
z
⎤
⎦
⎤
⎦
Input:
algvar(y*sqrt(x)*sqrt(z))
Output:
⎡
⎢
⎢
⎣
y
z
x
⎤
⎥
⎥
⎦
Input:
algvar(y*sqrt(x*z))
Output:
⎡
⎣
⎡
⎣
y
⎤
⎦
,
⎡
⎣
x
,
z
⎤
⎦
⎤
⎦
Input:
algvar(y+x*sqrt(z)+y*sin(x))
Output:
⎡
⎣
⎡
⎣
y
,
x
,sin
x
⎤
⎦
,
⎡
⎣
z
⎤
⎦
⎤
⎦