Mathematics 263                                  Laboratory 4                                      October 6, 1993
	  
Name: _____________________________   Lab Partner: ___________________________
	  
Consulted with:  ____________________________________________________________

Scalar Fields and Singularities

In this lab we will introduce tools for investigating functions of two variables (scalar fields), and use those tools to see what can happen at points where these functions are discontinuous.

Part 1:  Graphing Scalar Fields

In Lab 3 we used the command Mathematica uses to plot the graph of a function of two variables: Plot3D; of course then we were only plotting planes.  Let's use it to plot a more interesting function: f(x, y) = xy.  Here is the basic command:

Plot3D[x y, {x,-3, 3}, {y,-3, 3}]

The default view of this graph is a little misleading; the perspective doesn't show the shape of the surface well.  To get another view, move the cursor so it falls into the space between this paragraph and your output above; the cursor should flop on its side, looking like a dog bone.  Click the left mouse button and a horizontal line will appear.  Hold down the Alt key, type "L", and a copy of the previous command will appear.  Place the blinking insertion point just before the last bracket "]" in the command and type a comma. Now click on the "Action" Menu at the top of the screen, and select "Prepare Input".  A submenu will appear; click on "3D Viewpoint Selector".  In the resulting Dialog box is a picture of some coordinate axes that can be rotated to change the point of view we are given of the graph.  Rotate the axes to get something like a "usual" view where we look at the graph from some point with all positive coordinates.  Then click on the "Paste" button to insert the new viewpoint into the plot command.  Close the dialog box and enter the modified command. Print out your plot.

Mathematica can generate level curves, as well. The following command does that

ContourPlot[x y,{x,-3,3},{y,-3,3},ContourShading->False]

Copy the command as you did above, delete the option ContourShading->False (and the preceding comma) and enter the new command.  Explain the significance of light and dark contour shading below. (Compare this plot with the graph you found above.)

Part 2: Level Curves and Limits

One of the best ways to find trouble spots for a scalar field is to look at their level curves.  Recall that on a level curve of a scalar field f, the function f(x, y) is constant.  What would happen if two level curves for different values of f were to intersect?  On the next page, explain why a function cannot be continuous at a point in its domain where two level curves intersect.  Consider all three parts of the definition of continuity given in class in your explanation.  (After lab?)

Places where level curves intersect are called singularities, and are very important in many applications of scalar fields.  We will examine the singularity at the origin for the function

The following command defines this function in Mathematica:

f[x_,y_]:=(x^2 - y^2)/(x^2 + y^2)

In the space below, verify (as in the homework) that f has no limit as (x, y) approaches (0, 0).

Ask Mathematica to plot the level curves of this function using the following command

ContourPlot[f[x,y],{x,-1,1},{y,-1,1},ContourShading->False]

Notice that this plot shows the contours as being V shaped, but in fact, as your computations proving there is no limit should show, this is wrong!  What do the level curves for this function REALLY look like?  HINT:  If you can't tell from your computation above, try re-entering the command above with the additional option:  Contours->40.

To see what the singularity looks like, plot the graph of the function with the command below.  The option forces Mathematica to sample the function more often so the graph is more accurate.

Plot3D[f[x,y],{x,-1,1},{y,-1,1},PlotPoints->25]

Alter the view point and/or increase the number of plot points until you get a graph that you feel shows the singularity well.  Print it out and describe in your own words what happens at the singularity.

Part 3: You are on your own!

Find and investigate the singularity of the function below.  Your discussion should be based on the development in Part 2 and should include a Mathematica contour plot and surface plot, with an explanation of their accuracies and inaccuracies.