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,\lambda)=2xy+3y-\lambda(4x+y-10)$

We differentiate with respect to the variables $x$, $y$ and $\lambda$:

  • $L'_x(x,y,\lambda)=2y-4\lambda$,
  • $L'_y(x,y,\lambda)=2x+3-\lambda$,
  • $L'_{\lambda}(x,y,\lambda)=-4x-y+10$.

We put the first-order partial derivatives equal to zero and solve the system of equations: $L'_x(x,y,\lambda)=2y-4\lambda=0$ gives $\frac{1}{2}y=\lambda$. We plug this into $L'_y(x,y,\lambda)=2x+3-\lambda=0$, which gives $4x+6=y$. We plug this into $L'_{\lambda}(x,y,\lambda)=4x+y-10=0$, which gives $x=\frac{1}{2}$. This results in $y=8$ and $\lambda=4$. Since $z(\frac{1}{4},9)=31\frac{1}{2}$ and $z(1,6)=30$ it holds that $z(\frac{1}{2},8)=32$ is a maximum, with $\lambda=4$.