UNIHIVE

Study Hub UNIPORT MTH 224

MTH 224 · Mathematical Methods 1

Lagrange multipliers

Optimising with a constraint, the method, and what the multiplier means.

Our notes

2 min read

The problem

Maximise or minimise f(x, y), subject to a constraint g(x, y) = k.

Picture: walk along the constraint curve on a hilly surface. The highest point on the path occurs where the path runs parallel to a level curve. There, the gradients are parallel.

The method

Solve:

∇f = λ∇g, and g(x, y) = k

In full:

  • fₓ = λgₓ
  • f_y = λg_y
  • g(x, y) = k

The number λ is the Lagrange multiplier.

Equivalently, form L = f − λ(g − k), and set all its partials to zero.

Worked example 1

Find the rectangle of largest area with a perimeter of 40 m.

  • f = xy; constraint 2x + 2y = 40.
  • y = 2λ and x = 2λ, so x = y.
  • 4x = 40 → x = y = 10; area = 100 m²; λ = 5.

Check by substitution: y = 20 − x, A = 20x − x²; A′ = 0 at x = 10. Correct.

Meaning of λ

λ measures how fast the best value changes as the constraint is relaxed: df*/dk = λ.

Here, with perimeter k, each side is k/4, so A* = k²/16 and dA*/dk = k/8 = 40/8 = 5. This matches λ.

So one extra metre of fencing adds about 5 m². In economics, λ is the shadow price of a resource.

Worked example 2: a consumer

A student's utility from food x and data y is U = xy. The prices are ₦1,000 and ₦500, and the budget is ₦6,000 (practice figures).

  • y = 1,000λ, x = 500λ, so y = 2x.
  • 1,000x + 500(2x) = 6,000 → 2,000x = 6,000 → x = 3, y = 6; U = 18.

λ = y/1,000 = 0.006, the extra utility per extra naira.

Check: nearby affordable (2, 8) gives U = 16; (4, 4) gives U = 16. Both are less than 18. Correct.

Worked example 3: nearest point

Find the point on the line x + 2y = 5 nearest to the origin. Minimise f = x² + y².

  • 2x = λ, 2y = 2λ, so y = 2x.
  • x + 4x = 5 → x = 1, y = 2; distance √5.

Check by the distance formula: |1(0) + 2(0) − 5|/√(1 + 4) = 5/√5 = √5. Correct.

Three variables

Find the box with no lid, of volume 32 m³, using the least material. Minimise S = xy + 2xz + 2yz, with xyz = 32.

  • y + 2z = λyz; x + 2z = λxz; 2x + 2y = λxy.
  • From the first two, x = y. From the second and third, working through, x = 2z.
  • (2z)(2z)z = 32 → z³ = 8 → z = 2, x = y = 4.
  • S = 16 + 16 + 16 = 48 m².

Check: a different box, x = y = 3.2, z = 3.125, gives 10.24 + 20 + 20 = 50.24, which is larger. Correct.

Limits of the method

The method finds candidates: confirm each is a maximum or minimum from the problem itself, or by comparing values. It also needs ∇g ≠ 0 at the solution.

Exams usually ask: use Lagrange to maximise or minimise under one constraint; compare with direct substitution; explain λ.

Common mistake: solving the three equations but then forgetting to compute the value of f, or not stating the units in an applied problem.

Written by the UniHive team in our own words. Spotted a mistake? Tell us on WhatsApp.

Read

Watch

We link to free material and never copy it. Every link was opened by our team before it went up; video data is a rough guide at 360p.

All MTH 224 topics

Report

Sign in to report this. It is free.

Is this your work (a lecturer, author or publisher)? Ask us to take it down.