On Dec 13, 2007 11:08 AM, pgdoyle <[EMAIL PROTECTED]> wrote: > > Let me simplify the question. > > Is there a better way to get Mathematica to go off and compute a > Bessel function for me than this: > > def math_bessel_K(nu,x): > m=mathematica('N[BesselK['+str(mathematica(nu)) > +','+str(mathematica(x))+'],20]') > return m.sage()
Yes there is, and you might even find this impressive: def math_bessel_K(nu,x): return mathematica(nu).BesselK(x).N(20).sage() Use it: sage: math_bessel_K(2,I) 0.180489972066962*I - 2.592886175491197 --~--~---------~--~----~------------~-------~--~----~ To post to this group, send email to sage-support@googlegroups.com To unsubscribe from this group, send email to [EMAIL PROTECTED] For more options, visit this group at http://groups.google.com/group/sage-support URLs: http://sage.math.washington.edu/sage/ and http://sage.scipy.org/sage/ -~----------~----~----~----~------~----~------~--~---