next up previous
Next: About this document ... Up: Labs and Projects for Previous: Labs and Projects for

Subsections


Lab 3: Displaying functions of two variables

Background

The graph of a function of a single real variable is a set of points (x,f(x)) in the plane. Typically, the graph of such a function is a curve. For functions of two variables, the graph is a set of points  (x,y,f(x,y)) in three-dimensional space. For this reason, visualizing functions of two variables is usually more difficult.

One of the most valuable services provided by computer software such as Maple is that it allows us to produce intricate graphs with a minimum of effort on our part. This becomes especially apparent when it comes to functions of two variables, because there are many more computations required to produce one graph, yet Maple performs all these computations with only a little guidance from the user.

Two common ways of representing the graph of a function of two variables are the surface plot and the contour plot. The first is simply a representation of the graph in three-dimensional space. The second, draws the level curves f(x,y)=C for several values of C in the x,y -plane. We will explore how to produce these kinds of graphs in Maple, and how to use the graphs to study the functions.

Maple Commands, with Examples

You can define functions of more than one variable in much the same way as you defined functions of a single variable:

> f := (x,y) -> x^2 + y^2;
> f(3,-1);
> g := (a,b,c,d,e) -> a*b^2 - sin(c+d)/e;

The following commands are useful for working with functions of two variables in Maple.

Exercises

1.
Consider the function

\begin{displaymath}
f(x,y,z) = \frac{xyz}{x+y+z}\end{displaymath}

and let P be the point (2,3,5).
(a)
Find the partial derivatives of f with respect to x, y, z and then evaluate them at the point P.
(b)
Find the equation of the tangent plane to the surface f(x,y,z) = 3 at the point P.

2.
A group of oceanographers is mapping the ocean floor to assist in the recovery of a sunken ship. Using sonar, they develop the model

\begin{displaymath}
D = \frac{-4x}{x^2+y^2+1}\;\;\;\;\;-5 \leq x \leq 5\,,\;\;-5 \leq y \leq 5\end{displaymath}

where D is the depth and x and y are the distances in kilometer.
(a)
Graph the surface of the function D.
(b)
Plot at least 10 contours of the function D and note the values of D at these contours.

(c)
What is the depth of the ship if it is located at the coordinate x=1, y = 0.5 ?

(d)
Determine the steepness of the ocean floor in the positive x-direction and positive y-direction from the position of the ship.

(e)
Find as accurately as you can the location of the shallowest and deepest point of the ocean floor in the region $-5 \leq x \leq 5\,,\;\;-5 \leq y \leq 5$.


next up previous
Next: About this document ... Up: Labs and Projects for Previous: Labs and Projects for

Christine Marie Bonini
4/5/1999