This applet is designed to build intuition about finding critical points of functions of two variables, using the gradient vector field and contours.

• The applet has a control window, a FieldMap window, and a ThetaSliceCurve window.  The FieldMap window initially shows the gradient field in white, the point P0 and the gradient at P0 in red, and a line through P0 at angle theta in green.  The ThetaSliceCurve gives a green cross section of the surface  in direction theta, a  thin green tangent line to that slice curve,  and  red and pink lines corresponding to the slope of the gradient and its negative respectively.
• The gradient vector is (f_x, f_y, -1).  It is the gradient to the function h(x,y,z)=f(x,y-z) which has the graph of z=f(x,y) as a level surface.
• Local extrema are either sources of sinks for the gradient vector field.
• Extrema are also places  where the gradient goes to zero, making the corresponding tangent lines flat.
• A point that is a local extreme point (maximum or minimum) will be an extreme point of the same kind (maximum or minimum) for slices in every direction.
• We expect the contours to form a loop around extreme points.  Whenever the contours form a loop for a continuous function, there is an extreme point inside the loop.

Things to notice:
• The coordinates of P are (Px, Py, f(Px,Py)).  The values of Px and Py are controlled by the forward and back buttons in the control panel.  Values can also be typed in.
• The value of theta scrolls between 0 and 2*Pi.  The slope of the line tangent to the slice curve is always trapped between plus or minus the magnitude of the gradient vector.
• Dragging in the FieldMap window lets you rotate your view the vector field in 3D.  The view  menu lets you choose particular views.  The applet opens with the view "Up Z Axis" which points the x and y axes in standard position.  On can make the x and y axes disappear with the remaining axes in standard position with "Up X Axis" and "Down Y Axis" respectively.
• The surface checkbox in the control panel lets you add the graph of the surface.
• The contour checkbox let you add contours. (In the ThetaSliceCurve window, contours become straight lines.) The levels interval controls the levels of the contours.
• The density of arrows for the gradient field and the length of theses arrows can both be set with the VectorsDensityLength variable, which takes an ordered pair.
Interesting functions and points to try:
• f(x,y)=(x^3-3*x+2*y^3-3*y^2)/3; The critical points are at (1,0), (1,1), (-1,0), (-1,1).  There is an inflection point at (0,.5).
• f(x,y)=x^2+k*x*y+y^2 with k=-4, -2, 0,2,4, looking at the origin.  Depending on the value of k, the surface is either a hyperboloid, an elliptical paraboloid, or a parabolic cylinder.
• f(x,y)=(x^3+x*y^2)/sqrt(x^2+y^2), looking at the origin.  At the origin, the gradient and the partials do not  exist, but looking at the slice curves, the origin is an inflection point in all directions.
• f(x,y)=(x^4-6*x^2*y^2+y^4)/(x^2+y^2), looking at the origin.  At the origin, the gradient and the partials do not  exist, but looking at the slice curves, the origin shifts back and forth between being a maximum and a minimum.

This applet was designed as by modifying an applet from a demo by Tom Banchoff at Brown University.  It is used with permission.   Go to the Banchoff Applet Help page.