Source

Adapted from my own handwritten and hand-typed notes from Year 1 to Year 3 of my EEE degree

Lagrange multipliers find the max and min of when must lie on a constraint curve .

Idea

At a constrained max or min, the level curve of just touches the constraint curve. Touching curves share a tangent line, so their normals are parallel. Since the gradient is the normal to a level curve:

The number is the Lagrange multiplier. If the point is a stationary point of itself.

Method (one constraint)

Assumption: the global max and min on the constraint exist (true when the constraint set is closed and bounded and is continuous).

The system to solve for :

Steps:

  1. Solve the system above for all solutions
  2. Evaluate at every point found
  3. Largest value is the max, smallest value is the min

For 3 variables, add and use .

Tips for solving: factor equations like into cases, divide only when you know the divisor is non-zero, and try multiplying equations by , , to make them look alike.

If the constraint is simple (like ), you can instead substitute it into and do a 1-variable max/min problem.

Lagrangian form

Equivalently, find stationary points of

where the constraint is written as . Setting gives back the constraint.

Two constraints

To optimise subject to and , solve

then compare the values of as before.

Worked example

Extreme values of on the circle (closed and bounded, so extrema exist).

Cases:

  • From the first, or
  • gives
  • gives , so and
  • and

Maximum at , minimum at .

Worked example: open box

A lidless box uses m of card: . Maximise .

Multiply by , , respectively. All three left sides become , so . This gives and . Substituting: , so , , and m.

Worked example: two constraints

Maximise subject to and .

So and . Then , so .

Two candidates:

  • : , , ,
  • :

The maximum value is .