Dividing expressions in parts.



Try making substitutions for "+" and "*". Something like

RAv(e) := (e : subst("+" = lambda([[s]], xreduce(lambda([a,b], RAv(a) + RAv(b)),s)),e),
           e : subst("*" = lambda([[s]], xreduce(lambda([a,b], RAv(a) * RAv(b) + RCr(a,b)),s)),e),
           if mapatom(e) then funmake('RAv,[e]) else e);

might work.

Barton

-----maxima-bounces at math.utexas.edu wrote: -----


>Hello!?I?want?to?make?function?with?the?following?properties:
>
>RAv(expr1+expr2)?=?RAv(expr1)?+?RAv(expr2)
>RAv(expr1*expr2)?=?RAv(expr1)?*?RAv(expr2)?+?RCr(expr1,?expr2)