MTH 224 · Mathematical Methods 1
Our notes
2 min readThe 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
-
Best pick Calculus Volume 3, 4.8 Lagrange Multipliers
(opens openstax.org in a new tab)
OpenStax, Calculus Volume 3, 4.8 Lagrange Multipliers, CC BY-NC-SA 4.0 · licence
-
Calculus III - Lagrange Multipliers
(opens tutorial.math.lamar.edu in a new tab)
-
Lagrange multiplier
(opens en.wikipedia.org in a new tab)
Wikipedia, Lagrange multiplier, CC BY-SA 4.0 · licence
-
Constrained optimization
(opens en.wikipedia.org in a new tab)
Wikipedia, Constrained optimization, CC BY-SA 4.0 · licence
-
OpenStax, Calculus Volume 3 (whole free textbook)
The whole book, free to read online or download as a PDF (the PDF is large: Wi-Fi).
(opens openstax.org in a new tab)
OpenStax, OpenStax, Calculus Volume 3 (whole free textbook), CC BY-NC-SA 4.0 · licence
-
NOUN MTH 311: Calculus of Several Variables
NOUN course book (PDF, about 5.1 MB: best on Wi-Fi). The same ground as most of this course.
(opens nou.edu.ng in a new tab)
-
NOUN MTH 309: Optimization Theory
NOUN course book (PDF, about 2.8 MB). Linear programming and constrained optimisation.
(opens nou.edu.ng in a new tab)
Watch
-
Meaning of Lagrange multiplier
10 min · ≈ 45 MB · about ₦25
(opens youtube.com in a new tab)
-
Lagrange multipliers | MIT 18.02SC Multivariable Calculus, Fall 2010
10 min · ≈ 45 MB · about ₦25
(opens youtube.com in a new tab)
-
Constrained Optimisation using Lagrange's Multiplier. #langrage #Multiplier #GATE #NET #ECONOMICS
12 min · ≈ 54 MB · about ₦30
(opens youtube.com in a new tab)
-
Lec 13: Lagrange multipliers | MIT 18.02 Multivariable Calculus, Fall 2007
50 min · ≈ 225 MB · about ₦126
(opens youtube.com in a new tab)
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.