Dividing expressions in parts.
- Subject: Dividing expressions in parts.
- From: Barton Willis
- Date: Sun, 23 May 2010 12:54:16 -0500
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)