#235 plot3d fails with bessel funcs

closed
Raymond Toy
Lisp Core (472)
5
2003-04-03
2003-02-24
M. L. Murphy
No

Hello, Maxima team. I'm a new user and am amazed with
what I'm able to accomplish in Maxima.

I'm having a little trouble. I'm trying to make a
bessel function plot, and it keeps failing. For instance:

(C1)
plot3d(bessel_j[0](x),[x,0,10],[y,0,2*%pi],['transform_xy,polar_to_xy]);

Error: ((MQAPPLY SIMP) (($BESSEL_J SIMP ARRAY) 0)
0.33333333333333331) is not of type (OR RATIONAL
LISP:FLOAT).
Fast links are on: do (si::use-fast-links nil) for
debugging
Error signalled by LISP:FLOAT.
Broken at LISP:FLOAT. Type :H for Help.

Nothing I do seems to allow the plot to complete,
including using BESSELEXPAND and making the order 1/2:

(C1) besselexpand:true;

(D1) TRUE
(C2)
plot3d(bessel_j[1/2](x),[x,0.0001,10],[y,0,2*%pi],['transform_xy,polar_to_xy]);

Error: ((MTIMES SIMP) 0.0099999999833333339 ((MEXPT
SIMP) 2 (# 1 2)) ...) is not of type (OR RATIONAL
LISP:FLOAT).
Fast links are on: do (si::use-fast-links nil) for
debugging
Error signalled by LISP:FLOAT.
Broken at LISP:FLOAT. Type :H for Help.

My maxima information:
-------------------------------------------------------------

Maxima version: 5.9.0
Maxima build date: 22:24 2/9/2003
host type: i386-redhat-linux-gnu
lisp-implementation-type: Kyoto Common Lisp
lisp-implementation-version: GCL-2-5.0

-------------------------------------------------------------

(I'm using the Redhat RPMs on Redhat 8.0.)

A bug fix would be great, but if it's not possible, I
really would like to get a workaround, as I'd like to
get a picture of the plot for a paper. If there is a
simple workaround, could you please let me know?

Discussion

  • Raymond Toy
    Raymond Toy
    2003-02-25

    • assigned_to: nobody --> rtoy
     
  • Raymond Toy
    Raymond Toy
    2003-02-25

    Logged In: YES
    user_id=28849

    Yes, this is a bug in bessel_j wherein it doesn't give a
    numerical answer even when the arg is a float.

    As a workaround, use j0(x) insetad of bessel_j[0](x).

    Or you can set numer:true before plotting, or use

    plot3d(bessel_j[0](x),[x,0,10],[y,0,2*%pi],['transform_xy,polar_to_xy]), numer;

     
  • M. L. Murphy
    M. L. Murphy
    2003-02-28

    Logged In: YES
    user_id=719178

    Thank you very much! Using numer:true; works great. The
    plots look very pretty.

    You can consider this bug closed as far as I'm concerned
    (but maybe you might want to keep it open at a lower
    priority, in case you might want to fix bessel_j in the
    future...). Thanks again.

     
  • Raymond Toy
    Raymond Toy
    2003-04-03

    • status: open --> closed