In multivariable calculus, we teach our students the method of Lagrange multipliers to solve constrained optimization problems. As we introduce this topic, many of us use some form of visual presentation to help students understand how we develop the Lagrange multiplier equation, i.e.,
\[ \nabla f(x,y) = \lambda \nabla g(x,y)\]
After demonstrating how this works in class with an example, I assign my students to print a visual verification of a homework problem showing both the contour plot with the constraint curve and the 3D surface plot with the constraint curve projected onto the surface showing the relative extrema visually.
Exercise: Find the relative extrema of the function f subject to the given constraint, showing all work. Then graph the function in CalcPlot3D and create its contour plot with First Level: -1, Step size: 1, and number of contours: 10. Then add the constraint curve to the plot using the Add Constraint Curve option in the Display Contour Plot dialog. Use the scrollbar at the bottom of the contour plot to move the point to one of the relative extrema. Then print the contour plot. Finally click on the contour plot and print a view of the surface (along with the contours and the constraint curve projected on the surface) that makes it possible to see both extrema clearly.
\( f(x,y)=x^2+y^2+2x-2y+1\) Constraint: \(g(x,y)=x^2+y^2=2\)
To obtain the images on the right using the applet:
Click here to open the CalcPlot3D applet in a new window.
Click here to open a pdf file which contains the instructions for the activity.