You could use the symmetry of the ellipse at 2:00 and just solve for the first quadrant and maximize x+y, everything will be the same after the gradient.
At 3:00 you say that the gradient of P needs to be parallel to the gradient of g. Would you mind explaining why exactly the gradient of the original function needs to parallel to the gradient of the constraint function?
It follows from the analytical solution. Try to solve this without Lagrange-Multipliers: The constraint function G(x,y)=c really can be seen as a statement saying y=Y(x). You can then go and input this function into your measurement function - the function to be maximized - F(x, Y(x)). Now the extremes of F are at the points (d/dx)F (x, Y (x) )=0. Using implicit differentiation this resolves to fx + yx * fy = 0. You can now get to yx by implicitly differentiating G(x, Y(x))=c - the constraint function - yielding gx + yx*gy = 0 => yx = -gx/gy. Put them together to get fx - fy * gx/gy = 0 => fx/fy = gx/gy. You can now seperate these into two equations by introducing a multiplier which will keep them arithmetically connected: fx/fy = gx/gy => fx/gx = fy/gy = L => fx = gx*L , fy = gy*L which is equivalent to (d/dx)F(x,y) = L*(d/dx)G(x,y). This means these vectors are parallel. If you cancel out all the steps, you arrive at Lagrange-Multipliers.
If you look at the contour lines for both the functions and try to compute the gradient vectors, you'll notice that the gradient vectors are perpendicular to the contour lines as progressing in that direction would help the function increase most rapidly. The maximum value of the function can be obtained when the contour lines of both the functions are touching each other. Hence their gradient vectors will be in the same direction in such a case and hence proportional. This proportionality value is what is known as the Lagrange Multiplier.
It just hit me, how simple the idea behind this is. The two functions touch at a point where both have the same tangent. That meaning that their gradient must be pointing in the same direction. The solution is a cohort of points for all possible level lines. Just check it against the constraint function and boom. Not very hard to put into words.
Best video I've seen on Lagrange multipliers so far. Thanks for keeping the video short by explaining things like y≠negative and x=4y instead of writing it all down.
My question may be strange but I have no one to ask this can you tell me a Lagrange algorithm to find a minimum arbitrary volume within another volume which can contain it by maximum of it inside it or minimum of it out side 🙏🙏🙏
Its very similar to checking the endpoints when splitting up a function of one variable on intervals and finding max/min values. He splits up the curve because the first quadrant of the ellipse is basically and identical copy of the other three(with the exception of some sign changes for x and y)
There is an easier way to the solution where we can consider the parametric form of the ellipse and take a general point on the ellipse as (2cosk,sink) where k is some constant and due to the symmetrical nature of the problem we can easily find function of perimeter as a trigonometric function of the form Acosk+Bsink whose value can be maximised using sqrt(A^2+B^2).
whats the difference between the lagrange multiplier in the euler lagrange equation and the lagrange multiplier in the maximization that your are teaching now?
They are boundaries for the perimeter of the rectangle. It can be squished in the x or the y direction. Since they are boundary values, and specifically not critical points, they don't need to satisfy the constraints of (the system of equations of) the Lagrange multiplier. Checking the boundary points tells us if the critical point is a min or max.
It really doesn't seem necessary to separately check the boundary points. There was nothing in the math that excluded them from consideration, and they did not provide a solution to the system of equations, therefore they have already in a sense been checked, right?
Josh Hansen You have to check the boundary points after solving the system of equations because sometimes the x and y values that you get are not in fact maximums nor minimums.
You could use the symmetry of the ellipse at 2:00 and just solve for the first quadrant and maximize x+y, everything will be the same after the gradient.
At 3:00 you say that the gradient of P needs to be parallel to the gradient of g. Would you mind explaining why exactly the gradient of the original function needs to parallel to the gradient of the constraint function?
It follows from the analytical solution. Try to solve this without Lagrange-Multipliers:
The constraint function G(x,y)=c really can be seen as a statement saying y=Y(x). You can then go and input this function into your measurement function - the function to be maximized - F(x, Y(x)). Now the extremes of F are at the points (d/dx)F (x, Y (x) )=0. Using implicit differentiation this resolves to fx + yx * fy = 0. You can now get to yx by implicitly differentiating G(x, Y(x))=c - the constraint function - yielding gx + yx*gy = 0 => yx = -gx/gy.
Put them together to get fx - fy * gx/gy = 0 => fx/fy = gx/gy.
You can now seperate these into two equations by introducing a multiplier which will keep them arithmetically connected:
fx/fy = gx/gy => fx/gx = fy/gy = L => fx = gx*L , fy = gy*L which is equivalent to (d/dx)F(x,y) = L*(d/dx)G(x,y). This means these vectors are parallel.
If you cancel out all the steps, you arrive at Lagrange-Multipliers.
If you look at the contour lines for both the functions and try to compute the gradient vectors, you'll notice that the gradient vectors are perpendicular to the contour lines as progressing in that direction would help the function increase most rapidly. The maximum value of the function can be obtained when the contour lines of both the functions are touching each other. Hence their gradient vectors will be in the same direction in such a case and hence proportional. This proportionality value is what is known as the Lagrange Multiplier.
This is really good; articulate and easy to understand.
there is some connection with the number 4 and the lecturer at 3:56
The gradient is a vector. Two vectors can point in the same direction yet vary in length. That's what lambda is. One vector is lambda times the other.
@Betty Gao This is because when he took the square root, only the positive values satisfied the point in the first quadrant that he was looking for
It just hit me, how simple the idea behind this is. The two functions touch at a point where both have the same tangent. That meaning that their gradient must be pointing in the same direction. The solution is a cohort of points for all possible level lines. Just check it against the constraint function and boom. Not very hard to put into words.
Best video I've seen on Lagrange multipliers so far. Thanks for keeping the video short by explaining things like y≠negative and x=4y instead of writing it all down.
I like this guy. He's cool in a nerdy sort of way. Very smart, though and helpful. Thanks Joel.
My question may be strange but I have no one to ask this can you tell me a Lagrange algorithm to find a minimum arbitrary volume within another volume which can contain it by maximum of it inside it or minimum of it out side 🙏🙏🙏
Its very similar to checking the endpoints when splitting up a function of one variable on intervals and finding max/min values. He splits up the curve because the first quadrant of the ellipse is basically and identical copy of the other three(with the exception of some sign changes for x and y)
English + Math Languages gets a robotic tone! That's why there are two classes for each of those subjects.
can anyone help? got lost at 8:01
Great content and explanation!
I find it funny that the MIT channel has less views than PatrickJMT. PATRICK FTW!
There is an easier way to the solution where we can consider the parametric form of the ellipse and take a general point on the ellipse as (2cosk,sink) where k is some constant and due to the symmetrical nature of the problem we can easily find function of perimeter as a trigonometric function of the form Acosk+Bsink whose value can be maximised using sqrt(A^2+B^2).
Ah ok i got it now why p = 4x + 4y is because L = 2x, W = 2y so P = 2(2x) +2(2y).
Wauww.. FINALLY Congratulations!!
whats the difference between the lagrange multiplier in the euler lagrange equation and the lagrange multiplier in the maximization that your are teaching now?
in this case it is just a constant that equates the parallel vectors of the constraint and the gradient.
That's a good lecture!
How did you know the endpoint coordinate?
Where does he get the p(0,1) and P(2,0)? Also do we need to find the value of lamda?
The two points are from the figure that he has. You just have to set the values of lambda together to solve for either x or y.
Why is he even considering x=0 or y=0? Either of those values yields a contradiction; it yields 4=0 from his first two equations...
They are boundaries for the perimeter of the rectangle. It can be squished in the x or the y direction. Since they are boundary values, and specifically not critical points, they don't need to satisfy the constraints of (the system of equations of) the Lagrange multiplier. Checking the boundary points tells us if the critical point is a min or max.
How did you take x=4y, if we calculate for lambda from first 2 eqn we got x=2 ...
You don't know how to solve equations!!
How can a gradient be parallel? Arent parallel gradients just equal?
What does the lambda represent?
Thank you, that makes a lot of sense.
How come when you take the squareroot of x. There isn't a plus minus?
+Betty Gao He's only doing it for the first quarter of the xy-axis so x>0, y>0
why perimeter 4x + 4y and not 2x + 2y which is based on geometry formula for perimeter of rectangle???
The origin is at (0,0), and x and y are specified as the top right corner. So a long edge is 2x and a short edge is 2y. Hence 2(2x) + 2(2y) = 4x + 4y.
I Really Like The Video Lagrange multipliers From Your
the multiplier is most useful
I don't think the answer is right coz I have found a rectangle with perimeter 6root2.check out the four points
viz (+-root2,+-1/root2)
zz top - la grange
means?
pls define what is p [x] and p [y] ? -- whether p[x] is contribution 4x to perimeter p
thanking u sir
in Physics generally wavelength
what if he asked for the minimum ?!
x -> 0 then P=4
Super helpful! Thank you ^^
Oh I know that, I meant in the context of this video.
سوزان تفعل عندك النت
suzan fadel تفعل النت عندك
WOW, Wonderful, tnx a lot
In this case just a constant.
It really doesn't seem necessary to separately check the boundary points. There was nothing in the math that excluded them from consideration, and they did not provide a solution to the system of equations, therefore they have already in a sense been checked, right?
Josh Hansen You have to check the boundary points after solving the system of equations because sometimes the x and y values that you get are not in fact maximums nor minimums.
Μαλλίδη, βλέπε να μαθαίνεις....