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


Lab 3: Displaying functions of two variables


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.


Consider the function

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

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

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

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.
Graph the surface of the function D.
Plot at least 10 contours of the function D and note the values of D at these contours.

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

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

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