TypeError: 'tuple' object is not callable on notebook but not on terminal
Code :
x=var('x')
y=function('y')(x)
k= var('k')
assume(k>0)
harmonic2 = diff(y,x,2)+k*y == 0
desolve(harmonic2, y, ivar = x)
Error :
TypeError Traceback (most recent call last) <ipython-input-54-ef4195c42a80> in <module>
4 assume(k>Integer(0))
5 harmonic2 = diff(y,x,Integer(2))+k*y == Integer(0)
----> 6 desolve(harmonic2, y, ivar = x)
TypeError: 'tuple' object is not callable
Why does this happen when i tried it in notebook but when i tried it in notepad but it ran fine on the terminal
I do not see the problem. I get this answer both in a terminal and in a Jupyter notebook:
@math1styearstudent -- by any chance was
desolve
redefined in the notebook?Does the problem persist after
reset('desolve')
?I cannot reproduce the problem either. The code works well both in the notebook and the terminal.
@math1styearstudent -- what OS? what version of Sage? How was it installed?
In my case it's Sage 9.2 with Python 3.8.5 in Ubuntu 20.04.