Hi,

The following code gives inconsistent results in Sage notebook:

##########################
reset()
sigma_1p, sigma_3, sigma_eqp = var('sigma_1p, sigma_3, sigma_eqp');
eqn3 = sigma_eqp == sqrt(sigma_1p**2 + sigma_3**2 - sigma_1p *
sigma_3);

assume(sigma_eqp > 0)
print eqn3.solve(sigma_1p, solution_dict=True)
##############################

I've tried it a few times now, and it seems like it works fine the
first time you run it.  But the subsequent executions gives the
following error message:
__________________________________________________________
Traceback (most recent call last):
  File "<stdin>", line 1, in <module>
  File "/home/sage/sagenb/sage_notebook/worksheets/hpon/17/code/2.py",
line 12, in <module>
    print eqn3.solve(sigma_1p, solution_dict=True)
  File "/home/sage/sage_install/sage-a/local/lib/python2.5/site-
packages/SQLAlchemy-0.4.6-py2.5.egg/", line 1, in <module>

  File "/home/sage/sage_install/sage-a/local/lib/python2.5/site-
packages/sage/calculus/equations.py", line 1129, in solve
    s = m.solve(x).str()
  File "/home/sage/sage_install/sage-a/local/lib/python2.5/site-
packages/sage/interfaces/expect.py", line 1334, in __call__
    return self._obj.parent().function_call(self._name, [self._obj] +
list(args), kwds)
  File "/home/sage/sage_install/sage-a/local/lib/python2.5/site-
packages/sage/interfaces/expect.py", line 1254, in function_call
    ['%s=%s'%(key,value.name()) for key, value in kwds.items()])))
  File "/home/sage/sage_install/sage-a/local/lib/python2.5/site-
packages/sage/interfaces/expect.py", line 1067, in new
    return self(code)
  File "/home/sage/sage_install/sage-a/local/lib/python2.5/site-
packages/sage/interfaces/expect.py", line 1002, in __call__
    return cls(self, x, name=name)
  File "/home/sage/sage_install/sage-a/local/lib/python2.5/site-
packages/sage/interfaces/expect.py", line 1377, in __init__
    raise TypeError, x
TypeError: Computation failed since Maxima requested additional
constraints (try the command 'assume(sigma_eqp>0)' before integral or
limit evaluation, for example):
Is  sigma_eqp  positive, negative, or zero?
_________________________________________________


What is wrong here?  How do I fix it?

Regards,
hpon


--~--~---------~--~----~------------~-------~--~----~
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
URLs: http://www.sagemath.org
-~----------~----~----~----~------~----~------~--~---

Reply via email to