Lagrange Multipliers

You can use Lagrange multipliers to find constrained optima. To find extreme values of f (x, y) subject to a constraint g(x, y) = k, it is sufficient to find all values of x, y, and λ such that

f (x, y) = λg(x, y)

and g(x, y) = k where ∇ is the gradient operator

f (x, y) = $\displaystyle \left(\vphantom{
\frac{\partial f}{\partial x}(x,y),\frac{\partial f}{\partial y}(x,y)}\right.$$\displaystyle {\frac{{\partial f}}{{\partial x}}}$(x, y),$\displaystyle {\frac{{\partial f}}{{\partial y}}}$(x, y)$\displaystyle \left.\vphantom{
\frac{\partial f}{\partial x}(x,y),\frac{\partial f}{\partial y}(x,y)}\right)$

The variable λ is called the Lagrange multiplier.


\begin{example}
Let $f(x,y)=xy$\ and $g(x,y)=x+y$. Then
\begin{displaymath}
...
...roduct is as large as possible are given by $x=5/2$\ and $y=5/2$.
\end{example}


\begin{example}
Define $f(x,y)=x+2y$\ and $g(x,y)=ye^{x}+xe^{y}$. Then
\begin...
...e for $f(x,y)$\ satisfying the constraint $%
g(x,y)=5$.\medskip
\end{example}