Subject: besselarray bug, was: Bessel plotting problem
From: Dieter Kaiser
Date: Tue, 10 Jun 2008 23:38:09 +0200
The algorithm to calculate the Bessel functions have been extended to negative
order and negative argument. The Lisp errors due to the use of the globals like
$besselarray are gone.
The CVS code gives the following result:
(%i3) bessel_y(1/6,-x^3/3),x=.001,numer;
(%o3) 37.78606197635184 %i - 65.37151917253044
So the best would be, as Robert pointed out, to use the new CVS code.
Dieter Kaiser
-----Urspr?ngliche Nachricht-----
Von: maxima-bounces at math.utexas.edu [mailto:maxima-bounces at math.utexas.edu] Im
Auftrag von Richard Hennessy
Gesendet: Dienstag, 10. Juni 2008 20:54
An: Robert Dodier
Cc: Maxima List
Betreff: Re: [Maxima] besselarray bug, was: Bessel plotting problem
I tried that and now I get a new error.
(%i90) bessel_y(1/6,-x^3/3), x=0.001, numer;
Maxima encountered a Lisp error:
Error in MACSYMA-TOP-LEVEL [or a callee]: ((MPLUS SIMP)
-0.11567268680596317
((MTIMES SIMP)
0.066783656865310195 $%I))
is not of type NUMBER.
Automatically continuing.
To reenable the Lisp debugger set *debugger-hook* to nil.
Now I have been looking into the theory of analytic continuations and that
motivated me to try the following.
(%i96) rectform(ev(at(taylor(bessel_j(1/6,x),x,-10.5,10), x= -10.7),float));
(%o96) -0.12022666498074*%i-0.22244081186441.
(%i97) rectform(ev(at(taylor(bessel_j(1/6,x),x,-10.5,12), x= -10.7),float));
(%o97) -0.12022666498074*%i-0.22244081186441
It is very slow, but I believe it is accurate, bessel_j(1/6,x) apparently is a
complex number for x < 0 and so apparently is bessel_y since there is a relation
between them. (I have been collecting identities for bessel functions).
It might be more interesting to plot the bessel_j function as a curve in the
complex plane for negative x using the taylor function. That will be slow but
it may be worth the wait.
Rich
------------Original Message------------
From: "Robert Dodier" <robert.dodier at gmail.com>
To: "Richard Hennessy" <rvh2007 at comcast.net>
Cc: "Maxima List" <maxima at math.utexas.edu>
Date: Mon, Jun-9-2008 9:54 PM
Subject: besselarray bug, was: Bessel plotting problem
On 6/7/08, Richard Hennessy <rvh2007 at comcast.net> wrote:
>
plot2d(-(%i/2+sqrt(3)/2)*%i*'(bessel_y(1/6,-x^3/3))+(bessel_j(1/6,-x^3/3))*sqrt(
x),[x,.001,2],[plot_format,gnuplot]),orthopoly_returns_intervals : false;
Richard, I suspect the origin of the plot problem is this:
bessel_y(1/6,-x^3/3), x=0.001, numer;
=> BESSEL-Y: symbol $BESSELARRAY has no value
Looking at src/bessel.lisp (line 486) in the 5.15.0 source code,
it looks like $BESSELARRAY is referenced before it is assigned
anything. But only if the second argument < 0. Can you use an
identity to change the bessel_y expression to something with
second argument > 0 ??
The $BESSELARRAY stuff was cut out entirely post-5.15.0.
So maybe you could try downloading the current version from CVS:
http://maxima.cvs.sourceforge.net/maxima/maxima/src/bessel.lisp
and load that into your Maxima session & try the plot again.
HTH
Robert Dodier
_______________________________________________
Maxima mailing list
Maxima at math.utexas.edu
http://www.math.utexas.edu/mailman/listinfo/maxima