Bessel plotting problem



Richard Hennessy escribi?:
> I have an expression involving 2 bessel functions and no matter what I do I cannot get it to plot the expression.  The bessel_y and the bessel_j functions are both in the expression and so is %i so I just want the realpart.  
> 
> I have tried this.
> 
> set_plot_option([plot_realpart,true]);
> 
> 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;
> 
> 
> and I have tried this
> 
> 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;
> 
> and this
> 
> 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;
> 
> Does anyone know what I am not doing right?  Non of the above work, I get no plot window.
> 

This workaround should work:

f(x):=
   block([numer: true],
     expand(
        -(%i/2+sqrt(3)/2)*%i*bessel_y(1/6,-x^3/3) +
         (bessel_j(1/6,-x^3/3))*sqrt(x)) )$

draw2d(explicit(f(x),x,0.001,2));


or plot2d, if you prefere.


-- 
Mario Rodriguez Riotorto
http://www.telefonica.net/web2/biomates