Subject: Making the result of INTEGRATE into a function
From: Daniel Lyddy
Date: Wed, 10 Aug 2005 21:14:07 -0700 (PDT)
Hello all:
I have tried to post this question three times using
the GMANE interface, and all three times, it has
bounced back to me as an undeliverable message.
I am relatively new to Maxima, and I am trying to use
it to generate cumulative distribution functions from
their underlying probability distribution functions.
Here is what I tried:
(%i22) f(x,y) := x + y;
(%o22) f(x,y):=x+y
(%i23) F(x, y) := integrate(integrate(f(x, y), x), y);
(%o23) F(x,y):=INTEGRATE(INTEGRATE(f(x,y),x),y)
(%i24) F(x,y);
(%o24) (x*y^2)/2+(x^2*y)/2
(%i25) 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);
I see what it's doing, but that definitely is not what
I expected. I expected F(1,1) to evaluate to 1 here.
Is there a way to force evaluation of the nested
integration commands so that F(x,y) is defined as the
function "(x*y^2)/2+(x^2*y)/2" as soon as line
(%i23) line is entered above?
I've checked the documentation for the assignment
operators, FUNCTION definition, and INTEGRATE, and
none of them explain how to do this (or even state if
it's possible).
Thanks,
Dan
____________________________________________________
Start your day with Yahoo! - make it your home page
http://www.yahoo.com/r/hs