We solve the following constrained extremum problem by the use the method of Lagrange.
- Maximize z(x,y)=2xy+3y
- Subject to 4x+y=10
- Where x,y>0
L(x,y,λ)=2xy+3y−λ(4x+y−10)
We differentiate with respect to the variables x, y and λ:
- L′x(x,y,λ)=2y−4λ,
- L′y(x,y,λ)=2x+3−λ,
- L′λ(x,y,λ)=−4x−y+10.
We put the first-order partial derivatives equal to zero and solve the system of equations: L′x(x,y,λ)=2y−4λ=0 gives 12y=λ. We plug this into L′y(x,y,λ)=2x+3−λ=0, which gives 4x+6=y. We plug this into L′λ(x,y,λ)=4x+y−10=0, which gives x=12. This results in y=8 and λ=4. Since z(14,9)=3112 and z(1,6)=30 it holds that z(12,8)=32 is a maximum, with λ=4.