Re: Plot3D question

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

On 10/21/06 at 5:14 AM, dimmechan at yahoo.com (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 In[12]:= $Version Out[12]= 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