Bessel plotting problem



I am going to take my conclusion back.  Just because Maxima gives an error message while plotting does not mean the function is only defined for positive x.  

Learn, live.

R 




 ------------Original Message------------
From: "Richard Hennessy"<rvh2007 at comcast.net>
To: fateman at cs.berkeley.edu
Date: Sat, Jun-7-2008 11:03 AM
Subject: RE: [Maxima] Bessel plotting problem

I think I made a mistake.  What I wanted to plot was the real valued function (f+g+conjugate(f+g))/2 where f and g are linearly independent (complex) solutions to my differential eq.  I tried using realpart() but that did not work.  I should have tried the following.

plot2d(-(sqrt(3)/2-%i/2)*%i*'(bessel_y(1/6,-x^3/3))+'(bessel_j(1/6,-x^3/3))*sqrt(x),[x,-20,.001], plot_format,gnuplot]), orthopoly_returns_intervals : false;

That worked.  

The domain of the bessel_j or bessel_y function must be positive x only since when I try 

plot2d(-(sqrt(3)/2-%i/2)*%i*'(bessel_y(1/6,-x^3/3))+'(bessel_j(1/6,-x^3/3))*sqrt(x),[x,-15,15],[plot_format,gnuplot]), orthopoly_returns_intervals : false;

I get
-->

 ***MESSAGE FROM ROUTINE DBESY IN LIBRARY SLATEC. ***POTENTIALLY RECOVERABLE ERROR, PROG ABORTED, TRACEBACK REQUESTED *  X LESS THAN OR EQUAL TO ZERO *  ERROR NUMBER = 2 *    ***END OF MESSAGE  ***JOB ABORT DUE TO UNRECOVERED ERROR.0          ERROR MESSAGE SUMMARY LIBRARY    SUBROUTINE MESSAGE START             NERR     LEVEL     COUNT SLATEC     DBESY      X LESS THAN OR EQUAL         2         1         1 


When x is positive, the plot shows only the second and third quadrants with actual points.  I think the first a fourth are not in the domain since I get this ugly error message when it is done.

I would call this a bug, I am not sure if it is.  Is there a reason for the restriction x > 0?


Rich



 ------------Original Message------------
From: "Richard Fateman" <fateman at cs.berkeley.edu>
To: "'Richard Hennessy'" <rvh2007 at comcast.net>
Date: Sat, Jun-7-2008 10:11 AM
Subject: RE: [Maxima] Bessel plotting problem

I haven't tried it, but how about removing the '  and
doing plot2d(  realpart( ....)..)

or plot2d ('(realpart( ...) ..))..
RJF