Solving Lagrange multiplier problems with two dimensions and one constraint

 
 
Two dimensions, one constraint blog post.jpeg
 
 
 

Lagrange multipliers with multivariable functions and one constraint equation

We already know how to find critical points of a multivariable function and use the second derivative test to classify those critical points.

But sometimes we’re asked to find and classify the critical points of a multivariable function that’s subject to a secondary constraint equation.

Krista King Math.jpg

Hi! I'm krista.

I create online courses to help you rock your math class. Read more.

 
 
function and constraint equations
 

To find the critical points of a function like this one, we can use the Lagrange Multiplier λ\lambda (lambda) to develop a system of simultaneous equations that will allow us to solve for critical points. We’ll follow these steps:

  1. Bring the constant cc in g(x,y)g(x,y) over to the left-hand side, so that you end up with two functions in the same form, f(x,y)=...f(x,y)=... and g(x,y)=...g(x,y)=....

  2. Take the partial derivatives of f(x,y)f(x,y) and g(x,y)g(x,y).

  3. Multiply the partial derivatives of g(x,y)g(x,y) by λ\lambda.

  4. Create the system of simultaneous equations fx=gxλ\frac{\partial{f}}{\partial{x}}=\frac{\partial{g}}{\partial{x}}\lambda and fy=gyλ\frac{\partial{f}}{\partial{y}}=\frac{\partial{g}}{\partial{y}}\lambda

  5. Solve both equations for λ\lambda, then set them equal to each other.

  6. Solve for one variable in terms of the other, then plug into the original constraint equation to find values for both xx and yy.

  7. Use the second derivative test to classify the critical point.

D(x,y,λ)=2fx22fy2(2fxy)2D(x,y,\lambda)=\frac{\partial^2{f}}{\partial{x^2}}\cdot\frac{\partial^2{f}}{\partial{y^2}}-\left(\frac{\partial^2{f}}{\partial{x}\partial{y}}\right)^2

If D(x,y)<0D(x,y)<0, then ff has a saddle point at (x,y)(x,y)

If D(x,y)=0D(x,y)=0, then the test is inconclusive

If D(x,y)>0D(x,y)>0 and

2fx2(x,y)>0\frac{\partial^2{f}}{\partial{x^2}}(x,y)>0, then ff has a local minimum at (x,y)(x,y)

2fx2(x,y)<0\frac{\partial^2{f}}{\partial{x^2}}(x,y)<0, then ff has a local maximum at (x,y)(x,y)

 
 

How to solve for the extrema of a multivariable function, subject to one constraint equation


 
Krista King Math Signup.png
 
Calculus 3 course.png

Take the course

Want to learn more about Calculus 3? I have a step-by-step course for that. :)

 
 

 
 

Finding the extrema of the function, given one constraint equation

Example

Find the maximum and minimum of the function with the constraint 2y4x=242y-4x=24.

f(x,y)=x2+2y2120f(x,y)=x^2+2y^2-120

f(x,y)f(x,y) is the function, and it’s subject to the constraint 2y4x=242y-4x=24.

We need to set the constraint equation equal to 00 so that we can get it into the same form as our function, setting it equal to g(x,y)g(x,y).

2y4x24=02y-4x-24=0

g(x,y)=2y4x24g(x,y)=2y-4x-24

Now we can find the partial derivatives of the function f(x,y)f(x,y) and the constraint equation g(x,y)g(x,y).

For f(x,y)f(x,y):

fx=2x\frac{\partial{f}}{\partial{x}}=2x

and

fy=4y\frac{\partial{f}}{\partial{y}}=4y

For g(x,y)g(x,y):

gx=4\frac{\partial{g}}{\partial{x}}=-4

and

gy=2\frac{\partial{g}}{\partial{y}}=2

We’ll multiply the partial derivatives of the constraint equation by λ\lambda, and get

gxλ=4λ\frac{\partial{g}}{\partial{x}}\lambda=-4\lambda

and

gyλ=2λ\frac{\partial{g}}{\partial{y}}\lambda=2\lambda

Next, we create this system of simultaneous equations:

fx=gxλ\frac{\partial{f}}{\partial{x}}=\frac{\partial{g}}{\partial{x}}\lambda

2x=4λ2x=-4\lambda

λ=x2\lambda=-\frac{x}{2}

and

fy=gyλ\frac{\partial{f}}{\partial{y}}=\frac{\partial{g}}{\partial{y}}\lambda

4y=2λ4y=2\lambda

λ=2y\lambda=2y

With two equations for λ\lambda, we can set them equal to one another, and then solve for yy in terms of xx.

2y=x22y=-\frac{x}{2}

y=x4y=-\frac{x}{4}

Plugging this yy-value into the constraint equation and solving for xx, we get

2y4x=242y-4x=24

2(x4)4x=242\left(-\frac{x}{4}\right)-4x=24

x24x=24-\frac{x}{2}-4x=24

x8x=48-x-8x=48

9x=48-9x=48

x=489x=-\frac{48}{9}

Now we can plug this real-number value of xx into the equation to find a real-number value of yy.

2y4(489)=242y-4\left(-\frac{48}{9}\right)=24

2y+1929=242y+\frac{192}{9}=24

2y+643=242y+\frac{64}{3}=24

6y+64=726y+64=72

6y=86y=8

y=43y=\frac43

This tells us that our single critical point is

(489,43)\left(-\frac{48}{9},\frac43\right)

Two dimensions one constraint for Calculus 3.jpg

To find the critical points of a function like this one, we can use the Lagrange Multiplier lambda to develop a system of simultaneous equations that will allow us to solve for critical points.

Now we need to use the second derivative test to classify this critical point. To do so, we’ll find the second-order partial derivatives of ff.

2fx2=2\frac{\partial^2{f}}{\partial{x^2}}=2

2fy2=4\frac{\partial^2{f}}{\partial{y^2}}=4

2fxy=0\frac{\partial^2{f}}{\partial{x}\partial{y}}=0

Plug the second-order partial derivatives into the second derivative test formula.

D(x,y,λ)=2fx22fy2(2fxy)2D(x,y,\lambda)=\frac{\partial^2{f}}{\partial{x^2}}\cdot\frac{\partial^2{f}}{\partial{y^2}}-\left(\frac{\partial^2{f}}{\partial{x}\partial{y}}\right)^2

D(x,y,λ)=(2)(4)(0)2D(x,y,\lambda)=(2)(4)-(0)^2

D(x,y,λ)=8D(x,y,\lambda)=8

Since we have no variables remaining in D(x,y,λ)D(x,y,\lambda), this means we’ll have the same result for all possible points. Because D>0D>0, we have to look at 2f/x2\partial^2{f}/\partial{x^2}.

2fx2(489,43)=2\frac{\partial^2{f}}{\partial{x^2}}\left(-\frac{48}{9},\frac43\right)=2

Since 2>02>0, the function has a local minimum at this critical point.

 
Krista King.png
 

Get access to the complete Calculus 3 course