Maxima Function
lratsubst (L, expr)
is analogous to subst (L, expr)
except that it uses ratsubst instead of subst.
The first argument of
lratsubst is an equation or a list of equations identical in
format to that accepted by subst. The
substitutions are made in the order given by the list of equations,
that is, from left to right.
load ("lrats") loads fullratsubst and lratsubst.
Examples:
(%i1) load ("lrats")$
subst can carry out multiple substitutions.
lratsubst is analogous to subst.
(%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
If only one substitution is desired, then a single equation may be given as first argument.
(%i4) lratsubst (a^2 = b, a^3); (%o4) a b