Definite integrals and asksign



>>>>> "Neilen" == Neilen Marais <nmarais at sun.ac.za> writes:

    Neilen> Hi Ray
    Neilen> On Fri, 08 Dec 2006 09:01:07 -0500, Raymond Toy wrote:

    >>>>>>> "Neilen" == Neilen Marais <nmarais at sun.ac.za> writes:
 
    Neilen> If I succesively take indefinite integrals and manually substitute the bounds I
    Neilen> get the same answer, without any asksign questions (I omitted some of the
    Neilen> intermediate results to save space):
    >> 
    Neilen> (%i34) integrate(tmpp, x3);
    Neilen> (%o34) (x2/2+x1/2)*sin((%pi*x2)/2+(%pi*x1)/2-%pi/4)*x3(%i35) ev(%, x3:1-x2-x1)
    Neilen> - ev(%,x3:0);
    >> 
    >> I did not investigate the exact reason for why you asked for the sign
    >> of various things, but you should note that definite integrals are
    >> often transformed to different forms to evaluate it.  That is,
    >> definite integration does not necessarily find the indefinite integral
    >> and substitute in the limits, which is what you are doing here by
    >> hand.  If you do integrate(tmpp, x3, 0, 1-x1-x2), you will be asked
    >> for the sign of x1+x2-1.

    Neilen> Fair enough, I guess my real question is then, would I be making a mathematical
    Neilen> mistake by substituting the limits without knowing the sign of x1+x2-1? 

In this particular case, I don't think so.  There's nothing special
about the integrand that knowing the sign would change.

    >> If I do this:
    >> 
    >> assume(x1>0, x2 > 0, x3 > 0, x1 < 1, 1-x1-x2> 0);
    >> 
    >> the triple integral only asks for the sign of cos(%pi*x1/2) and
    >> sin(%pi*x1/2).  I guess that's a deficiency in maxima that it doesn't
    >> know the sign of those.

    Neilen> Would I be correct in guessing that Maxima would have been able to figure out
    Neilen> what you passed in the assume() above if it had a built in multiple integral
    Neilen> routine that could consider all the integral limits simultaneously? 

I think that would be a simple matter of programming. :-)  Someone
would have to modify the definite integration routines to inform
maxima about the range of the variables.  I think it would be fairly
difficult for maxima to figure out that 1 - x1 - x2 > 0.

Ray