Subject: complex function works only after defining it
From: Edwin Woollett
Date: Fri, 16 May 2008 11:37:48 -0700
Hi Christoph,
Stavros Macrakis wrote on Thu, 15 May 2008 18:28:05 -0400:
>I think you really should be operating on expressions rather than
>defining functions
> ....
>-- I'm not quite sure what you're trying to do but is it something like
>this?:
>
> er(f,args) := xreduce("+", makelist( abs(diff(f,a)) * del(a) , a,
> args) ) $
>
> er(f,[a,b,c])
> But keeping track of the arguments in the 'depends' system?
=====================================
Here is a simple example using an expression (rather than a Maxima
function):
(%i1) display2d:false$
(%i2) er(f,args) := xreduce("+", makelist( abs(diff(f,a)) * del(a) , a,
args) ) $
(%i3) f: (x^2 + y^2)/(%pi + z^2)$
(%i4) fargs : listofvars(f);
(%o4) [x,y,z]
(%i5) er(f,fargs);
(%o5) 2*(y^2+x^2)*abs(z)*del(z)/(z^2+%pi)^2
+2*abs(y)*del(y)/(z^2+%pi)+2*abs(x)*del(x)/(z^2+%pi)
=====================================
Ted Woollett