MATH1020 Calculus II Maple Lab 10
Section 1-4 Due: Tuesday, December 7, 1999.
http://www.math.rpi.edu/~mitchj/math1020  

This lab consists of two independent questions. They are both concerned with functions of two variables and their graphs. Be sure to follow the lab guidelines as described on the class handouts.

1.
One way to visualize the behavior of a function f of two variables, x and y say, is to consider the surface z=f(x,y). For example, let

\begin{displaymath}f(x,y)=(3x^2-y^2)\exp(-x^2-y^2)\end{displaymath}

To plot this using maple, type
> f:=(3*x**2-y**2)*exp(-x**2-y**2);
> plot3d(f,x=-3..3,y=-3..3);

(a)
Use a couple of views of the surface to describe the function. Note local maxima (hills) and local minima (pits) of the surface, the (approximate) location of these extrema, and the behavior of f at the boundaries of x and y in the plot.
(b)
Another way to view the function is to plot its contours or level curves. These are curves given by $f(x,y)=\mbox{constant}$. In Maple, there are a couple of ways to plot these curves. One way is to use the ``patch with contour'' option in the plot3d window. This option places the contours right on the surface. Replot f(x,y) using plot3d and choose the style=contour option. Note the relationship between the behavior of the surface and its contours.
(c)
Another way to plot the contours of a function is to use the contourplot command in the plots package of Maple. Type
> with(plots):
> contourplot(f,x=-3..3,y=-3..3);

(d)
In your contour plot in part (c), draw arrows to indicate directions of increasing f. Place an ``H'' on your contour plot to mark each local maxima and an ``L'' to mark each local minima. Note that the contours on which f=0 intersect at x=y=0. Describe the behavior of the function near that point.

(e)
We now investigate the zeroes of the partial derivatives of the function. We can find the partial derivatives using the Maple diff command. Type
> dfdx := diff(f,x); dfdy := diff(f,y);

(f)
We can find where the partial derivatives are zero by using the implicitplot command in Maple. Type
> implicitplot(dfdx=0,x=-3..3,y=-3..3);
> implicitplot(dfdy=0,x=-3..3,y=-3..3);
(Notice that these plots are not very smooth, due to numerical difficulties.) To get a good idea of the plot, try plotting it using the axes=none option. How does the set of points with df/dx=0 correspond to the plot of f in part (a)?

(g)
It is possible to plot the zeroes of both partial derivatives in the same picture. Type
> dxplot:=implicitplot(dfdx=0,x=-3..3,y=-3..3,color=blue):
> dyplot:=implicitplot(dfdy=0,x=-3..3,y=-3..3,color=red):
> display({dxplot,dyplot});
What is special about the points where the two curves cross?

2.
We now consider the behaviour of a surface near a point. For example, let us consider the behavior of the function

T(x,y)=4-x2-2y2.

near the point x=y=1.

(a)
Use Maple or sketch by hand the surface z=T(x,y) for $0\leq x\leq 2$ and $0\leq y\leq 2$.

(b)
Use Maple or sketch by hand the trace of the surface z=T(x,y) in the plane y=1. Do the same for the plane x=1.

(c)
The partial derivatives ${\partial T\over\partial x}$ and ${\partial
T\over\partial y}$ give the slopes of these curves. Calculate these at x=y=1 using the Maple commands

> dTdx:=subs(x=1,y=1,diff(T,x));
> dTdy:=subs(x=1,y=1,diff(T,y));

(d)
Plot the surface z=T(x,y) and the plane

\begin{displaymath}z={\partial T\over\partial x}(1,1)(x-1)+{\partial T\over\partial y}(1,1)
(y-1)+T(1,1)\end{displaymath}

on the same graph using the commands

> S:=plot3d(T,x=0..2,y=0..2):
> P:=plot3d(dTdx*(x-1)+dTdy*(y-1)+subs(x=1,y=1,T),x=0..2,y=0..2):
> display3d({S,P});

Describe the relationship between the surface and plane near x=y=1. You may need to experiment with several views to find the best ones to show the relationship.



 
John E Mitchell
1999-11-10