`` ``
`` ``

# Calculus III - Lab 2b: 3-Dimensional Graphs - Surfaces

### Surfaces

#### Cylindrical and Spherical coordinates

Mathematica has commands built in for graphing functions in cylindrical and spherical coordinates:  CylindricalPlot3D and SphericalPlot3D (see my introductory handout for usage; these are hard to find in the online help: go to the "Add-ons" button, then choose "Graphics", then "ParametricPlot3D").  These will plot z as a function of r and θ, and ρ as a function of θ and ϕ, respectively.

The problem comes when you need to graph something like or , neither of which are functions of z or ρ.  One possible solution to this is to make the following definitions:

`` ``
`` ``

In order to use these to graph something, you must be able to eliminate one of the domain variables.  Then use ParametricPlot3D to graph.  So, for example, to graph the two equations mentioned above, you could execute (the Evaluate command isn't crucial; it just stops Mathematica from giving you a warning every time):

`` ``
`` ``

Notice that is the same as (and cimilarly for CylindricalPlot3D).  This method allows you to graph a wide variety of graphs in spherical and cylindrical coordinates.

##### How does the shape of the surface depend on the parameters m and n?  Clearly state your conclusions, illustrating them with examples.

Hint:  This is in cylindrical coordinates, but you can't easily use CylindricalPlot3D to graph it (because r is a function of θ and z, rather than z being a function of θ and r).

##### How does the shape of the surface depend on the parameters m and n?  Clearly state your conclusions, illustrating them with examples.

(You CAN use the SphericalPlot3D function here if you wish.  Be careful to specify ϕ first in your range.)  This particular graphs have been suggested as models for tumors (they are often called "bumpy spheres").

#### Limits

Taking a limit of a function of two variables can be very difficult.  Mathematica can take limits of a function of a single variable relatively easy:

`` ``
` `

However, it does not have a built-in command for finding the limit of a multi-variable function.  This is unforunate (though not really surprising, considering the complications that can arise in 3 dimensions).

For limits of functions of two variables, it can often be useful to graph the function around the limit point first.  This can give you an idea of whether the limit exists or not.  If it looks like it doesn't exist, the graph may give you some good ideas of what paths to test the limit along to look for differing values.  If you can find two different paths with two different limits, then you're done (the limit does not exist).  Mathematica can also aid you in taking limits along these paths.  If it looks like the limit does exist, you might be able to use Mathematica to ease your suffering as you try to prove it really does exist (sadly, Mathematica won't prove it for you...).

As an example, let's examine :

`` `` ` `

It can also be very useful to look at a contour plot over the same region:

`` `` ` `

Althought you can't really tell for certain here, it looks like the graph may approach different limits, depending upon what path you approach it on.

##### Explain how the contour plot shows you the limit probably doesn't exist.

Now, let's test this on paths of the form :

`` ``
` `

Since this depends upon m, the limit cannot exist.  On the other hand, consider :

`` `` ` `
`` `` ` `

The limit doesn't appear to exist here.  Again, let's check all linear paths through this point:

`` ``
` `

The contour lines here give you a clue:  they look (vaguely) parabolic.  So, let's try a parabolic path through the origin:

`` ``
` `

Of course, the contours actually look more like parabolas of the form :

`` ``
` `

This goes to different limits for different values of m, so the original limit does not exist.  So, sometimes checking all lines isn't good enough.

Let's examine one more example: `` `` ` `
`` `` ` `

Here, it looks like the limit DOES exist.  Notice that this doesn't actually prove this; you still have to figure out a way to do that.  Mathematica may or may not help to do this.  Hint:  for (x,y) close to (0,0), #### For each of the following, use Mathematica to decide whether the limit exists or not.  Support your decision with appropriate graphs.  If it doesn't exist, confirm this fact algebraically.

##### 2. Note:  Mathematica uses the function Log for the natural logarithm (rather than ln).

##### 4. Converted by Mathematica      March 27, 2001