Euler Hall — free maths guides

One constraint, one multiplier

A plain-language explanation of lagrange multipliers. The idea in plain words, a worked example, and a check with the answers shown — part of the free Calculus III guides.

At the optimum, the two gradients are parallel

To extremiseff subject tog(x,y)=cg(x,y)=c, solve

∇f=λ ∇g,g=c.\nabla f = \lambda\,\nabla g, \qquad g = c.

Two equations from the gradients plus the constraint itself, for the three unknownsxx,yy andλ\lambda.

Why parallel. At the optimum you cannot improve by moving along the constraint, so the level curve offf there is TANGENT to the constraint. Tangent curves have parallel normals, and the normals are the gradients.

A worked case. Maximisex+yx+y onx2+y2=2x^2+y^2=2. Here∇f=⟨1,1⟩\nabla f=\langle 1,1\rangle and∇g=⟨2x,2y⟩\nabla g=\langle 2x,2y\rangle, so⟨1,1⟩=λ⟨2x,2y⟩\langle 1,1\rangle = \lambda\langle 2x,2y\rangle forcesx=yx=y. The constraint then gives2x2=22x^2=2, sox=y=±1x=y=\pm1, and the values offf are+2+2 and−2-2. The maximum is 2 at(1,1)(1,1).

Why solving means eliminating lambda

Two of the three equations are usually a pair likefx=λgxf_x = \lambda g_x andfy=λgyf_y = \lambda g_y. Dividing one by the other eliminatesλ\lambda and gives a relation betweenxx andyy — which is the step most solutions take.

When a component of∇g\nabla g is zero, dividing is unsafe and the cases have to be checked separately. That is the one genuine trap in the method.

A one-constraint problem

Question, in the shape the practice takes. Maximisexx onx2+y2=9x^2+y^2=9.

Work it through.⟨1,0⟩=λ⟨2x,2y⟩\langle 1,0\rangle = \lambda\langle 2x,2y\rangle forcesy=0y=0, sox=±3x=\pm3. The maximum is 3.

By the end you can
  • Write the Lagrange condition
  • Solve a one-constraint problem
  • Say why the gradients are parallel
Check yourself

Maximiseyy onx2+y2=16x^2+y^2=16?

Answers

⟨0,1⟩=λ⟨2x,2y⟩\langle 0,1\rangle = \lambda\langle 2x,2y\rangle forcesx=0x=0, soy=±4y=\pm4 and the maximum is 4.

Work out where to start — free, no accountAnswer six real questions — free, no account