Maxima Function
freeof (x_1, ..., x_n, expr)
freeof (x_1, expr)
Returns true
if no subexpression of expr is equal to x_1
or if x_1 occurs only as a dummy variable in expr,
and returns false otherwise.
freeof (x_1, ..., x_n, expr)
is equivalent to freeof (x_1, expr) and ... and freeof (x_n, expr).
The arguments x_1, ..., x_n
may be names of functions and variables, subscripted names,
operators (enclosed in double quotes), or general expressions.
freeof evaluates its arguments.
freeof operates only on expr as it stands (after simplification and evaluation) and
does not attempt to determine if some equivalent expression would give a different result.
In particular, simplification may yield an equivalent but different expression which comprises
some different elements than the original form of expr.
A variable is a dummy variable in an expression if it has no binding outside of the expression.
Dummy variables recognized by freeof are
the index of a sum or product, the limit variable in limit,
the integration variable in the definite integral form of integrate,
the original variable in laplace,
formal variables in at expressions,
and arguments in lambda expressions.
Local variables in block are not recognized by freeof as dummy variables;
this is a bug.
The indefinite form of integrate is not free of its variable of integration.
Arguments are names of functions, variables, subscripted names, operators, and expressions.
freeof (a, b, expr) is equivalent to
freeof (a, expr) and freeof (b, expr).
(%i1) expr: z^3 * cos (a[1]) * b^(c+d); d + c 3 (%o1) cos(a ) b z 1 (%i2) freeof (z, expr); (%o2) false (%i3) freeof (cos, expr); (%o3) false (%i4) freeof (a[1], expr); (%o4) false (%i5) freeof (cos (a[1]), expr); (%o5) false (%i6) freeof (b^(c+d), expr); (%o6) false (%i7) freeof ("^", expr); (%o7) false (%i8) freeof (w, sin, a[2], sin (a[2]), b*(c+d), expr); (%o8) true
freeof evaluates its arguments.
(%i1) expr: (a+b)^5$ (%i2) c: a$ (%i3) freeof (c, expr); (%o3) false
freeof does not consider equivalent expressions.
Simplification may yield an equivalent but different expression.
An indefinite integral is not free of its variable of integration.
(%i1) freeof (i, 'sum (f(i), i, 0, n)); (%o1) true (%i2) freeof (x, 'integrate (x^2, x, 0, 1)); (%o2) true (%i3) freeof (x, 'integrate (x^2, x)); (%o3) false