DISCONTINUITIES IN A CURVE



Bernard LUCE <bluce at wanadoo.fr> writes:

> Before all, many thanks for your collective prompt-and-deep investigations.
>
> As far as I understand, you discard the discontinuities in the curve
> by avoiding the undefined value -2 and +1 and drawing on intervals
> [t,-20,-2.1] ,[t,-1.9,0.9],[t,1.1,20].

Just to make sure you're not confused: The scribbly lines that appeared
all over your original plot were not quite because of points where the
function isn't defined. You can get the same behaviour with a
(non-parametric) plot of, say,

  f(x) = 1/(x-1)

over [0, 2.1]. The problem here is that at a point slightly less than 1,
f(x) is a large negative number. Assuming that the plotting program
doesn't try to evaluate f at 1 (which I avoid by giving a weird
endpoint), the next point is large and positive. The result is a
whopping great almost vertical line at 1.

Your example was a more complicated instance of the same problem. The
suggestions other people gave were based on splitting the domain of your
function up into intervals upon which it is continuous. Then gnuplot's
behaviour of putting a line segment between each pair of points is the
right thing and everything looks nice.

What I *don't* know is whether it's possible to do this automatically. I
can see that one could split things up for rational functions by
computing the denominator and using allroots(), but I suppose that isn't
really generic enough for someone to have been interested to write it.

Rupert
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 315 bytes
Desc: not available
URL: <http://www.math.utexas.edu/pipermail/maxima/attachments/20121101/fddebe40/attachment.pgp>;