fullratsimp SciMax Toolbox fullsetify

SciMax Toolbox >> fullratsubst

fullratsubst

Maxima Function

Calling Sequence

fullratsubst (a, b, c)

Description

is the same as ratsubst except that it calls itself recursively on its result until that result stops changing. This function is useful when the replacement expression and the replaced expression have one or more variables in common.

fullratsubst will also accept its arguments in the format of lratsubst. That is, the first argument may be a single substitution equation or a list of such equations, while the second argument is the expression being processed.

load ("lrats") loads fullratsubst and lratsubst.

Examples:

(%i1) load ("lrats")$
(%i2) subst ([a = b, c = d], a + c);
(%o2)                         d + b
(%i3) lratsubst ([a^2 = b, c^2 = d], (a + e)*c*(a + c));
(%o3)                (d + a c) e + a d + b c
(%i4) lratsubst (a^2 = b, a^3);
(%o4)                          a b
(%i5) ratsubst (b*a, a^2, a^3);
                               2
(%o5)                         a  b
(%i6) fullratsubst (b*a, a^2, a^3);
                                 2
(%o6)                         a b
(%i7) fullratsubst ([a^2 = b, b^2 = c, c^2 = a], a^3*b*c);
(%o7)                           b
(%i8) fullratsubst (a^2 = b*a, a^3);
                                 2
(%o8)                         a b
(%i9) errcatch (fullratsubst (b*a^2, a^2, a^3));
*** - Lisp stack overflow. RESET
fullratsimp SciMax Toolbox fullsetify