Scalar-valued functions of two variables can be visualized in several ways. Given the function f (x, y) = xy sin xy, choosing Rectangular from the Plot 3D submenu produces a surface represented by the function values. Another way to visualize such a function is to choose Gradient from the Plot 2D submenu. This choice produces a plot of the vector field that is the gradient of this expression, plotting vectors at grid points whose magnitude and direction indicate the steepness of the surface and the direction of steepest ascent.
The vector field that assigns to each point
x, y
the
gradient of f at
x, y
is called the gradient field
associated with the function f.
To plot a gradient field
For example, type the expression x2 +2y2, and choose Gradient from the Plot 2D submenu. This procedure produces a plot of the vector field that is the gradient of this expression. The following shows the relative steepness on the left, the surface on the right.
Plot 2D + Gradient, Plot 3D + Rectangular
x2 +2y2
The gradient field for a scalar-valued function f (x, y, z) of three variables is a three-dimensional vector field where each vector represents the direction of maximal increase. The surface represented by the function values is embedded in four-dimensional space, so you must use indirect methods such as plotting the gradient field to help you visualize this surface.
Plot 3D + Gradient
xz + xy + yz
As with other three-dimensional vector fields, multiple views convey graphical information more effectively than does a single view.