On 21 lis, 20:44, Jean-Marc Schlenker <[email protected]> wrote:
> Hello, I have a specific difficulty with integration in Sage. I have a
> fairly complicated expression in a number of variables, which is
> product of simple expressions. To simplify a little we can consider:
>
> sage: var('a,b,c,d,e,f,g,h')
> (a, b, c, d, e, f, g, h)
> sage: P=(a+b+c+d+e+f+g+h)^8
>
> Now I need to integrate with respect of some of the variables, say a
> in the previous example:
>
> sage: integral(P,a,0,1)
>
> The problem is that sage (presumably, maxima?) decides first to
> develop the whole expression before integrating. This takes forever.

Does Sage/Maxima/mathematica_free evaluate indefinite integral? If
yes, use Newton Leibniz theorem.

The problems is that Maxima performs some transformations on the
integral before evaluating. The anwer to your last command is rather
long, but is you use indefinite integral, you get perhaps better
answer

sage: I=integral(P,a);I(a=1)-I(a=0)
-1/9*(b + c + d + f + g + h + e)^9 + 1/9*(b + c + d + f + g + h + e +
1)^9

Does something like this work also in your original and more
complicated example?


Robert.


> Thanks!
>
>               Jean-Marc

-- 
To post to this group, send email to [email protected]
To unsubscribe from this group, send email to 
[email protected]
For more options, visit this group at 
http://groups.google.com/group/sage-support
URL: http://www.sagemath.org

Reply via email to