Ask Your Question

Revision history [back]

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