Lagrange Multiplier

Theorem 4..10   If $f(x,y)$ takes extrema at $x,y$ given the constraint $\phi(x,y) = 0$, Then let

$\displaystyle F(x,y,\lambda) = f(x,y) - \lambda \phi(x,y) $

and solve the follwing equations for $x,y$

$\displaystyle F_{\lambda}(x,y) = -\phi(x,y) = 0,  F_{x}(x,y) = 0,  F_{y}(x,y) = 0 $

Understanding
The constraint is $\phi(x,y) = 0$. Thus the set of real numbers $\{(x,y):\phi(x,y) = 0\}$ is a closed bounded set. Thus if $z = f(x,y)$ is continuous, then $z = f(x,y)$ takes either the maximum or minimum.
Implicit Function
$f(x,y)$ is the class $C^1$,
1. $f(x_0,y_0) = 0$
2. $f_y(x_0,y_0) \neq 0$.

NOTE Under the constraint $\phi(x,y) = 0$, we find the extrema of $f(x,y)$. As $\phi(x,y) = 0$, if $\phi_{y}(x,y) \neq 0$, then we can find the implicit function $y = g(x)$ satissfying $\phi(x,y) = 0$. If a function $z = f(x,g(x))$ takes the extrema at $(x_{0},y_{0})$, then $y_{0} = g(x_{0})$ and $z_{x} = 0$. Thus

$\displaystyle f_{x}(x_{0},y_{0}) + f_{y}(x_{0},y_{0})g^{\prime}(x_{0}) = 0. $

Now differentiate the both sides of the equation $\phi(x,y) = 0$ by $x$. Then

$\displaystyle \phi_{x}(x_{0},y_{0}) + \phi_{y}(x_{0},y_{0})g^{\prime}(x_{0}) = 0. $

Thus

$\displaystyle f_{x}(x_{0},y_{0}) - f_{y}(x_{0},y_{0})\frac{\phi_{x}(x_{0},y_{0})}{\phi_{y}(x_{0},y_{0})} = 0.$

Let

$\displaystyle \frac{f_{y}(x_{0},y_{0})}{\phi_{y}(x_{0},y_{0})} = \lambda$

Then there exists $\lambda$ satisying

$\displaystyle f_{x}(x_{0},y_{0}) - \lambda \phi_{x}(x_{0},y_{0}) = 0 $

Check
Solve for $g'(x)$, we have $g'(x) = -\frac{\phi_{x}(x_0,y_0)}{\phi_{y}(x_0,y_0)}$. Now substitute $g'(x)$ into $f_{x}(x_{0},y_{0}) + f_{y}(x_{0},y_{0})g^{\prime}(x_{0}) = 0$. Then $f_{x}(x_{0},y_{0}) - f_{y}(x_{0},y_{0})\frac{\phi_{x}(x_{0},y_{0})}{\phi_{y}(x_{0},y_{0})} = 0$.

Gradient
$\nabla \phi(x,y) = (\phi_x, \phi_y)$ is called gradient.

If we think of this theorem geometrically. Since $\phi(x,y) = 0$, the vector $\nabla \phi(x,y) = (\phi_{x}(x,y), \phi_{y}(x,y))$ is orthogonal to the curve $\phi(x,y) = 0$. Let $C$ be the curve defined by the constraint $\phi(x,y) = 0$ and $(x(t),y(t))$ is a point on $C$. If a function $z = f(x,y)$ takes the extrema at $(x(t_0),y(t_0))$, then

$\displaystyle \frac{df(x(t),y(t))}{dt}\mid_{t_0}$ $\displaystyle =$ $\displaystyle f_{x}(x(t),y(t)\frac{dx}{dt} + f_{y}(x(t),y(t))\frac{dy}{dt}\mid_{t_0}$  
  $\displaystyle =$ $\displaystyle (f_{x}(x(t_0),y(t_0)),f_{y}(x(t_0),y(t_0)))\cdot (\frac{dx}{dt},\frac{dy}{dt})\mid_{t_0} = 0.$  

Thua, the vector $\nabla(f(x(t_0),y(t_0))$ is orthogonal to the curve $C$. Then $\nabla \phi(x_{t_0},y_{t_0})$ and $\nabla f(x_{t_0},y_{t_0})$ are parallel. Thus, there exists $\lambda$ so that

$\displaystyle \nabla f(x,y) = \lambda \nabla \phi(x,y) $

Parallel
Note that $\nabla \phi(x_{0},y_{0})$ and $\nabla f(x_{0},y_{0})$ are parallel, then $\nabla \phi(x_{0},y_{0}) \times \nabla f(x_{0},y_{0}) = \boldsymbol{k}\left\ver...
...}
\phi_{x} & \phi_{y} \\
f_{x} & f_{y}
\end{array}\right \vert = {\textbf 0}. $

Example 4..22   Find the maxima and minima of the following function with the constraint $\phi(x,y) = 0$.
1. $\displaystyle{\phi(x,y) = x^2 + y^2 - 4, f(x,y) = 3x^2 + 4xy + 3y^2}$
2. $\displaystyle{\phi(x,y) = x^2 - xy + y^2 - 1, f(x,y) = xy}$

1. $\phi(x,y) = x^2 + y^2 - 4 = 0,  f(x,y) = 3x^2 + 4xy + 3y^2$. Let

$\displaystyle F(x,y,\lambda) = 3x^2 + 4xy + 3y^2 - \lambda(x^2 + y^2 - 4 ) $

Then
$\displaystyle F_{\lambda} = 0  \Rightarrow  x^2 + y^2 - 4 = 0$     (4.5)
$\displaystyle F_{x} = 0  \Rightarrow  6x + 4y - 2x\lambda = 2(3-\lambda)x + 4y = 0F_{y} = 0  \Rightarrow  4x + 6y - 2y\lambda = 4x + (6-2\lambda)y = 0$     (4.6)

Using $F_x = 0$, $F_y = 0$, and $\phi(x,y) = 0$, first find a $\lambda$.

SOLUTION

Check
$F_x = 6x + 4y - \lambda(2x) = 2x(3 - \lambda) + 4y$
$F_y = 4x + 6y - \lambda(2y) = 4x + 2y(3 - \lambda)$

$(x,y) = (0,0)$ does not satisfy the equation 4.5. Then the condition that the equations 4.6 and 4.6 have solutions $(x,y)$ not equal to $\neq (0,0)$,

$\displaystyle \left\vert\begin{array}{cc}
3- \lambda & 2\\
2 & 3-\lambda
\end{...
...}\right \vert = (3-\lambda)(3-\lambda) - 22. = \lambda^2 - 6\lambda + 9 -4 = 0 $

Thus, $\lambda^2 -6\lambda + 5 = 0$ and $\lambda = 1, 5$.

For $\lambda = 1$, by the equation 4.6, $4x + 4y = 0$ and $y = -x$. Substitute $y = -x$ into the equation 4.5, we have $x^2 + x^2 - 4 = 0$ and $x = \pm \sqrt{2}$. Since $y = -x$, we have $(x,y) = (\sqrt{2},-\sqrt{2}), (-\sqrt{2},\sqrt{2})$. With these $x,y$, the value of $3x^2 + 4xy + 3y^2$ is 4.

For $\lambda = 5$, by the equation 4.6, $-4x + 4y = 0$ and $y = x$. Substitute $y = x$ into the equation 4.5. Then $x^2 + x^2 - 4 = 0$ which implies $x = \pm \sqrt{2}$. Since $y = x$, $(x,y) = (\sqrt{2},\sqrt{2}), (-\sqrt{2}, -\sqrt{2})$. With these $x,y$, the value of $3x^2 + 4xy + 3y^2$ is $20$.

Check
$3(\sqrt{2})^2 + 4\sqrt{2}(\sqrt{2}) + 3(\sqrt{2})^2 = 6 + 8 + 6 = 20$

On the other hand, $\{(x,y): x^2 + y^2 = 4\}$ is closed bounded region, and on this region, $3x^2 + 4xy + 3y^2$ is continuous, thus takes the extrema. these are also local extrema. Thus by the result above, the extrema must be 4 or 20. Therefore, the maximum value is 20 and the minimum value is 4 $ \blacksquare$

2. Note that $\phi(x,y) = x^2 -xy + y^2 - 1 = 0,  f(x,y) = xy$. Then let

$\displaystyle F(x,y,\lambda) = xy - \lambda(x^2 -xy + y^2 - 1) $


$\displaystyle F_{\lambda} = 0  \Rightarrow  x^2 - xy + y^2 - 1 = 0$     (4.7)
$\displaystyle F_{x} = 0  \Rightarrow  y - \lambda(2x -y) = -2\lambda x + (1+\...
...= 0F_{y} = 0  \Rightarrow  x - \lambda(-x+2y) = (1+\lambda)x - 2\lambda y = 0$     (4.8)

Check
$F_x = y - \lambda(2x -y) = -2\lambda x + (1+\lambda )y = 0$
$F_y = x - \lambda(-x+2y) = 0 = (1+\lambda)x - 2\lambda y = 0$

System of Equation
A sysytem of 1st order linear equation
$\left\{\begin{array}{c}
ax + by = 0\\
cx + dy = 0
\end{array}\right.$ has no solution if and only if $\left\vert\begin{array}{cc}
a & b\\
c & d
\end{array}\right\vert = 0$

Now $(x,y) = (0,0)$ does not satisy the equation 4.7. Then the condition for the equation 4.8), (4.8) has the solution $(x,y) \neq (0,0)$,

$\displaystyle \left\vert\begin{array}{cc}
-2\lambda & 1+\lambda\\
1+\lambda & -2\lambda
\end{array}\right \vert$ $\displaystyle =$ $\displaystyle -2\lambda(-2\lambda) - (1+ \lambda)^2 = 4\lambda^2 - \lambda^2 - 2\lambda -1$  
  $\displaystyle =$ $\displaystyle 3\lambda^2 - 2\lambda -1 = (3\lambda + 1)(\lambda -1) = 0$  

Thus, $\lambda = -\frac{1}{3}, 1$.

For $\lambda = -\frac{1}{3}$, by the equation 4.8, $\frac{2}{3}x + \frac{2}{3}y = 0$ and $y = -x$. Substitute $y = -x$ into the equation 4.7. Then $x^2 + x^2 + x^2 - 1 = 0$. From this, $x = \pm \frac{1}{3}$. Since $y = -x$, $(x,y) = (\frac{1}{3},-\frac{1}{3}), (-\frac{1}{3},\frac{1}{3})$. Now the value of $xy$ for these values of $x,y$ is $-\frac{1}{9}$.

For $\lambda = 1$, by the equation 4.8, $2y - 2x = 0$ and $y = x$. Substitute $y = x$ into the equation4.7. Then $x^2 -x^2 + x^2 - 1 = 0$. From this, $x = \pm 1$. Since $y = x$, $(x,y) = (1,1), (-1, -1)$. Now the valuesof $xy$ for these values of $x,y$ is $1$.

On the other hand, $\{(x,y): x^2 -xy + y^2 = 1\}$ is closed bounded region, and on this region, $x^2 -xy + y^2$ is continuous, thus takes the extrema. these are also local extrema. Thus by the result above, the extrema must be $-\frac{1}{9}$ or 1. Therefore, the maximum value is 1 and the minimum value is $-\frac{1}{9}$ $ \blacksquare$

Exercise 4..22   Find the shortest distance from $(1,-1,2)$ to the surface $\displaystyle{x^2 - 2y + 2z -10 = 0}$.

SOLUTION Let $f(x,y,z)$ be the distance from the point $(1,-1,2)$ to an arbitrary point on the surface. Then minimize $f^{2}$.

$\displaystyle \left\{\begin{array}{c}
f^2 = (x-1)^2 + (y+1)^2 + (z-2)^2 \\
x^{2}-2y+2z -10 = 0
\end{array}\right . $

Let

$\displaystyle F(x,y,z,\lambda) = (x-1)^2 + (y+1)^2 + (z-2)^2 - \lambda(x^{2}-2y+2z -10) $

Then
$\displaystyle F_{\lambda} = 0  \Rightarrow   x^{2}-2y+2z -10 = 0$     (4.9)
$\displaystyle F_{x} = 0  \Rightarrow   2(x-1) - 2x \lambda = 0$     (4.10)
$\displaystyle F_{y} = 0  \Rightarrow   2(y+1) + 2\lambda = 0$     (4.11)
$\displaystyle F_{z} = 0  \Rightarrow   2(z-2) - 2\lambda = 0$     (4.12)

By the equations 4.10, 4.11, 4.12, we have

$\displaystyle x = \frac{1}{1-\lambda}, y = -1-\lambda, z = 2+\lambda$

Putting these values into 4.9,

$\displaystyle (\frac{1}{1-\lambda})^{2} -2(-1-\lambda)+2(2+\lambda) - 10 =0 $

Thus

$\displaystyle \left(\frac{1}{1 - \lambda}\right)^2 = 4(1 - \lambda) $

Now solve this for $\lambda$ to get

$\displaystyle \lambda = 1 - \left(\frac{1}{2}\right)^{2/3} $

Thus,

$\displaystyle x = 2^{2/3},  y = -2 + \left(\frac{1}{2}\right)^{2/3},  z = 3 - \left(\frac{1}{2}\right)^{2/3} $

Note that this point is on the surface. Since the value of $f^{2}$ is not bounded above. Thus this is the local minimum. Furthermore, it is only one. Thus, it is the minimum value $ \blacksquare$

Check
$(\frac{1}{1-\lambda})^{2} -2(-1-\lambda)+2(2+\lambda) - 10 = (\frac{1}{1-\lambda})^{2} +2 + 2\lambda + 4 + 2\lambda -10 = (\frac{1}{1-\lambda})^{2} -4 + 4\lambda$

Check
$\left(\frac{1}{1 - \lambda}\right)^2 = 4(1 - \lambda)$, $4(1-\lambda)^3 = 1$. $(1-\lambda)^3 = \frac{1}{4}$. $1-\lambda = (\frac{1}{4})^{\frac{1}{3}}$. $\lambda = 1 - (\frac{1}{2})^{2/3}$.

Exercise A


1.
Find the maxima and the minimua of $f(x,y)$ with the constraint $g(x,y) = 0$

(a) $\displaystyle{g(x,y) = x^2 + y^2 - 1,  f(x,y) = x^{2} + 3y^2}$

(b) $\displaystyle{g(x,y) = x^2 + y^2 - 4,  f(x,y) = x^2 + y^2 - 2x}$

(c) $\displaystyle{g(x,y) = x^2 + y^2 - 1,  f(x,y) = xy + x + y}$

2.
Find the shortest distance from the origin to the curve $x^{2} + xy + y^{2} = \frac{1}{4}$

Exercise B


1.
Find the local extrema of the functions $y = g(x)$ implicitly defined by the following functions .

(a) $\displaystyle{8x^2 +4xy + 5y^2 = 36}$ (b) $\displaystyle{x^{2}y + x + y = 0}$ (c) $\displaystyle{x^3 + y^3 - 6xy = 0}$

2.
Find the maxima and minima of $f(x,y)$ with the constraint $g(x,y) = 0$

(a) $\displaystyle{g(x,y) = x^2 + y^2 - 1,  f(x,y) = xy^3}$

(b) $\displaystyle{g(x,y) = x^3 + y^3 - 6xy,  f(x,y) = x^2 + y^2}$

(c) $\displaystyle{g(x,y) = x^2 - xy + y^2 - 1,  f(x,y) = xy}$

3.
Find the maxima of $xy$ for if the point ${\rm P}(x,y)$ moves on the line $2x + 3y = 12$
4.
Find the maxima and minima of $x^2 + 2y^2 + 3z^2$ for if the point ${\rm P}(x,y,z)$ moves on the surface $x^2 + y^2 + z^2 = 1$.