![[Graphics:Images/index_gr_1.gif]](Images/index_gr_1.gif)
![[Graphics:Images/index_gr_2.gif]](Images/index_gr_2.gif)
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:
![[Graphics:Images/index_gr_6.gif]](Images/index_gr_6.gif)
![[Graphics:Images/index_gr_7.gif]](Images/index_gr_7.gif)
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):
![[Graphics:Images/index_gr_8.gif]](Images/index_gr_8.gif)
![[Graphics:Images/index_gr_9.gif]](Images/index_gr_9.gif)
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.
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).
(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").
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:
![[Graphics:Images/index_gr_14.gif]](Images/index_gr_14.gif)
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 :
![[Graphics:Images/index_gr_17.gif]](Images/index_gr_17.gif)
It can also be very useful to look at a contour plot over the same region:
![[Graphics:Images/index_gr_20.gif]](Images/index_gr_20.gif)
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.
Now, let's test this on paths of the form :
![[Graphics:Images/index_gr_24.gif]](Images/index_gr_24.gif)
Since this depends upon m, the limit cannot exist. On the other hand, consider :
![[Graphics:Images/index_gr_27.gif]](Images/index_gr_27.gif)
![[Graphics:Images/index_gr_30.gif]](Images/index_gr_30.gif)
The limit doesn't appear to exist here. Again, let's check all linear paths through this point:
![[Graphics:Images/index_gr_33.gif]](Images/index_gr_33.gif)
The contour lines here give you a clue: they look (vaguely) parabolic. So, let's try a parabolic path through the origin:
![[Graphics:Images/index_gr_35.gif]](Images/index_gr_35.gif)
Of course, the contours actually look more like parabolas of the form :
![[Graphics:Images/index_gr_38.gif]](Images/index_gr_38.gif)
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:
![[Graphics:Images/index_gr_41.gif]](Images/index_gr_41.gif)
![[Graphics:Images/index_gr_44.gif]](Images/index_gr_44.gif)
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),
Note: Mathematica uses the function Log for the natural logarithm (rather than ln).