We solve the following extremum problem by the use of the first-order condition.
  • Maximize $z(x,y)=2xy+3y$
  • Subject to $4x+y=10$
  • Where $x,y>0$
$\dfrac{z'_x(x,y)}{z'_y(x,y)}=\dfrac{g'_x(x,y)}{g'_y(x,y)}\Leftrightarrow \dfrac{2y}{2x+3} =\dfrac{4}{1}$. Hence, $y=4x+6$.

We plug this into the restriction: $4x+y=10$ then becomes $4x+4x+6=10$. Solving for $x$ gives $x=\frac{1}{2}$.

Hence, $y=4\cdot \frac{1}{2}+6=8$.

This gives $z(\frac{1}{2},8)=32$. We still have to check whether this is a maximum. We can do this by determining two feasible combinations of $x$ and $y$; one with a smaller $x$-value (and hence a larger $y$ value) and one with a larger $x$-value (and hence a smaller $y$-value).

Since $z(1,6)=30<32=z(\frac{1}{2},8)$ and $z(\frac{1}{4},9)=31\frac{1}{2}<32=z(\frac{1}{2},8)$ it holds that $z(\frac{1}{2},8)=32$ is a maximum.