Last May Barton Willis posted some code to crunch linear combinations of
Bessel functions.
http://www.math.utexas.edu/pipermail/maxima/2006/001287.html
I have finally got around to trying it. I want check Bessel function
solutions of ODEs. It doesn't work for me with maxima-5.11.0. I have
tried to debug it, but have failed so far. I will continue my attempts
but am open to suggestions.
The code under discussion is:
load("opsubst");
bessel_reduce_order : bessel_j = lambda([n,x], (2 * n -1) * bessel_j(n-1,x)
/ x - bessel_j(n-2,x));
besselcrunch(e) := block([ords, minord, maxord, prd, n : ?gensym()],
e : expand(e),
ords : map('first, gatherargs(e,bessel_j)),
minord : lmin(ords),
maxord : lmax(ords),
if maxord - minord < 2 then e else (
prd : buildq([n,minord], lambda([n,x], n >= minord + 2)),
besselcrunch(opsubstif(bessel_reduce_order, prd, e))));
When I run the first example:
(%i4) besselcrunch((-(1+2*n)*bessel_j(n,x))/x+bessel_j(1+n,x)+bessel_j(n-1,x));
Maxima encountered a Lisp error:
Expected a maxima function designator but got NIL.
Automatically continuing.
To reenable the Lisp debugger set *debugger-hook* to nil.
NOTICE
This e-mail and any attachments are private and confidential and may contain privileged information. If you are not an authorised recipient, the copying or distribution of this e-mail and any attachments is prohibited and you must not read, print or act in reliance on this e-mail or attachments.
This notice should not be removed.