Jonathan Rogness
Sample Lab Writeup
Math 2374

(Note that you don't have to include any Mathematica commands in your writeups; it's a matter of personal preference.  Sometimes it's nice as a TA to see exactly how you created a picture, but if your labels and explanations are clear, having a record of the commands isn't necessary.  Incidentally, even if you show your commands, you still need to label your pictures!)

Exercise 1

Explain why B(x, y) = (x^2 - y^2)/(x^2 + y^2)produces the graph it does.

The graph of B(x, y) is shown here.  Note that B(0,0) is not defined, because the denominator would be zero.  This could explain some of the odd behavior of the graph near (x, y) = (0, 0).

B[x_, y_] = (x^2 - y^2)/(x^2 + y^2) ; Plot3D[B[x, y], {x, -4, 4}, {y, -4, 4}, AxesLabel {"x", "y", "z"}, ViewPoint {3, 5, 2}]


One obvious feature of the graph is the "straight line" on top.  Whenever y=0, B(x, y) = B(x, 0) = x^2/x^2 =1, assuming x is not equal to zero as well.  So above the line y=0 -- i.e. on the x-axis -- the surface always has a height of one.  Although it's not as obvious, there's also a straight line at the bottom of this graph.  Along the y-axis, where x=0, we have B(0, y) = -1 for all values of y.  This line on the bottom is a bit more visible in the following picture:

Plot3D[B[x, y], {x, -4, 4}, {y, -4, 4}, AxesLabel {"x", "y", "z"}, ViewPoint {5, 2, -2}]


So the graph of B has two straight lines, one at height one above the x-axis, and one at height -1 below the y-axis, and the rest of the surface is like a piece of rubber stretching between the two lines.  Inbetween, the function is equal to zero precisely when the numerator x^2 - y^2 = 0, which occurs for y = x and y = -x.  The following picture shows the graph of B(x, y) along with the plane z = 0, and one can see that the intersection is in fact on the lines y =  x.  

plane = Plot3D[0, {x, -4, 4}, {y, -4, 4}] ; graph = Plot3D[B[x, y], {x, -4, 4}, {y, -4, 4}] ;  ...  ViewPoint {0, -3, 4}, AxesLabel {"x", "y", "z"}] ;


Created by Mathematica  (January 29, 2004)