Find Max/Min of f(x,y) w/ Lagrange Multipliers

In summary: No minima or maxima is my conclusion but I'm very sure it's wrong. Also is the 3-D representation somewhat like a paraboloid with a ellipsoid constraint?Thank you!No minima or maxima is my conclusion but I'm very sure it's wrong. Also is the 3-D representation somewhat like a paraboloid with a ellipsoid constraint?
  • #1
Justabeginner
309
1

Homework Statement


Lagrange multipliers to find the maximum and minimum values of f(x,y) = 4x^3 + y^2 subject to the constraint 2x^2 + y^2 = 1. Find points of these extremum.


Homework Equations





The Attempt at a Solution


g(x,y)= 2x^2 + y^2 - 1
f(x,y)= 4x^3 + y^2
Gradient F= 12x^2i + 24yj
Gradient G= 4xi + 2yj

Gradient = 4x^3 + y^2 - λ(2x^2 + y^2 - 1)
= [12x^2- λ4x, 2y - 2λy, -2x^2 - y^2 - 1]
12x^2 - λ4x = 0
3x = λ

2y - 2λy = 0
λ= 1

x = 1/3 (Is this correct?)

fx (x,y) = 12x^2 x=0
fy (x,y) = 2y y=0

No minima or maxima is my conclusion but I'm very sure it's wrong. Also is the 3-D representation somewhat like a paraboloid with a ellipsoid constraint?

Thanks!
 
Physics news on Phys.org
  • #2
Justabeginner said:

Homework Statement


Lagrange multipliers to find the maximum and minimum values of f(x,y) = 4x^3 + y^2 subject to the constraint 2x^2 + y^2 = 1. Find points of these extremum.


Homework Equations





The Attempt at a Solution


g(x,y)= 2x^2 + y^2 - 1
f(x,y)= 4x^3 + y^2
Gradient F= 12x^2i + 24yj
Gradient G= 4xi + 2yj

Gradient = 4x^3 + y^2 - λ(2x^2 + y^2 - 1)
= [12x^2- λ4x, 2y - 2λy, -2x^2 - y^2 - 1]
That's not right. The gradient doesn't equal 4x^3 + y^2 - λ(2x^2 + y^2 - 1), and 4x^3 + y^2 - λ(2x^2 + y^2 - 1) doesn't equal [12x^2- λ4x, 2y - 2λy, -2x^2 - y^2 - 1].

12x^2 - λ4x = 0
3x = λ
You lost a solution by dividing by 0. It's better to divide out the 4 and factor the remaining expression.
$$3x^2 - \lambda x = x(3x-\lambda) = 0$$ This way you can see there are two possible solutions — the one you found, ##3x=\lambda##, and the one you didn't, x=0.

2y - 2λy = 0
λ= 1
Again, you missed a solution.

x = 1/3 (Is this correct?)
This is one possibility. To get here, you assumed x≠0, so that you can say that x=λ/3, and y≠0, from which you deduced λ=1. You still need to solve for y and then plug it back into f(x,y).

Then you need to go back and find the other solutions and test those as well.

fx (x,y) = 12x^2 x=0
fy (x,y) = 2y y=0

No minima or maxima is my conclusion but I'm very sure it's wrong. Also is the 3-D representation somewhat like a paraboloid with a ellipsoid constraint?

Thanks!
 
  • #3
Thank you for telling me about the factoring method with which I was able to recover a solution.

However, I am a bit confused about the purpose of lambda here - I now have x= lambda/3 , x=0 , y=0, and lambda = 1 as my solutions. How can I plug these into f (x,y) to check for maxima and minima? Won't it just give me the value of the function in terms of lambda (for two of them)?
 
  • #4
You have three conditions that need to hold:
\begin{align*}
x(3x-\lambda) &= 0 \\
y(\lambda-1) &= 0 \\
2x^2 + y^2 -1 &= 0
\end{align*} and you'll need to consider several different cases. You're looking for combinations of values for x, y, and ##\lambda## that will satisfy all three conditions simultaneously. Primarily, though, you're interested in finding x and y. Their relationship to ##\lambda## may help you find x and y, but you may not need to consider ##\lambda## at all.

To satisfy the first condition, you can have ##x=0##, ##x=\lambda/3##, or both. To satisfy the second condition, you need ##y=0##, ##\lambda=1##, or both. Finally, x and y have to satisfy the constraint.

So far, you looked at the case where ##x=\lambda/3## and ##\lambda=1##. You want to consider what happens if you assume x=0. Can y=0? Why not? What can y be? Similarly, you want to consider cases where y=0 and you solve for x.
 
  • #5
Thank you for explaining that - I was thoroughly confused and I think I understand it a bit better.

So for x= 0, y=+/-1
And for y=0, x= +/- 1/sqrt(2)

When you plug the first solution into f(x,y) for x=0, you get f(x,y)= 1.
The second solution gives you either f(x,y) = 2/sqrt(2) or -2/sqrt(2)

And then from these values, how do you presume a minima and a maxima? Or am I doing it all wrong?
Thank you.
 
  • #6
Never mind I think I got it.

Is the minima at (-1/sqrt(2), 0) and the maxima at (1/sqrt(2), 0)?

Thanks!
 
  • #7
Yes, that's right.

By the way, minima and maxima are, respectively, plurals of minimum and maximum.
 
  • #8
Justabeginner said:

Homework Statement


Lagrange multipliers to find the maximum and minimum values of f(x,y) = 4x^3 + y^2 subject to the constraint 2x^2 + y^2 = 1. Find points of these extremum.


Homework Equations





The Attempt at a Solution


g(x,y)= 2x^2 + y^2 - 1
f(x,y)= 4x^3 + y^2
Gradient F= 12x^2i + 24yj
This was supposed to be "2yj", not "24yj", right?

Gradient G= 4xi + 2yj
Don't use "f" and "g" in one place and "F" and "G" in another!

Gradient = 4x^3 + y^2 - λ(2x^2 + y^2 - 1)
What? This is f= λg, not a gradient at all.

= [12x^2- λ4x, 2y - 2λy, -2x^2 - y^2 - 1]
12x^2 - λ4x = 0
3x = λ

2y - 2λy = 0
λ= 1

x = 1/3 (Is this correct?)

fx (x,y) = 12x^2 x=0
fy (x,y) = 2y y=0

No minima or maxima is my conclusion but I'm very sure it's wrong. Also is the 3-D representation somewhat like a paraboloid with a ellipsoid constraint?

Thanks!
Rather than "grad f+ λgrad g= 0", I prefer "grad f= λ grad g", which, of course, is the same thing. From grad f= 12x^2i+ 2yj and grad g= 4xi+2yj, we have 12x^2i+ 2yj= λ(4xi+ 2yj).
Separating the components, 12x^2= 4λx and 2y= 2λy.

I find that often the best way to eliminate λ, which is not part of the solution, is to divide one equation by the other: 12x^2/2y= 4x/2y or 6x^2/y= 2x/y. Multiplying both side by y, 6x^2= x, 6x^2- x= 0, x(6x- 1)= 0 so x= 0 or x= 1/6.

We also have the constraint 2x^2+ y^2= 1. If x= 0 then y= 1 or -1. If x= 1/6 then 1/18+ y^2= 1 so y^2= 17/18.
 
  • #9
Justabeginner said:
Never mind I think I got it.

Is the minima at (-1/sqrt(2), 0) and the maxima at (1/sqrt(2), 0)?

Thanks!

There are three local maxima and three local minima; of the maxima, one is global and the two others are local; ditto for the minima.

So, you have found two of the six possible solutions to the Lagrange conditions. You can get them all by being very careful when solving the Lagrange optimality equations; in particular, be careful not to discard some values like x = 0 or y = 0, etc.

Another way go gain insight into the problem is to look at the equivalent problem of optimizing
[tex] F(\theta) = f\left(\frac{\cos(\theta)}{\sqrt{2}},\sin(\theta) \right), \: 0 \leq \theta \leq 2 \pi. [/tex]
This just amounts to switching to polar coordinates for ##X = x \sqrt{2}## and ##Y = y##. Also, it may help to note that ##F(\theta)## is a cubic polynomial in ##z = \cos(\theta)## that you need to maximize or minimize for ##z \in [-1,1]##. Of course, your instructor may not accept a solution based on this representation (because it does not use the requested Lagrange multiplier approach), but the insights you can get from the new view may help you deal with what is happening in the Lagrangian approach.
 
Last edited:

FAQ: Find Max/Min of f(x,y) w/ Lagrange Multipliers

What is the purpose of using Lagrange Multipliers to find the max/min of a function?

Lagrange Multipliers allow us to find the max/min values of a function subject to a set of constraints. This allows us to optimize the function while satisfying the given constraints.

How does the Lagrange Multiplier method work?

The Lagrange Multiplier method involves finding the critical points of the function and the constraint, and then solving a system of equations to determine the optimal values for the variables.

Can the Lagrange Multiplier method be used for functions with multiple variables?

Yes, the Lagrange Multiplier method can be used for functions with any number of variables. However, as the number of variables increases, the complexity of the equations also increases.

Are there any limitations to using Lagrange Multipliers to find the max/min of a function?

One limitation of the Lagrange Multiplier method is that it may not always produce a global max/min. It can also be time-consuming and tedious to solve the system of equations for more complex functions.

Is the Lagrange Multiplier method applicable to all types of constraints?

The Lagrange Multiplier method is applicable to both equality and inequality constraints. However, for inequality constraints, additional checks and calculations may be required to ensure that the critical point is indeed a max/min.

Similar threads

Back
Top