spherical_bessel_J() argument

2 views
Skip to first unread message

Robert Close

unread,
Jan 29, 2009, 2:51:39 PM1/29/09
to sage-support
I'm trying to do some symbolic calculus and am having trouble with the special function spherical_bessel_J(). I can't get it to work when the argument contains two factors.
Here is a simple program:
k=var('k');
k=maxima(k);
rho=var('rho');
rho=maxima(rho);
arg=var('arg');
arg=maxima(arg);
arg=k*rho;
f=cos(arg);
print f;
f=spherical_bessel_J(1,rho);
print f;
f=spherical_bessel_J(1,arg);
print f;

The first two print statements are fine:

          cos(k rho)

sin(rho)
-------- - cos(rho)
rho
-------------------
rho

But the program hangs and never reaches the third print statement. What is wrong?
-Robert
robert...@classicalmatter.org

Robert Bradshaw

unread,
Feb 17, 2009, 10:29:16 PM2/17/09
to sage-s...@googlegroups.com

I'm not sure, looks like some pexpect issue. However, this works fine:

sage: arg = var('arg')
sage: f = spherical_bessel_J(1,var('arg')); f
(sin(arg)/arg - cos(arg))/arg
sage: print f

sin(arg)
-------- - cos(arg)
arg
-------------------
arg


Reply all
Reply to author
Forward
0 new messages