Lagrange Multipliers

Introduction

Lagrange multipliers solve maximization problems subject to constraints.

The Essentials

To solve a Lagrange multiplier problem, first identify the objective function \( f(x,y) \) and the constraint function \( g(x, y). \) Second, solve this system of equations for \( x_0,y_0 \):

\[ \begin{cases} \nabla f(x_0,y_0)=\lambda\nabla g(x_0,y_0) \\ g(x_0,y_0)=0 \end{cases} \]

The largest values for \( f \) maximize the function and the smallest values for \( f \) minimize the function. The method is the same if \( f \) and \( g \) are functions of three variables. If there are two constrains (\( g \) and \( h \)) then the system of equations looks like this:

\[ \begin{cases} \nabla f(x_0,y_0)=\lambda_1g(x_0,y_0)+\lambda_2h(x_0,y_0) \\ g(x_0,y_0)=0 \\ h(x_0,y_0)=0 \\ \end{cases} \]

Example

Find the extrema of the function \( f(x,y,z)=yz+xz+xy \) subject to the constraints \( xy+z=\frac{1}{4} \).

The constraint function is solved for zero and set to zero:

\[ g(x,y,z)=xy+z-\frac{1}{4}=0 \]

Now, we find the gradients of the two functions:

\[ \nabla f=\langle y+z,x+z,x+y\rangle\nabla g=\langle y,x,1 \rangle \]

Now we can set up the system of equations:

\[ \begin{cases} \langle y+z,x+z,x+y\rangle=\lambda\langle y,x,1 \rangle \\ xy+z-\frac{1}{4}=0 \\ \end{cases} \]

We can split the first one into three equations from the \( i \), \( j \), and \( k \) components.

\[ \begin{cases} y+z=\lambda y \\ x+z=\lambda x \\ x+y=\lambda \\ xy+z-\frac{1}{4}=0 \\ \end{cases} \]

The lambda from the third equation can be substituted into the first two equations.

\[ \begin{cases} y+z=(x+y)y \\ x+z=(x+y)x \\ xy+z-\frac{1}{4}=0 \\ \end{cases} \]

The third equation can be solved for \( z \) and substituted into the first two equations.

\[ \begin{cases} y+\frac{1}{4}-xy=xy+y^2 \\ x+\frac{1}{4}-xy=x^2+xy \\ \end{cases} \]

Subtracting the first equation from the second equation gives:

\[ x-y=x^2-y^2 \]
\[ x-y=(x-y)(x+y) \]
\[ 1=x+y \]
\[ x=1-y \]

plugging this in and using the quadratic formula gives:

\[ \begin{cases} x=\frac{1}{2} \\ y=\frac{1}{2} \\ z=0 \end{cases} \]

The value for the point (\( \frac{1}{2} \),\( \frac{1}{2} \),0) is \( \frac{1}{4} \). Testing the points around it that fit on the constraint, we can see that it is a maximum.

Practice

Find the absolute extrema for the function \( f(x,y)=x^2-xy+y^2 \) subject to the constraint \( x+y=1 \)

Solution:

\( f \)(\( \frac{1}{2} \),\( \frac{1}{2} \))=\( \frac{1}{4} \) is a minimum