Finding max/min using Lagrange Multipliers

In summary: Solve this equation.So in summary, the maximum and minimum values of 2x2 + y2 are at (0, -1) and (1, -1), respectively.
  • #1
STEMucator
Homework Helper
2,076
140

Homework Statement



Find the maximum and minimum values of 2x2 + y2 on the curve x2 + y2 - 4x = 5 by the method of Lagrange Multipliers.

Homework Equations



I will express my Lagrange multipliers as λ.

The Attempt at a Solution



Okay so we want the max min of f(x,y) = 2x2 + y2 given the constraint that : x2 + y2 - 4x = 5.

So the first thing I want to note is I can express my constraint in terms of a function g = x2 + y2 - 4x - 5. I believe that the max or min will occur somewhere on my constraint which happens to be a boundary. Since I don't have any interior to examine, I don't even need to know critical points of f. So the first thing I should do is form my Lagrange equation :

F = f + λg = 2x2 + y2 + λ(x2 + y2 - 4x - 5)

Now I should take the derivative of big F with respect to x, y and then λ and form a system of equations right?

Is this good so far? ( First time trying one of these myself ).
 
Physics news on Phys.org
  • #2
Zondrina said:

Homework Statement



Find the maximum and minimum values of 2x2 + y2 on the curve x2 + y2 - 4x = 5 by the method of Lagrange Multipliers.

Homework Equations



I will express my Lagrange multipliers as λ.

The Attempt at a Solution



Okay so we want the max min of f(x,y) = 2x2 + y2 given the constraint that : x2 + y2 - 4x = 5.

So the first thing I want to note is I can express my constraint in terms of a function g = x2 + y2 - 4x - 5. I believe that the max or min will occur somewhere on my constraint which happens to be a boundary. Since I don't have any interior to examine, I don't even need to know critical points of f. So the first thing I should do is form my Lagrange equation :

F = f + λg = 2x2 + y2 + λ(x2 + y2 - 4x - 5)

Now I should take the derivative of big F with respect to x, y and then λ and form a system of equations right?

Is this good so far? ( First time trying one of these myself ).

Yes, that is already good so far. Now you will need to calculate partial derivatives and find a system of equations.
 
  • #3
Um okay. So I take all my derivatives :

Fx = 4x + 2λx - 4λ = 2x(λ + 2) - 4λ
Fy = 2y + 2yλ = 2y(λ + 1)
Fλ = x2 + y2 - 4x - 5

Now I find my equations so I can find my values for λ afterwards.

Fx = 0 [itex]\Rightarrow[/itex]
0 = 2x(λ + 2) - 4λ
0 = x(λ + 2) - 2λ

Fy = 0 [itex]\Rightarrow[/itex]
0 = 2y(λ + 1)
0 = y(λ + 1)

Fλ = 0 [itex]\Rightarrow[/itex]
0 = x2 + y2 - 4x - 5
x2 = 4x + 5 - y2

Now here is where I'm not really sure what to do ^.
 
  • #4
Zondrina said:
Um okay. So I take all my derivatives :

Fx = 4x + 2λx - 4λ = 2x(λ + 2) - 4λ
Fy = 2y + 2yλ = 2y(λ + 1)
Fλ = x2 + y2 - 4x - 5

Now I find my equations so I can find my values for λ afterwards.

Fx = 0 [itex]\Rightarrow[/itex]
0 = 2x(λ + 2) - 4λ
0 = x(λ + 2) - 2λ

Fy = 0 [itex]\Rightarrow[/itex]
0 = 2y(λ + 1)
0 = y(λ + 1)

Fλ = 0 [itex]\Rightarrow[/itex]
0 = x2 + y2 - 4x - 5
x2 = 4x + 5 - y2

Now here is where I'm not really sure what to do ^.

Pretend, for the moment, that you already know λ. How would you find x and y? Do they satisfy the constraint?

RGV
 
  • #5
Zondrina said:
Um okay. So I take all my derivatives :

Fx = 4x + 2λx - 4λ = 2x(λ + 2) - 4λ
Fy = 2y + 2yλ = 2y(λ + 1)
Fλ = x2 + y2 - 4x - 5

Now I find my equations so I can find my values for λ afterwards.

Fx = 0 [itex]\Rightarrow[/itex]
0 = 2x(λ + 2) - 4λ
0 = x(λ + 2) - 2λ

Fy = 0 [itex]\Rightarrow[/itex]
0 = 2y(λ + 1)
0 = y(λ + 1)

Fλ = 0 [itex]\Rightarrow[/itex]
0 = x2 + y2 - 4x - 5
x2 = 4x + 5 - y2

Now here is where I'm not really sure what to do ^.

So you got the following system of equations

[tex]\left\{\begin{eqnarray}
x(\lambda +2) & = & 2\lambda\\
y(\lambda +1) & = & 0\\
5+4x-x^2 & = & y
\end{eqnarray}\right.[/tex]

From the second equation we can already deduce [itex]y=0[/itex] or [itex]\lambda=-1[/itex]
So we can split up in two cases:

  • Case I: y=0
    In this case, the equations reduce to

    [tex]\left\{\begin{eqnarray}
    x(\lambda +2) & = & 2\lambda\\
    5+4x-x^2 & = & 0
    \end{eqnarray}\right.[/tex]

    Solve this equation.
  • Case II: λ=-1
    In this case, we get

    [tex]\left\{\begin{eqnarray}
    -2 & = & x\\
    y & = & 5+4x-x^2
    \end{eqnarray}\right.[/tex]

    Solve this equation.

Can you continue?
 
  • #6
Ray Vickson said:
Pretend, for the moment, that you already know λ. How would you find x and y? Do they satisfy the constraint?

RGV

micromass said:
So you got the following system of equations

[tex]\left\{\begin{eqnarray}
x(\lambda +2) & = & 2\lambda\\
y(\lambda +1) & = & 0\\
5+4x-x^2 & = & y
\end{eqnarray}\right.[/tex]

From the second equation we can already deduce [itex]y=0[/itex] or [itex]\lambda=-1[/itex]
So we can split up in two cases:

  • Case I: y=0
    In this case, the equations reduce to

    [tex]\left\{\begin{eqnarray}
    x(\lambda +2) & = & 2\lambda\\
    5+4x-x^2 & = & 0
    \end{eqnarray}\right.[/tex]

    Solve this equation.

  • Case II: λ=-1
    In this case, we get

    [tex]\left\{\begin{eqnarray}
    -2 & = & x\\
    y & = & 5+4x-x^2
    \end{eqnarray}\right.[/tex]

    Solve this equation.

Can you continue?

Since you graciously murdered more than half the problem for me, let's see If I can finish it off.

In case I where y=0, the first thing I would do is factor the second equation giving me either x = -1 or x = 5. So going back to the first equation, x = -1 yields λ = -2/3 and x = 5 yields λ = -10/3.

So I would continue to the case II where λ = -1, yielding x = -2 which I can use to solve the equation right under it giving me y = -7.

Is this what you meant?
 
  • #7
Zondrina said:
Since you graciously murdered more than half the problem for me, let's see If I can finish it off.

In case I where y=0, the first thing I would do is factor the second equation giving me either x = -1 or x = 5. So going back to the first equation, x = -1 yields λ = -2/3 and x = 5 yields λ = -10/3.

So I would continue to the case II where λ = -1, yielding x = -2 which I can use to solve the equation right under it giving me y = -7.

Is this what you meant?

Yes, so you get the answers (-1,0), (5,0) and (-2,-7). These are the candidates for maximum and minimum. To see which one is the maximum/minimum, just plug them in in [itex]f(x,y)=2x^2+y^2[/itex] and see which point gives the highest/lowest values.
 
  • #8
micromass said:
Yes, so you get the answers (-1,0), (5,0) and (-2,-7). These are the candidates for maximum and minimum. To see which one is the maximum/minimum, just plug them in in [itex]f(x,y)=2x^2+y^2[/itex] and see which point gives the highest/lowest values.

Ahhh the way that works is amazing! So :

f(x,y) = 2x2 + y2
f(-1, 0) = 2
f(5, 0) = 50
f(-2, -7) = 8 + 49 = 56

So my local maximum would occur at (-2, -7) and my local minimum would occur at (-1, 0).

The only thing though... is that I notice that (-1, 0) satisfies my constraint while (-2, -7) surely does not. So would that imply I have only an absolute minimum at (-1, 0)?
 
  • #9
Zondrina said:
Ahhh the way that works is amazing! So :

f(x,y) = 2x2 + y2
f(-1, 0) = 2
f(5, 0) = 50
f(-2, -7) = 8 + 49 = 56

So my local maximum would occur at (-2, -7) and my local minimum would occur at (-1, 0).

The only thing though... is that I notice that (-1, 0) satisfies my constraint while (-2, -7) surely does not. So would that imply I have only an absolute minimum at (-1, 0)?

I don't get what you mean with (-1,0) satisfies the constraint while (-2,-7) doesn't. Which constraint?
 
  • #10
From my original problem statement, I'm given that I have to find the min/max values of f(x,y) along the path :

x2 + y2 - 4x = 5 ( The constraining condition )

Does it not matter my particular points do not satisfy this condition?

If so, then I'm assuming the constraint only allows me to find my big F = f + λg which would then allow me to find my system of equations after I take the required partials.
 
  • #11
Zondrina said:
From my original problem statement, I'm given that I have to find the min/max values of f(x,y) along the path :

x2 + y2 - 4x = 5 ( The constraining condition )

Does it not matter my particular points do not satisfy this condition?

If so, then I'm assuming the constraint only allows me to find my big F = f + λg which would then allow me to find my system of equations after I take the required partials.

Oh no, I messed up. I wrote [itex]y=5+4x-x^2[/itex], while it should of course be [itex]y^2=5+4x-x^2[/itex]. I'm sorry, you'll need to solve the system of equations again.
 
  • #12
micromass said:
Oh no, I messed up. I wrote [itex]y=5+4x-x^2[/itex], while it should of course be [itex]y^2=5+4x-x^2[/itex]. I'm sorry, you'll need to solve the system of equations again.

I knew something was up :(. Okay so let's re-do this.

Case I where y = 0 is still perfect. No problems there.

Now for Case II where λ=-1. We get x = -2 which we can use to solve the second equation to get : y2 = -7, but uh oh, we're working in ℝ2 so this means nothing to us!

Thus the only points to consider would be (-1, 0) and (5, 0) which yield :

f(-1, 0) = 2
f(5, 0) = 50

So a local min occurs at (-1, 0) and a local max occurs at (5, 0) which both satisfy the constraint as desired.

So my suspicion was correct about my points having to satisfy my constraint equation?
 
  • #13
Zondrina said:
I knew something was up :(. Okay so let's re-do this.

Case I where y = 0 is still perfect. No problems there.

Now for Case II where λ=-1. We get x = -2 which we can use to solve the second equation to get : y2 = -7, but uh oh, we're working in ℝ2 so this means nothing to us!

Thus the only points to consider would be (-1, 0) and (5, 0) which yield :

f(-1, 0) = 2
f(5, 0) = 50

So a local min occurs at (-1, 0) and a local max occurs at (5, 0) which both satisfy the constraint as desired.

Seems right.

So my suspicion was correct about my points having to satisfy my constraint equation?

Yes, you were correct to be suspicious :)
 
  • #14
Yay :) thanks so much for all your help. I think I really understand this now so I should be good to go for anything involving this.
 

FAQ: Finding max/min using Lagrange Multipliers

What is the concept behind using Lagrange Multipliers to find max/min?

Lagrange Multipliers is a mathematical technique used to find the maximum or minimum value of a function subject to constraints. It involves using a Lagrange multiplier, which is a scalar value, to incorporate the constraints into the objective function.

How do you set up the equations for finding max/min using Lagrange Multipliers?

To set up the equations, the objective function (usually denoted by f) is multiplied by the Lagrange multiplier (usually denoted by λ). The constraints are also multiplied by their corresponding Lagrange multipliers. The resulting equations are then solved simultaneously to find the optimal values of the variables.

Can Lagrange Multipliers be used to find both maximum and minimum values?

Yes, Lagrange Multipliers can be used to find both maximum and minimum values. The Lagrange multiplier method can be used to find the optimal values of variables in constrained optimization problems, regardless of whether the objective function is to be maximized or minimized.

What are the advantages of using Lagrange Multipliers compared to other optimization techniques?

One advantage of using Lagrange Multipliers is that it can handle a wide range of constraints, including equality and inequality constraints. It also provides a systematic approach to solving constrained optimization problems. Additionally, it can be used with functions of multiple variables, making it applicable to many real-world problems.

Are there any limitations to using Lagrange Multipliers for finding max/min?

One limitation of using Lagrange Multipliers is that it can become computationally intensive for problems with a large number of variables and constraints. Additionally, it may not always provide a global optimum, as it only considers local extrema. Other methods, such as gradient descent, may be more suitable for finding global optima.

Back
Top