MathGroup Archive 2003

[Date Index] [Thread Index] [Author Index]

Search the Archive

Re: Asymptote strangeness...

  • To: mathgroup at smc.vnet.net
  • Subject: [mg38892] Re: Asymptote strangeness...
  • From: Bill Rowe <bjrowe at earthlink.net>
  • Date: Fri, 17 Jan 2003 05:39:23 -0500 (EST)
  • Sender: owner-wri-mathgroup at wolfram.com

On 1/15/03 at 2:21 AM, mike at miscanthus.net (Mike Summers) wrote:

>It seems to me that this:

>f[x] = (x + 2)/(Abs[x] - 2)

>should have asymptotes at 2 & -2.

>Plot[Evaluate[f[x]], {x, -5, 5}] only shows the asymptote at 2.

>Suggestions?

The basic problem is the function above is constant for negative values except at x = -2. So, when Mathematica samples the function, there is nothing to force the adaptive sampling algorithm to subdivide unless the original sample just happens to select x = -2 as a sample point.

A good discussion of why Mathematica plot routines give misleading results can be found in the book The Mathematica Graphics Guidebook by Cameron Smith and Nancy Blachman.

By experimenting with the number of PlotPoints and the PlotRange, you might find a combination that would cause Mathematica to sample the function at -2 which would show the problem.

Probably a better solution would be the interval plotting. Roman Maeder wrote a two part article which appeared in The Mathematica Journal Volumes 7.3 and 7.4 discussing interval plotting. In those articles, he shows code for a routine which will find and display things like this.


  • Prev by Date: Re: Mathematica, Windows 2000 and Service Pack 3 (The good, the bad and the ugly ?)
  • Next by Date: Animated gif
  • Previous by thread: Re: Asymptote strangeness...
  • Next by thread: Asymptote mystery...