Hi,

I am having issues with creating first and second ordered derivatives
for a function that includes bessel functions.

Psi = lambda r,z: (r*bessel_J(1, g*r))/(ro*bessel_J(1, gro))*cos(k*z)

I tried using derivative(Psi, r)

this is the error I get:

ERROR: An unexpected error occurred while tokenizing input
The following traceback may be corrupted or invalid
The error message is: ('EOF in multi-line statement', (949, 0))

---------------------------------------------------------------------------
TypeError Traceback (most recent call last)

/home/nooniensoong97/<ipython console> in <module>()

/home/nooniensoong97/programs/sage-4.7.2/local/lib/python2.6/site-
packages/sage/calculus/functional.pyc in derivative(f, *args, **kwds)
132 pass
133 if not isinstance(f, Expression):
--> 134 f = SR(f)
135 return f.derivative(*args, **kwds)
136

/home/nooniensoong97/programs/sage-4.7.2/local/lib/python2.6/site-
packages/sage/structure/parent.so in
sage.structure.parent.Parent.__call__ (sage/structure/parent.c:7326)()

/home/nooniensoong97/programs/sage-4.7.2/local/lib/python2.6/site-
packages/sage/structure/coerce_maps.so in
sage.structure.coerce_maps.DefaultConvertMap_unique._call_ (sage/
structure/coerce_maps.c:3268)()

/home/nooniensoong97/programs/sage-4.7.2/local/lib/python2.6/site-
packages/sage/structure/coerce_maps.so in
sage.structure.coerce_maps.DefaultConvertMap_unique._call_ (sage/
structure/coerce_maps.c:3171)()

/home/nooniensoong97/programs/sage-4.7.2/local/lib/python2.6/site-
packages/sage/symbolic/ring.so in
sage.symbolic.ring.SymbolicRing._element_constructor_ (sage/symbolic/
ring.cpp:4418)()

TypeError:

I think it has to do with the lambda function causing this issue.

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

Reply via email to