This will help you visualize what's happening with the Lagrange multipliers approach, and where the equation [math]\nabla f=\lambda\nabla g[/math] comes from.[br][br]Input the objective function [math]f(x,y)[/math] and the constraint function [math]g(x,y)[/math]. C is the value of the constraint (if you pick [math]g(x,y)[/math] wisely, you can leave C=0). The constraint curve [math]g(x,y)=C[/math] is displayed in red.[br][br]The slider c controls the level set [math]f(x,y)=c[/math], displayed in black. If red constraint curve crosses the black level curve, then moving along the constraint curve can take the value of f from below c to above c -- thus, the point of intersection is not a local extreme. So we are looking for points of tangency between the red and black curves. [br][br]Move the slider c to achieve tangency; in doing so you will find the extreme values of [math]f(x,y)[/math] constrained by [math]g(x,y)=C[/math].[br][br]This is a 3D applet -- if you rotate the perspective, you can enable the graph of [math]f(x,y)[/math] to see what's going on in 3D; but you should remember that we're really interested in the 2D picture.