Skip to main content
1-Visitor
September 29, 2010
Solved

How to restrict domain and avoid 3-D graph errors of division by zero?

  • September 29, 2010
  • 8 replies
  • 6475 views

As an example, plotting the 3D surface Z(x,y):=2/(x^2-y^2). What's the method for restricting the domain to {(x,y)| x =/= y}? Can I plot this without converting from rectangular?

I'm trying to take advatage of Mathcad capabilities, but I can't track this one down.

Best answer by

I think that there are 2 issues causing confusion here:

the first is the discontinuity giving rise to some very large numbers which stop you seeing the finer detail as you move away from it - all that the plot shows are the peaks with values upto 10^???

The second is caused by the way that the points are sampled & I didn't (still don't) understand why some parts of the discontinuity ramped to infinity and other parts appeared to remain finite and relatively small.

Thought about changing "100 on error" to "100* sign(x^2-y^2) on error" which makes the plot more symetrical, though I think is mathematically wrong.

Debatable what the value should be as both x & y tend to 0.

Max() & Min() functions to clip the Z value to something sensible both +ve and -ve

And the plot is now set for the maximum 200 points per axis to show the most detail.

Hope this gives you a few ideas of the possibilities

Andy

8 replies

19-Tanzanite
September 30, 2010

If you are using the Quickplot feature you need to choose the start, end, and # of grids so that none of the calculated points falls on the singularity. In this case you can just change the number of grids for range 2 from 20 to 21.

12-Amethyst
September 30, 2010

Another option is add to the domain of the funciton all points in the plane (x,y) assigning an arbitrarie value when the function isn't continous.

Regards. Alvaro.

1-Visitor
October 1, 2010

I adjusted the variables' Grid #'s to differ (by one), yet it did not resolve the problem for the sample problem. As far as the second suggestion, I didn't understand the meaning behind the syntax. At any rate, the plot seemed to lack usefulness in describing the general behavior of the surface through x,y,z space.

Could someone unpack for me a little how, or whether, Mathcad represents asymptotic planes? And if I have to restrict the domain manually, how I can do that?

In another sample problem (attached) I overcame the division by zero problem in a different rational function only after adjusting start, end, and # grids so that x & y were different in each regard, but again, the plot looks lets than descriptive. Can I visualize these a better way than with QuickPlot?

Thanks for your time spelling it out for a relatively new user.

Answer
October 1, 2010

I think that there are 2 issues causing confusion here:

the first is the discontinuity giving rise to some very large numbers which stop you seeing the finer detail as you move away from it - all that the plot shows are the peaks with values upto 10^???

The second is caused by the way that the points are sampled & I didn't (still don't) understand why some parts of the discontinuity ramped to infinity and other parts appeared to remain finite and relatively small.

Thought about changing "100 on error" to "100* sign(x^2-y^2) on error" which makes the plot more symetrical, though I think is mathematically wrong.

Debatable what the value should be as both x & y tend to 0.

Max() & Min() functions to clip the Z value to something sensible both +ve and -ve

And the plot is now set for the maximum 200 points per axis to show the most detail.

Hope this gives you a few ideas of the possibilities

Andy

12-Amethyst
October 1, 2010

Study discontinuities in the plane is hard because you can approach to it from a lot of path, when with just reals you have only two: by the left or by the right.

But here the discussion also go to the concept of infinity, in the case of Westerman, he clip the values to let all of it in a limited box plot. Maybe it is not correct mathematically, but in math first question is about which infinity we are talking, because there are not only one. Thinking in the kind of a thing that is always grounding up, but isn't constructed. This infinity is more consistent with this used in engineering: a few centimeters or seconds could be enough to call it infinity.

Also, the 3D plots are only some fashion way to see something, but the technical plot is contour plot, as Valery claims.

Regards. Alvaro.