> But, after a "reset()" command, it does not work anymore.

Confirmed.  Well, that ain't proper.

Could you try "reset(); forget();" instead of "reset()"?  Right now
assumptions survive a reset in a broken state (try assumptions()
before and after the reset and you'll see them still listed even if
the variable isn't defined any longer) and I wonder if that's causing
problems.  I have a positively-reviewed patch --
http://trac.sagemath.org/sage_trac/ticket/10855 -- pending for 4.7
which fixes this.  I think there are other ways to get the maxima
interface into an unhappy state, but this works too.

----------------------------------------------------------------------
| Sage Version 4.6.1, Release Date: 2011-01-11                       |
| Type notebook() for the GUI, and license() for information.        |
----------------------------------------------------------------------

sage: var("x y z")
(x, y, z)
sage: assume(z+16>0, z<0)
sage: integrate(integrate(1/16,y,-2,(z+2*x+4)/(x+2)),x,(-z-8)/4,2)
-1/16*z*log(-1/4*z) + 1/16*z*log(4) + 1/16*z + 1

sage: reset()
sage: z
[...]
NameError: name 'z' is not defined
sage: assumptions()
[z + 16 > 0, z < 0]   # <- bug!, should be []

sage: var("x y z")
(x, y, z)
sage: assume(z+16>0, z<0)
sage: integrate(integrate(1/16,y,-2,(z+2*x+4)/(x+2)),x,(-z-8)/4,2)
ERROR: An unexpected error occurred while tokenizing input
[...]
TypeError: Computation failed since Maxima requested additional
constraints (try the command 'assume(z+16>0)' before integral or limit
evaluation, for example):
Is  z+16  positive, negative, or zero?

sage: forget()
sage: assume(z+16>0, z<0)
sage: integrate(integrate(1/16,y,-2,(z+2*x+4)/(x+2)),x,(-z-8)/4,2)
-1/16*z*log(-1/4*z) + 1/16*z*log(4) + 1/16*z + 1


Doug

--
Department of Earth Sciences
University of Hong Kong

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

Reply via email to