All right, still with these integration problems, and I don't know all the subtleties of passing extra-arguments to Maxima (ok, I reckon that @kcrisman doesn't stop pointing out Maxima flags now and then when some expert uses them but some list would be very handy). What I want is to integrate a function with the domain of integration broken into pieces. The problem is that the maxima engine requires different assumptions for each piece but an assumption seems to tie a variable globally.
This is what I tried to get around these shortcomings and to answer the above question: Different problems arise: 1- If the integral call breaks (and this often occurs), the old_assumptions are not restored .. ok, this one should be easy and dealt with some exception handling but I don't know the Sage coding guideline here. 2- One To be clear, I'm not against global assumptions but I just want some way to enforce extra assumptions locally. 3- Another bonus feature would have been the possibility of attaching a set of assumptions to an expression/function/whatnot. In fact I started with: If I instead ask with |

Yes, this is because you didn't include a try/except clause in your code. Luckily, this is pretty easy to do; you could put it around and that would work pretty well. The second issue is also present in Maxima.
As for the rest, such local assumptions are called By the way, if you are almost always using only functionality from Maxima, it wouldn't be the worst idea to see if just using Maxima is better for you, or using the |

Asked: **Feb 12 '12**

Seen: **157 times**

Last updated: **Feb 14 '12**

powered by ASKBOT version 0.7.22

Copyright Sage, 2010. Some rights reserved under creative commons license.

Can you give an example of this? I also have a lot of trouble figuring out how to pass the right flags to Maxima. Do you mean something like

kcrisman (Feb 13 '12)`\int_{[0,1]\cup [2,3]}f(x)dx`

? It's true that the way we do assumptions makes them global-ish.See the updated question. Yeah, it's along the same lines as your example and the problem is that Maxima may need different sets of assumptions for each part of the domain.

Green diod (Feb 13 '12)