Functions of Several Variables

Now let's try some multivariate functions.


\begin{maximasession}
f(x,y) := (x^2 - y^2)^2;
\maximaoutput*
\i1. f(x,y) := (x^...
...1. f\left(x , y\right)\mathbin{:=}\left(x^2-y^2\right)^2 \\
\end{maximasession}

Let's take a look at a plot.


\begin{maximasession}
load(draw);
draw3d(explicit(f(x,y), x, -3, 3, y, -3, 3));
...
...eft[ \mathrm{gr3d}\left(\mathrm{explicit}\right) \right] \\
\end{maximasession}

See Figure BLANK.

Figure 8: A plain surface plot of a function of two variables
\includegraphics{plot3.eps}

The important part is to enclose the function with explicit(). We can get a fancier, colored plot if we put enhanced3d = true at the beginning of the function call.


\begin{maximasession}
draw3d(enhanced3d = true, explicit(f(x,y), x, -3, 3, y, -3...
...eft[ \mathrm{gr3d}\left(\mathrm{explicit}\right) \right] \\
\end{maximasession}

Figure 9: An enhanced surface plot of a function of two variables
\includegraphics{plot4.eps}

We can see level curves (also known as a contour map) of the function f with the following:


\begin{maximasession}
draw3d(explicit(f(x,y), x, -5, 5, y, -5, 5),
contour_lev...
...eft[ \mathrm{gr3d}\left(\mathrm{explicit}\right) \right] \\
\end{maximasession}

An alternative is to use


\begin{maximasession}
contour_plot(f(x,y), [x, -5, 5], [y, -5, 5] );
\maximaoutp...
...(x,y), [x, -5, 5], [y, -5, 5] ); \\
\o6. \mathbf{false} \\
\end{maximasession}

Figure 10: A contour plot, showing level curves of $f$.
\includegraphics{plot5.eps}

The contour map is a 2D plot. If we raise the contour lines up to the plot surface then the lines are more precisely called horizontal traces. Here is a plot of these.


\begin{maximasession}
draw3d(enhanced3d = true,
explicit(f(x,y), x, -3, 3, y, -...
...eft[ \mathrm{gr3d}\left(\mathrm{explicit}\right) \right] \\
\end{maximasession}

See Figure 6. We do surfacehide = true so that we can see the traces better.

Figure 11: Another form of contour plot which shows horizontal traces on $f$
\includegraphics{plot6.eps}





Subsections
G. Jay Kerns 2009-12-01