Maths WorkshopMaths problems with full solutions
Exercise 734Calculus › Multivariable calculus › Optimisation in several variablesL2Added 2 Nov 2026

Optimisation under a linear constraint

#Lagrange#linear constraint#minimum

Statement

Minimize f(x,y)=x2+y2f(x,y) = x^2 + y^2 under the constraint x+2y=5x + 2y = 5.

Hint

Lagrange with g(x,y)=x+2y−5g(x,y) = x+2y-5. The Lagrangian L=x2+y2−λ(x+2y−5)L = x^2+y^2 - \lambda(x+2y-5) is convex, so the critical point is a global minimum.

Show solutionHide solution

Solution

Lagrange system.
{2x=λ2y=2λx+2y=5\begin{cases} 2x = \lambda \\ 2y = 2\lambda \\ x + 2y = 5 \end{cases}

Resolution. From the first equation, λ=2x\lambda = 2x. From the second, 2y=4x2y = 4x, so y=2xy = 2x. Substituting into the constraint:
x+4x=5  ⟹  5x=5  ⟹  x=1,y=2.x + 4x = 5 \implies 5x = 5 \implies x = 1, \quad y = 2.

Conclusion. The minimum is at (1,2)(1,2), with f(1,2)=1+4=5f(1,2) = 1 + 4 = 5. It is indeed a global minimum because the Lagrangian is convex (sum of squares and a linear form).