Re: Re: [Maxima] Making the result of INTEGRATE into a function
Subject: Re: Re: [Maxima] Making the result of INTEGRATE into a function
From: go_furuya at infoseek
Date: Sat, 13 Aug 2005 14:36:31 +0900
Hi dan
This is an example.
(%i2) F(f,x,y):=block([s],s:''integrate(integrate(f(t,u),t),u),ev(s,[t:x,u:y]));
(%i53) ff(x,y):=sin(x)*sin(y)$
(%i54) F(ff,1,2);
(%o54) COS(1)*COS(2)
(%i55) F(ff,x,y);
(%o55) COS(x)*COS(y)
(%i56) F('lambda([x,y],x+y),x,y);
(%o56) x*y^2/2+x^2*y/2
(%i57) F('lambda([x,y],x+y),1,2);
(%o57) 3
I think it is not so bad.
gosei furuya
> I had tried something like this, only I did not know
> you needed to enclose the expression on the right in
> parentheses.
>
> F(x,y) := ''integrate(integrate(f(x,y),x),y);(%o5)
> F(x,y):=INTEGRATE(INTEGRATE(f(x,y),x),y)(%i6)
> F(1,1);Attempt to integrate wrt a number: 1#0:
> F(x=1,y=1) -- an error. Quitting. To debug this try
> DEBUGMODE(TRUE);
>
> Now that I look at the reference manual again, I see
> that there is a difference:
>
> ''(F(X)) means evaluate the expression F(X) an extra
> time. ''F(X) means return the verb form of F applied
> to [X].
>
> Although I must confess I have no idea what "return
> the verb for of F applied to [X]" means. As near as I
> can tell, the following two commands return the same
> result:
>
> F(x,y) := ''integrate(integrate(f(x,y),x),y);
>
> F(x,y) := integrate(integrate(f(x,y),x),y);
>
> Maybe someone could explain the difference in detail
> in a newbie manual. :-)
>
> Thank you, David and Robert.
>
> Dan
>
>
>
> ____________________________________________________
> Start your day with Yahoo! - make it your home page
> http://www.yahoo.com/r/hs
>
>
> _______________________________________________
> Maxima mailing list
> Maxima@www.math.utexas.edu
> http://www.math.utexas.edu/mailman/listinfo/maxima
>