Sponsored links: Algebra eBooks ### The Maxima on-line user's manual

Algebra Calculator

#### Search: #### Freeof

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>, or if <x_1> is neither the noun nor verb form of any operator 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) * 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, expr);
(%o4)                         false
(%i5) freeof (cos (a), expr);
(%o5)                         false
(%i6) freeof (b^(c+d), expr);
(%o6)                         false
(%i7) freeof ("^", expr);
(%o7)                         false
(%i8) freeof (w, sin, a, sin (a), 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.

```               (%i1) expr: (a+b)^5\$
(%i2) expand (expr);
5        4       2  3       3  2      4      5
(%o2)    b  + 5 a b  + 10 a  b  + 10 a  b  + 5 a  b + a
(%i3) freeof (a+b, %);
(%o3)                         true
(%i4) freeof (a+b, expr);
(%o4)                         false
(%i5) exp (x);
x
(%o5)                          %e
(%i6) freeof (exp, exp (x));
(%o6)                         true```

* A summation or definite integral is free of its dummy variable. 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```

There are also some inexact matches for `freeof`. Try `?? freeof` to see them.

```(%o1)                                true
(%i2) ```

### Related Examples

##### freeof-lambda-subset

subset ({x + y + z, x...

Calculate

##### freeof-lambda

f(a):=lambda([aa:bb],...

f(bb*x^2);

Calculate

##### freeof-lambda-subset

lst:{-10,-9,-8,-7,-6,...

subset ({x + y + z, x...

Calculate

##### freeof-lambda-sqrt-sublist

ll: [((-(sqrt(3)*%i)/...

sublist(ll,lambda([x]...

Calculate

##### freeof

freeof((a+1)>(a+2)...

Calculate

##### freeof-sqrt

freeof(((-(sqrt(3)*%i...

Calculate

##### freeof

freeof(a,(a+1)>(a+...

Calculate

##### freeof-lambda-subset

lst:{-10,-9,-8,-7,-6,...

subset ({x + y + z, x...

Calculate

##### freeof-lambda

f:lambda([aa],freeof(...

f(bb*x^2);

Calculate

##### freeof-lambda-subset

lst:{-10,-9,-8,-7,-6,...

subset ({x + y + z, x...

Calculate 