Home > Knowledge Base > Assignment Samples > Assignment Sample: Optimisation With Lagrange Multipliers: Worked Problems

Assignment Sample: Optimisation With Lagrange Multipliers: Worked Problems

Published by at July 30th, 2026 , Revised On July 30, 2026

Type: Assignment  |  Subject: Mathematics  |  Level: Undergraduate  |  Word Count: ~1800 words

This model assignment was produced by an Essays UK specialist as reference material for learning purposes only. For support in this field, see our calculus assignment help.

The Brief

Using the method of Lagrange multipliers, solve the three constrained optimisation problems set out below. For each problem, identify all critical points, apply an appropriate second-order check to classify the critical point, and interpret the value of the multiplier where relevant. Show all working.

Model Answer

Introduction

Constrained optimisation problems arise whenever a quantity must be maximised or minimised subject to a restriction that links the variables together, rather than allowing them to vary independently. Ordinary calculus, which finds turning points by setting derivatives equal to zero, is not on its own sufficient here because the constraint removes one degree of freedom from the problem (Larson and Edwards, 2018). The method of Lagrange multipliers provides a systematic way to build the constraint directly into the optimisation and to find candidate maxima and minima without first solving the constraint explicitly for one variable (Stewart, 2016). This assignment applies the method to three problems of increasing complexity: a symmetric product-maximisation problem, a Cobb-Douglas output-maximisation problem drawn from production economics, and a classical geometric minimisation problem involving the surface area of a cylindrical container. For each problem, the critical point is found algebraically, the value of the Lagrange multiplier is calculated and interpreted, and the nature of the critical point is confirmed using an appropriate second-order check. Lagrange multipliers are not merely an algebraic device: the technique underlies constrained regression and portfolio optimisation in statistics and finance, the derivation of demand functions in microeconomics, and shape-optimisation problems in engineering design, which is why the method is introduced early in most quantitative degree programmes and revisited repeatedly in more advanced modules (Adams and Essex, 2018).

Approach/Method

For a function f(x,y) to be optimised subject to a single equality constraint g(x,y) = c, the Lagrangian function is formed as L(x,y,λ) = f(x,y) − λ(g(x,y) − c), where λ is the Lagrange multiplier (Chiang and Wainwright, 2005). The first-order necessary conditions for a critical point are found by setting all three partial derivatives to zero:

∂L/∂x = fx(x,y) − λ gx(x,y) = 0
∂L/∂y = fy(x,y) − λ gy(x,y) = 0
∂L/∂λ = −(g(x,y) − c) = 0

The third condition simply restates the original constraint, so solving the system reduces to finding (x, y, λ) that satisfy the first two equations together with g(x,y) = c (Adams and Essex, 2018). Geometrically, the first two conditions require the gradient of the objective function to be parallel to the gradient of the constraint at the optimum, meaning the level curve of f is tangent to the constraint curve (Anton, Bivens and Davis, 2021). Once a critical point has been located, its nature can be confirmed either by substitution — reducing the problem to a single variable and applying the standard second-derivative test — or, where substitution is inconvenient, by evaluating the bordered Hessian determinant (Simon and Blume, 1994). The value of λ at the optimum is not incidental: it measures the sensitivity of the optimal objective value to a small relaxation of the constraint, a property that is used directly in Problem 2 below (Sydsæter et al., 2016). For two variables and a single constraint, the bordered Hessian is the symmetric determinant formed by bordering the Hessian of L with respect to x and y with the first partial derivatives of the constraint, and its sign at a critical point provides a second-order test that is equivalent to, but more general than, the single-variable second-derivative test used after substitution (Simon and Blume, 1994).

Worked Solution/Analysis

Problem 1: Maximising xy Subject to x + y = 20

Maximise f(x,y) = xy subject to the constraint x + y = 20.

The gradients are ∇f = (y, x) and ∇g = (1, 1), so the first-order conditions are y = λ and x = λ, which immediately give x = y. Substituting into the constraint, 2x = 20, so x = 10 and y = 10, with λ = 10. The maximum value is f(10, 10) = 100.

To confirm this is a maximum rather than a minimum or a saddle point, the constraint is substituted directly: with y = 20 − x, f(x) = x(20 − x) = 20x − x². Then f′(x) = 20 − 2x = 0 gives x = 10, and f″(x) = −2 < 0, confirming a maximum (Stewart, 2016).

Problem 2: Maximising Cobb-Douglas Output Subject to a Budget Constraint

A firm’s output is modelled as Q(x,y) = x0.5y0.5, where x and y are units of two inputs priced at £4 and £2 per unit respectively, and the firm has a fixed budget of £120: 4x + 2y = 120.

The first-order conditions give 0.5x−0.5y0.5 = 4λ and 0.5x0.5y−0.5 = 2λ. Dividing the first equation by the second eliminates λ and yields y/x = 2, so y = 2x. Substituting into the budget constraint, 4x + 2(2x) = 120, so 8x = 120 and x = 15, giving y = 30.

Maximum output is Q(15, 30) = √(15 × 30) = √450 ≈ 21.21 units. The multiplier is λ ≈ 0.177, meaning that a £1 increase in the budget would raise maximum output by approximately 0.177 units — the standard economic interpretation of λ as the marginal value of relaxing the constraint (Sydsæter et al., 2016). This mirrors the diminishing-marginal-benefit pattern typical of Cobb-Douglas problems: because the exponents on x and y sum to one, doubling the budget more than doubles neither input, and λ itself would fall gradually as the budget grew further, reflecting the concavity of the output function along the constraint line.

Problem 3: Minimising the Surface Area of a Cylindrical Can

A closed cylindrical can must hold a fixed volume of 500 cm³ using the minimum possible sheet metal. Surface area S(r,h) = 2πr² + 2πrh is minimised subject to V(r,h) = πr²h = 500.

The first-order conditions are 4πr + 2πh = λ(2πrh) and 2πr = λ(πr²). The second condition simplifies to λ = 2/r. Substituting into the first condition and simplifying gives 2r + h = 2h, so h = 2r — the well-known result that an optimally proportioned can has a height equal to its diameter.

Substituting h = 2r into the volume constraint, 2πr³ = 500, so r³ ≈ 79.58 and r ≈ 4.30 cm, giving h ≈ 8.60 cm. The minimum surface area is S = 6πr² ≈ 348.4 cm².

This critical point can be verified as a minimum using the bordered Hessian. With g(r,h) = πr²h − 500, the required partial derivatives are gr = 2πrh, gh = πr², Srr = 4π, Srh = 2π and Shh = 0. Evaluating at r ≈ 4.30 cm, h ≈ 8.60 cm gives gr ≈ 232.4, gh ≈ 58.1, Srr ≈ 12.57 and Srh ≈ 6.28. Expanding the 3×3 bordered determinant along the first row gives a value of approximately +127,200. Using the sign convention of Simon and Blume (1994), a positive bordered Hessian for a two-variable, one-constraint problem of this type confirms a constrained minimum, corroborating the intuitive argument above that moving r away from 4.30 cm in either direction increases the surface area.

Summary of Results

Problem Objective Constraint Critical Point λ Optimum Value
1 f(x,y) = xy x + y = 20 x = 10, y = 10 10 100
2 Q(x,y) = x0.5y0.5 4x + 2y = 120 x = 15, y = 30 ≈0.177 ≈21.21
3 S(r,h) = 2πr² + 2πrh πr²h = 500 r ≈ 4.30, h ≈ 8.60 ≈0.465 ≈348.4 cm²

Evaluation

The three problems illustrate both the mechanics and the interpretive value of the Lagrange multiplier method. In Problem 1, substitution provided a direct check via the ordinary second-derivative test, confirming that the stationary point found by the multiplier method was indeed a maximum. Problems 2 and 3 involve constraints that are not easily solved for one variable in a way that keeps the algebra manageable, which is precisely where the multiplier method shows its advantage over naive substitution (Boyd and Vandenberghe, 2004). Where substitution is impractical, the bordered Hessian determinant offers a formal second-order test: for a two-variable problem with one constraint, the sign of the bordered Hessian at the critical point distinguishes a constrained maximum from a constrained minimum, under the standard sign convention (Simon and Blume, 1994). In Problem 3 this can also be confirmed intuitively: moving r slightly away from 4.30 cm in either direction, while adjusting h to keep the volume fixed at 500 cm³, always increases the surface area, consistent with a minimum. A limitation of the method as applied here is that it assumes the constraint is exactly binding and holds with equality; extending the analysis to inequality constraints, such as a maximum rather than a fixed budget in Problem 2, would require the Karush-Kuhn-Tucker conditions rather than the Lagrangian alone (Bertsekas, 2016). The economic interpretation of λ in Problem 2 is also worth stressing: it converts an abstract mathematical multiplier into a meaningful marginal quantity that a decision-maker could use directly, which is one of the main reasons the method is taught so widely in applied disciplines beyond pure mathematics (Chiang and Wainwright, 2005). It is also worth noting what the method does not check: it locates candidate stationary points on the constraint surface but does not by itself guarantee that a global optimum exists, particularly if the constraint set is unbounded. In all three problems here the constraint sets are effectively bounded by the practical requirement that x, y, r and h remain positive, which is what allows the single interior critical point found in each case to be accepted as the global optimum without a further boundary search (Boyd and Vandenberghe, 2004).

Conclusion

The method of Lagrange multipliers provides a consistent framework for solving constrained optimisation problems across very different contexts, from abstract product maximisation to production economics and geometric design. Across all three problems the same three-step process was followed: form the Lagrangian, solve the first-order conditions simultaneously with the constraint, and confirm the nature of the resulting critical point using either substitution or a bordered Hessian. The value of the multiplier itself proved useful beyond a mere solving device, particularly in Problem 2, where it quantified the marginal return on relaxing the budget constraint. Mastery of this technique underpins a wide range of further topics, including multivariable calculus, mathematical economics, and engineering design, and the worked examples above are intended to demonstrate both the algebraic mechanics and the underlying geometric and economic intuition (Marsden and Tromba, 2012).

References

  • Adams, R.A. and Essex, C. (2018) Calculus: A Complete Course. 9th edn. Toronto: Pearson Canada.
  • Anton, H., Bivens, I. and Davis, S. (2021) Calculus: Early Transcendentals. 12th edn. Hoboken: Wiley.
  • Bertsekas, D.P. (2016) Nonlinear Programming. 3rd edn. Belmont: Athena Scientific.
  • Boyd, S. and Vandenberghe, L. (2004) Convex Optimization. Cambridge: Cambridge University Press.
  • Chiang, A.C. and Wainwright, K. (2005) Fundamental Methods of Mathematical Economics. 4th edn. New York: McGraw-Hill.
  • Larson, R. and Edwards, B.H. (2018) Calculus. 11th edn. Boston: Cengage Learning.
  • Marsden, J.E. and Tromba, A.J. (2012) Vector Calculus. 6th edn. New York: W.H. Freeman.
  • Simon, C.P. and Blume, L. (1994) Mathematics for Economists. New York: W.W. Norton.
  • Stewart, J. (2016) Calculus: Early Transcendentals. 8th edn. Boston: Cengage Learning.
  • Sydsæter, K., Hammond, P., Strøm, A. and Carvajal, A. (2016) Essential Mathematics for Economic Analysis. 5th edn. Harlow: Pearson.

Need a Model Assignment Written to Your Exact Brief?

Our 350+ UK-qualified writers deliver referenced model documents from £15 per 250 words, with free plagiarism and AI-detection reports.

Order Your Model Assignment

Frequently Asked Questions

About Jesse Pinkman

Avatar for Jesse PinkmanJessie Pinkman has been writing since childhood when her mother gave her a book where she could write her stories. Since then Jessie has always loved to write about the topics she loves. She graduated from Birmingham University in 2012, worked as a teaching assistant, and then turned to full-time writing in 2016.

You May Also Like

WhatsApp Live Chat