Maxima Function
delete (expr_1, expr_2)
delete(expr_1,expr_2,n)
Removes all occurrences of expr_1 from expr_2. expr_1 may be a term of expr_2 (if it is a sum) or a factor of expr_2 (if it is a product).
delete(expr_1, expr_2, n)
removes the first n occurrences of
expr_1 from expr_2. If there are fewer than n
occurrences of expr_1 in expr_2 then all occurrences will be deleted.
(%i1) delete(a, f(a,b,c,d,a)); (%o1) f(b, c, d) (%i2) delete(a, f(a,b,a,c,d,a), 2); (%o2) f(b, c, d, a)