Ask Your Question

Revision history [back]

click to hide/show revision 1
initial version

Failure on symbolic solve

Trying to learn manipulation of symbolic expressions. However when I try this one I get a traceback. Is this a bug, limitation, or user error? x,y,z = var('x y z') assume(x>0) assume(y>0) assume(z>0) eqn = (x == y**z) solve(eqn, y)

Traceback (most recent call last): File "<stdin>", line 1, in <module> File "_sage_input_68.py", line 10, in <module> exec compile(u'open("___code___.py","w").write("# -- coding: utf-8 --\n" + _support_.preparse_worksheet_cell(base64.b64decode("eCx5LHogPSB2YXIoJ3ggeSB6JykKYXNzdW1lKHg+MCkKYXNzdW1lKHk+MCkKYXNzdW1lKHo+MCkKZXFuID0gKHggPT0geSoqeikKc29sdmUoZXFuLCB5KQ=="),globals())+"\n"); execfile(os.path.abspath("___code___.py")) File "", line 1, in <module>

File "/tmp/tmpgB4hFo/___code___.py", line 8, in <module> exec compile(u'solve(eqn, y) File "", line 1, in <module>

File "/home/sage/sage/local/lib/python2.6/site-packages/sage/symbolic/relation.py", line 619, in solve ans = f.solve(args,*kwds) File "expression.pyx", line 7518, in sage.symbolic.expression.Expression.solve (sage/symbolic/expression.cpp:27206) File "expression.pyx", line 7511, in sage.symbolic.expression.Expression.solve (sage/symbolic/expression.cpp:27084) File "/home/sage/sage/local/lib/python2.6/site-packages/sage/interfaces/expect.py", line 1474, in __call__ return self._obj.parent().function_call(self._name, [self._obj] + list(args), kwds) File "/home/sage/sage/local/lib/python2.6/site-packages/sage/interfaces/expect.py", line 1373, in function_call return self.new(s) File "/home/sage/sage/local/lib/python2.6/site-packages/sage/interfaces/expect.py", line 1154, in new return self(code) File "/home/sage/sage/local/lib/python2.6/site-packages/sage/interfaces/expect.py", line 1090, in __call__ return cls(self, x, name=name) File "/home/sage/sage/local/lib/python2.6/site-packages/sage/interfaces/expect.py", line 1517, in __init__ raise TypeError, x TypeError: Computation failed since Maxima requested additional constraints (try the command 'assume(>0)' before integral or limit evaluation, for example): Is z an integer?

click to hide/show revision 2
No.2 Revision

Failure on symbolic solve

Trying to learn manipulation of symbolic expressions. However when I try this one I get a traceback. Is this a bug, limitation, or user error? error?

x,y,z = var('x y z')
assume(x>0)
assume(y>0)
assume(z>0)
eqn = (x == y**z)
solve(eqn, y)

y) Traceback (most recent call last): File "<stdin>", line 1, in <module> File "_sage_input_68.py", line 10, in <module> exec compile(u'open("___code___.py","w").write("# -- -*- coding: utf-8 --\n" -*-\\n" + _support_.preparse_worksheet_cell(base64.b64decode("eCx5LHogPSB2YXIoJ3ggeSB6JykKYXNzdW1lKHg+MCkKYXNzdW1lKHk+MCkKYXNzdW1lKHo+MCkKZXFuID0gKHggPT0geSoqeikKc29sdmUoZXFuLCB5KQ=="),globals())+"\n"); _support_.preparse_worksheet_cell(base64.b64decode("eCx5LHogPSB2YXIoJ3ggeSB6JykKYXNzdW1lKHg+MCkKYXNzdW1lKHk+MCkKYXNzdW1lKHo+MCkKZXFuID0gKHggPT0geSoqeikKc29sdmUoZXFuLCB5KQ=="),globals())+"\\n"); execfile(os.path.abspath("___code___.py")) File "", line 1, in <module>

<module> File "/tmp/tmpgB4hFo/___code___.py", line 8, in <module> exec compile(u'solve(eqn, y) File "", line 1, in <module>

<module> File "/home/sage/sage/local/lib/python2.6/site-packages/sage/symbolic/relation.py", line 619, in solve ans = f.solve(args,*kwds) f.solve(*args,**kwds) File "expression.pyx", line 7518, in sage.symbolic.expression.Expression.solve (sage/symbolic/expression.cpp:27206) File "expression.pyx", line 7511, in sage.symbolic.expression.Expression.solve (sage/symbolic/expression.cpp:27084) File "/home/sage/sage/local/lib/python2.6/site-packages/sage/interfaces/expect.py", line 1474, in __call__ return self._obj.parent().function_call(self._name, [self._obj] + list(args), kwds) File "/home/sage/sage/local/lib/python2.6/site-packages/sage/interfaces/expect.py", line 1373, in function_call return self.new(s) File "/home/sage/sage/local/lib/python2.6/site-packages/sage/interfaces/expect.py", line 1154, in new return self(code) File "/home/sage/sage/local/lib/python2.6/site-packages/sage/interfaces/expect.py", line 1090, in __call__ return cls(self, x, name=name) File "/home/sage/sage/local/lib/python2.6/site-packages/sage/interfaces/expect.py", line 1517, in __init__ raise TypeError, x TypeError: Computation failed since Maxima requested additional constraints (try the command 'assume(>0)' before integral or limit evaluation, for example): Is z an integer?

integer?