MathGroup Archive 2006

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

Search the Archive

Re: Plot3D question

  • To: mathgroup at
  • Subject: [mg70650] Re: Plot3D question
  • From: Bill Rowe <readnewsciv at>
  • Date: Sun, 22 Oct 2006 01:19:43 -0400 (EDT)

On 10/21/06 at 5:14 AM, dimmechan at (dimitris) wrote:

>I would like to know why the Plot3D function does not complain about
>the following command (note there is a singularity at y=0)

>Plot3D[Sin[x]/y, {x, -10, 10}, {y, -10, 10}]

>whereas it does complain (a lot!) about the following

>Plot3D[Sin[x]/y, {x, -10, 10}, {y, -10, 10}]

The two lines of code above appear identical and both work for 
me on


5.2 for Mac OS X (June 20, 2005)

But clearly the reason any Mathematica routine fails to complain 
about a singularity is that Mathematica simply doesn't sample 
the function at the singularity. Whether Mathematica samples a 
function at a given point is determined by a number of variables 
including, the range for the variable, the version of 
Mathematica and the machine it is running on. And for Plot which 
uses the adaptive sampling routine, the settings for 
PlotDivision and MaxBend also have an effect.

I've found it is quite difficult to predict whether the plot 
routines in Mathematica will or will not sample a function at a 
singularity. The only way I have found to get predictability is 
to specifically trap the singularity in the function definition.
To reply via email subtract one hundred and four

  • Prev by Date: Re: Plot3D question
  • Next by Date: Re: simple question
  • Previous by thread: Re: Plot3D question
  • Next by thread: Re: Plot3D question