Constrained Optimization

This Demonstration shows the minimization or maximization of a function (blue) subject to a constraint (red). The green point shows the optimal solution.
The graphic on the left shows the level curves of and together with the gradients. On the right, a 3D graphic of the function is shown together with the constraint of projected onto the surface of .
For either the minimum or maximum, the gradients of the function and the constraint are parallel: , with the Lagrange multiplier . By moving the point around the plot region, you can see that this is a necessary condition for constrained optimization.


  • [Snapshot]
  • [Snapshot]
  • [Snapshot]


    • Share:

Embed Interactive Demonstration New!

Just copy and paste this snippet of JavaScript code into your website or blog to put the live Demonstration on your site. More details »

Files require Wolfram CDF Player or Mathematica.