Names of Bessel functions (Re: half integer bessel)
Subject: Names of Bessel functions (Re: half integer bessel)
From: Richard Fateman
Date: Tue, 13 May 2003 15:09:05 -0700
There is an asymmetry in the "meanings" of the arguments in [] and ()
in Macsyma. I'm not sure what to make of it but here's the gist of it.
f[3](4) means there are a bunch of functions, maybe f[1], f[2], f[1/2],
f[z+pi]....
You are interested in the function f[3]. In particular, you want to evaluate
it at the point 4. I think that thre is a possibility that if
you compute f[0.1](4), f[0.2](4) ....
you would end up with a hash table of functions f[0.1],.... etc, living
indefinitely.
It might be possible to flush this in some way, but the mechanism is kind of
different. It is not the same as "curried" functions because of the
hashing.
If you want functions to provide numbers, the usual route is notationally
wasteful, with specific functions for Bessel functions of integer order and
real argument. Then other functions for non-integer and/or complex
order and
argument would have different program names.
One piece of guidance in this is to return the favor of Mathematica, which
did so much copying from other systems, including Macsyma, and use the
same notation as in Mathematica. BesselJ[n,x] which in Macsyma syntax
actually would be BesselJ(n,x) since Mathematica uses [] for enclosing
"function" arguments.
RJF
Raymond Toy wrote:
>>>>>>"Barton" == Barton Willis <willisb@unk.edu> writes:
>>>>>
>
> Barton> My Macsyma (422) supports bessel_j(order, arg), bessel_j[order](arg),
> Barton> and bessel(arg,order). Weird. For Bessel functions of the second kind,
> Barton> Macsyma only supports bessel_y[order](arg). Maxima supports
> Barton> bessel_j(arg, order), bessel_j[order](arg), and bessel(arg,order).
>
> Barton> (a) I generally expect the "main" argument to be the last. The
> Barton> Macsyma bessel_j function worked this way. How much trouble would
> Barton> it cause to switch uniformly to (order, arg)?
>
> Not hard, I would think.
>
> Barton> (b) I think we should dump support for the functions i0, i1, in,
> Barton> j0, j1, jn, and bessel. How smart is it to have a function named in?
>
> Agreed. Need to decide what to do about %j, %y, and friends. These
> are used in other places, unlike j0, j1, and friends. I think I just
> left j0, etc., for backward compatibility. For 6.0, I think we could
> remove these.
>
> Ray
> _______________________________________________
> Maxima mailing list
> Maxima@www.math.utexas.edu
> http://www.math.utexas.edu/mailman/listinfo/maxima