Question: How to obtain more accuracy at discontinuous points when using plot3d?

Consider the worksheet below containing a function that I came across while studying Apostol's Calculus. 

At the origin, this function has a defined directional derivative in all directions. It is not, however, continuous at the origin. We can see this by consider all points on the parabola x=y^2 except for the origin. The function takes on the value 1/2 on all such points but has value 0 at the origin and is thus discontinuous there.

My question is about a 3d plot of this function.

The plot seems a bit inaccurate because the ridge at the top extends all the way to the origin. 

If I hadn't done the calculations to know this, this plot would not give me this information. 

Is there a way to avoid this problem? Ie, to get more accuracy at points such as the origin here?

f := (x,y) -> piecewise(x=0, 0, x <> 0, x*y^2/(x^2+y^4))

f := proc (x, y) options operator, arrow; piecewise(x = 0, 0, x <> 0, x*y^2/(x^2+y^4)) end proc





piecewise(y^2 = 0, 0, y^2 <> 0, 1/2)




Please Wait...