Lagrange Multipliers

PDF Download

The method of Lagrange multipliers uses the fact that any relative extremum of the function \(f(x,y)\) subject to the constraint \(g(x,y)=k\), if it exists, must occur at a critical point \((a,b)\) of the function

$$
F(x,y)=f(x,y)-\lambda[g(x,y)-k]
$$

where \(\lambda\) is a new variable (called the Lagrange multiplier). To find the critical points of \(F\),compute its partial derivatives:

$$
F_x=f_x-\lambda\boldsymbol{g}_x,\quad F_y=f_y-\lambda\boldsymbol{g}_y,\quad F_\lambda=-(\mathbf{g}-\boldsymbol{k}),
$$

and solve the equations \(F_x=0,F_y=0\), and \(F_{\lambda}=0\) simultaneously, as follows, to obtain three (Lagrange) equations:
 

\(F_{x}=f_{x}-\lambda g_{x}=0\quad\mathrm{or}\quad f_{x}=\lambda g_{x}\)

\(F_{y}=f_{y}-\lambda g_{y}=0\quad\mathrm{or}\quad f_{y}=\lambda g_{y}\)

\(F_{\lambda}=-(g-k)=0\quad\mathrm{or}\quad g=k\)

 

Finally, evaluate \(f(a,b)\) at each critical point \((a,b)\) of \(F_{\cdot}\)

Example

The highway department is planning to build a picnic area for motorists along a major highway. It is to be rectangular with an area of 5000 m2 and is to be fenced off on the three sides not adjacent to the highway. What is the least amount of fencing that will be needed to complete the job?

image

Solution

Label the sides of the picnic area as in the figure and let \(f\) denote the amount of fencing required.

Then, \(f(x,y)=x+2y\), and clearly, \(x,y>0.\)
The goal is to minimize \(f\) given the requirement that the area must be 5000 m\(^{2}\), that is, subject to the constraint
\(g(x,y)=xy=5000.\)

Find the partial derivatives:
\(f_x=1,\:f_y=2\), \(g_x=y\), and \(g_y=x.\)

Obtain the three Lagrange equations:
\(1=\lambda y,2=\lambda x\), and \(xy=5000.\)

From the first and second equations, 
\(\lambda=\frac1y\) and \(\lambda=\frac2x\) (since \(y\neq0\) and \(x\neq0\)) which implies that
\(\frac{1}{y}=\frac{2}{x}\mathrm{~or~}x=2y.\)

Now, substitute \(x=2y\) into the third Lagrange equation:
\(2y^{2}=5000\) or \(y=\pm50\), but use the positive value for length!

Substitute \(y=50\) into the equation \(x=2y\) to get that \(x=100.\)
Thus, the total amount of fencing needed is
100+50+50=200 m.


Example

Find the maximum and minimum values of the function \(f(x,y)=xy\) subject to the constraint \(x^2+y^2=8.\)

 

Solution

In this case, \(g(x,y)=x^2+y^2.\)

Find the partial derivatives: \(f_x=y,\:f_y=x,\:g_x=2x\), and \(g_y=2y.\)

Obtain the three Lagrange equations:
\(y=2\lambda x\), \(x=2\lambda y\), and \(x^2+y^2=8\), note that neither \(x\) nor \(y\) can be zero.

Rewrite the first two equations as
\(2\lambda=\frac yx\) and \(2\lambda=\frac xy\) which implies that \(\frac{y}{x}=\frac{x}{y}\) or \(y^2=x^2.\)

Now, substitute \(y^2=x^2\) into the third equation to get \(2x^2=8\) or \(x=\pm2.\)

If \(x=2\), it follows from equation \(x^2=y^2\) that \(y= 2\) or \(y= - 2.\)
If \(x=-2\), it follows from equation \(x^2=y^2\) that \(y= 2\) or \(y= - 2.\)

Hence, there are four points at which the constrained extrema can occur:
(2,2),(2,-2),(-2,2), and (-2,-2).

Since \(f(2,2)=f(-2,-2)=4\) and \(f(2,-2)=f(-2,-2)=-4\) it follows that when \(x^2+y^2=8\), the maximum value of \(f(x,y)\) is 4 at the points (2,2) and (2,-2), and the minimum value of \(f(x,y)\) is -4 at the points (-2,2) and (-2,-2).