Finding max/min using Lagrange Multipliers

STEMucator
Homework Helper
Messages
2,076
Reaction score
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
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.
 
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 \Rightarrow
0 = 2x(λ + 2) - 4λ
0 = x(λ + 2) - 2λ

Fy = 0 \Rightarrow
0 = 2y(λ + 1)
0 = y(λ + 1)

Fλ = 0 \Rightarrow
0 = x2 + y2 - 4x - 5
x2 = 4x + 5 - y2

Now here is where I'm not really sure what to do ^.
 
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 \Rightarrow
0 = 2x(λ + 2) - 4λ
0 = x(λ + 2) - 2λ

Fy = 0 \Rightarrow
0 = 2y(λ + 1)
0 = y(λ + 1)

Fλ = 0 \Rightarrow
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
 
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 \Rightarrow
0 = 2x(λ + 2) - 4λ
0 = x(λ + 2) - 2λ

Fy = 0 \Rightarrow
0 = 2y(λ + 1)
0 = y(λ + 1)

Fλ = 0 \Rightarrow
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

\left\{\begin{eqnarray}<br /> x(\lambda +2) &amp; = &amp; 2\lambda\\<br /> y(\lambda +1) &amp; = &amp; 0\\<br /> 5+4x-x^2 &amp; = &amp; y<br /> \end{eqnarray}\right.

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

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

    \left\{\begin{eqnarray}<br /> x(\lambda +2) &amp; = &amp; 2\lambda\\<br /> 5+4x-x^2 &amp; = &amp; 0<br /> \end{eqnarray}\right.

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

    \left\{\begin{eqnarray}<br /> -2 &amp; = &amp; x\\<br /> y &amp; = &amp; 5+4x-x^2<br /> \end{eqnarray}\right.

    Solve this equation.

Can you continue?
 
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

\left\{\begin{eqnarray}<br /> x(\lambda +2) &amp; = &amp; 2\lambda\\<br /> y(\lambda +1) &amp; = &amp; 0\\<br /> 5+4x-x^2 &amp; = &amp; y<br /> \end{eqnarray}\right.

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

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

    \left\{\begin{eqnarray}<br /> x(\lambda +2) &amp; = &amp; 2\lambda\\<br /> 5+4x-x^2 &amp; = &amp; 0<br /> \end{eqnarray}\right.

    Solve this equation.

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

    \left\{\begin{eqnarray}<br /> -2 &amp; = &amp; x\\<br /> y &amp; = &amp; 5+4x-x^2<br /> \end{eqnarray}\right.

    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?
 
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 f(x,y)=2x^2+y^2 and see which point gives the highest/lowest values.
 
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 f(x,y)=2x^2+y^2 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)?
 
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 y=5+4x-x^2, while it should of course be y^2=5+4x-x^2. I'm sorry, you'll need to solve the system of equations again.
 
  • #12
micromass said:
Oh no, I messed up. I wrote y=5+4x-x^2, while it should of course be y^2=5+4x-x^2. 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.
 
Back
Top