Finding max/min using Lagrange Multipliers

  • Thread starter STEMucator
  • Start date
  • #1
STEMucator
Homework Helper
2,075
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 ).
 

Answers and Replies

  • #2
22,089
3,290

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
STEMucator
Homework Helper
2,075
140
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
Ray Vickson
Science Advisor
Homework Helper
Dearly Missed
10,706
1,728
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
22,089
3,290
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
STEMucator
Homework Helper
2,075
140
Pretend, for the moment, that you already know λ. How would you find x and y? Do they satisfy the constraint?

RGV
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, lets 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
22,089
3,290
Since you graciously murdered more than half the problem for me, lets 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
STEMucator
Homework Helper
2,075
140
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
22,089
3,290
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
STEMucator
Homework Helper
2,075
140
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
22,089
3,290
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
STEMucator
Homework Helper
2,075
140
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 lets 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
22,089
3,290
I knew something was up :(. Okay so lets 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
STEMucator
Homework Helper
2,075
140
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.
 

Related Threads on Finding max/min using Lagrange Multipliers

Replies
5
Views
8K
  • Last Post
Replies
15
Views
2K
Replies
7
Views
3K
Replies
2
Views
2K
Replies
7
Views
6K
Replies
9
Views
2K
Replies
1
Views
2K
  • Last Post
Replies
7
Views
2K
Replies
4
Views
1K
Top