Nevermind--you're right it works fine now. The problem was that I had previously typed in assume(x-1>0). I'm not really sure why that would cause it to get the incorrect value for sqrt (abs(1-x^2)), but it did. In any case, it was my fault. I do notice one thing, though, which is that when I run integrate(integrate(x^2+y^2, y, -sqrt(abs(1-x^2)), sqrt(abs(1-x^2))), x,-1,1) I get asked: Is (x-1)*(x+1) zero or nonzero? But when I tell it the answer: sage: assumptions() [(x - 1)*(x + 1) < 0] I get the exact same error message. Telling it assume(x^2-1<0) Also produces the error. However, assume(1-x^2>0) gives the correct answer. I can understand why it's getting confused, but it's interesting.
On May 18, 4:10 pm, William Stein <[email protected]> wrote: > On Mon, May 18, 2009 at 3:48 PM, Alden <[email protected]> wrote: > > > When I enter: > > assume(1-x^2>0) > > and then: > > integrate( integrate(x^2+y^2, y, -sqrt(1-x^2), sqrt(1-x^2)), x,-1,1) > > I still get the error: > > ..... <lots of stuff>..... > > TypeError: Error executing code in Maxima > > CODE: > > sage191 : integrate(sage188,sage11,sage189,sage190)$ > > Maxima ERROR: > > > Defint: Lower limit of integration must be real. > > It works fine for me: > > wst...@sage:~$ sage > ---------------------------------------------------------------------- > | Sage Version 3.4.1, Release Date: 2009-04-21 | > | Type notebook() for the GUI, and license() for information. | > ---------------------------------------------------------------------- > sage: assume(1-x^2>0) > sage: var('y') > sage: sage: assume(1-x^2>0) > sage: sage: var('y') > y > sage: integrate( integrate(x^2+y^2, y, -sqrt(1-x^2), sqrt(1-x^2)), x,-1,1) > > pi/2 > > Can you try in a fresh session? > > William --~--~---------~--~----~------------~-------~--~----~ 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 URLs: http://www.sagemath.org -~----------~----~----~----~------~----~------~--~---
