Section 9.5 Using Technology to Visualize the Gradient
The gradient of a function of three variables is a vector at each point in space. How can we graph such vector fields? How many different ways can you represent this information?
Activity 9.2. Using technology to visualize the gradient.
After you have thought about these questions yourself, you can use the Sage code below to explore several different mechanisms for visualizing the gradient in two and three dimensions. You can also use this Mathematica notebook 1 for the same purpose.
The code in the first box does some initialization, then defines and plots a function of two variables.
Now we can plot a contour diagram of the chosen function \(f\text{.}\)
Next we compute the gradient of \(f\text{...}\)
... and plot it. 2
Finally, we display both plots together. What do you notice?
Now try other functions by plugging something else in for \(f(x,y)\) in the first box and then redoing the other steps. A particularly nice choice is \(f=e^{y^2-x^2}\text{.}\)
In the activity in Section 9.5, you were asked to explore different ways of representing the gradient graphically. One combined representation is shown in Figure 9.3, showing both the gradient vector field and the level curves.
math.oregonstate.edu/bridge/paradigms/vfgradient.nb