Making the result of INTEGRATE into a function



> 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?
>


(%i1) f(x,y):=x+y;
(%o1)                          f(x, y) := x + y
(%i2) g(x,y):=''(integrate(integrate(f(x,y),x),y));
                                          2    2
                                       x y    x  y
(%o2)                       g(x, y) := ---- + ----
                                        2      2
(%i3) g(1,1);
(%o3)                                  1


NOTICE
This e-mail and any attachments are private and confidential and may contain privileged information. If you are not an authorised recipient, the copying or distribution of this e-mail and any attachments is prohibited and you must not read, print or act in reliance on this e-mail or attachments.
This notice should not be removed.