Maxima problem with ASSUME_POS:TRUE;



"Antonio Amorim"  wrote


> 
> Anyhow when I include integrate(x*log(x),x,a,b); the system stil asks me
> is a-b is positive, which in the web case just means that the server is
> left to timeout.
Such integrals are normally read under the implicit assumption  a < b.
The best advice for students is certainly to tell them to make
their assumptions explicit - that is an essential part of doing maths.

> Is there a better way of forcing maxima not to ask interactiva questions?
The best way to achieve that is to always use explicit assumptions.
For the example the assumption is:  assume(a < b);

For your server you can try something like this:

defIntegrate(fn, var, ll, ul) :=
  block( [res],
        newContext(integrationContext),
        if not constantp(ll) or not constantp(ul)
           then assume(ll < ul),
        res: integrate(fn, var, ll, ul),
        killContext(integrationContext),
        res
       );

Here you introduce a new context that keeps the needed
assumption only for the integration. Note that you do not
introduce an assumption when both the lower and the upper
integration limit are constants (hence the condition).
I think this is a reliable solution, provided that definite integration
is always done with this function:

Comments are of course welcome.
Greetings, Boris