plotting and solving inequalities



Hello,

> That is a nice and useful interface to gnuplot, but i see that 
> you set the x range explicitly in your examples.
> I would like to enter the command 
>  
>  plot2d(x/(x^2-4));
> 
> to display a plot, say, in the xrange [-3,3] and yrange [-6,6]
> (that is in the range needed to get the main pattern of the function,
> where relative changes are over a threshold - the first derivative 
> could help to assess such range)
> and two vertical dotted lines at x=+2 x=-2.
> 

Well, this could be investigated, but I don't know if there exists a
general acceptable solution; for example, what should be the main
pattern for periodic functions?


> How it that possible using draw2d?
> 

Both in draw2d and in plot2d you must explicitly set the range for x.


> I have loaded your  draw.lisp  in maxima (version 5.10) but it fails o
> execute your example command (see below).
> Probably i should upgrade my maxima program
> 
> thank you for you help
> 
> --
> Pol
> 
> ---- enc
> 
> (%i8) draw2d(explicit(u^2,u,-3,3))$
> 
>   Maxima encountered a Lisp error:
> 
>    Error in COND [or a callee]: The function CHECK-GNUPLOT-PROCESS is
> undefined.
> 
>    Automatically continuing.
>    To reenable the Lisp debugger set *debugger-hook* to nil.

Oh sorry, the draw package needs the piping functions not present in
5.10; they are now in the repository version.

You have three options:


a) after loading package draw, set global variable draw_pipes to false
(draw_pipes:false;) before calling draw2d.


b) forget the draw package and make your plots with plot2d; in this
case, you can play with something like the following:

plot2d([x/(x^2-4),
        [parametric, 2, t, [t,-5,5]],
        [parametric, -2, t, [t,-5,5]]],[x,-5,5],
       [gnuplot_curve_styles,
           ["with lines",
            "with lines lt 0",
            "with lines lt 0"]],
       [gnuplot_preamble,
          "set yrange [-5:5];set zeroaxis xy"] )$


c) If you don't have anything better to do this weekend, try to compile
cvs maxima.


Molta sorte!

-- 
Mario Rodriguez Riotorto
www.biomates.net