On 9/1/07, Nikos Apostolakis <[EMAIL PROTECTED]> wrote: > Is x positive or negative? > In [100]: assume(x < 0) > In [101]: limit(sqrt(x^2 + x +1) + x, x = -oo) > --------------------------------------------------------------------------- > <type 'exceptions.TypeError'> Traceback (most recent call last) > > /home/nea/<ipython console> in <module>() > > [...] (snip exactly the same stuff as before) > > <type 'exceptions.TypeError'>: Computation failed since Maxima requested > additional constraints (use assume): > Is x positive or negative? > In [102]: sqrt(x^2) > Out[102]: -x > In [103]: forget() > In [104]: sqrt(x^2) > Out[104]: abs(x) > > So it seems that the (redundant anyway) assumption that x < 0 is in > place, but it is not passed to the limit calculation. For > comparison the same limit with maxima: > > (%i22) limit(sqrt(x^2 + x +1) + x, x, minf); > Is x positive or negative? > > pos; > 1 > (%o22) - - > 2 > (%i23) limit(sqrt(x^2 + x +1) + x, x, minf); > Is x positive or negative?
When you type "assume"... in SAGE, it passes that on to Maxima (by simply typing assume into maxima). For some reason -- a bug in Maxima, I think -- Maxima is completely ignoring assumptions in its limit command in the above example. It will only work by answering the question interactively. SAGE doesn't do that -- it only passes assumptions on to Maxima via assume. The interactive nature of Maxima for computing limits, etc., is a design flaw from the point of view of using Maxima from any external program (this comes up regularly on the Maxima mailing list). I encourage you to post a bug report to the maxima people, since I think it is a bug that limit is ignoring assume(x > 0) - William --~--~---------~--~----~------------~-------~--~----~ To post to this group, send email to sage-support@googlegroups.com 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://sage.math.washington.edu/sage/ and http://sage.scipy.org/sage/ -~----------~----~----~----~------~----~------~--~---