Finishing the intro lagrange multiplier example

  Рет қаралды 249,629

Khan Academy

Khan Academy

Күн бұрын

Пікірлер: 92
@collinsmith7572
@collinsmith7572 7 жыл бұрын
this was the BIGGEST help for understand the intuition behind this principle. thank you so much haha. I have a final for this class tomorrow morning and now I feel prepared for the langrange problem I'm betting is going to be on there. thanks again.
@alejrandom6592
@alejrandom6592 3 жыл бұрын
3:06 "since lambda equals y" Wait! that fact came from the assumption that x is not equal to zero, which means the first equation doesn't give you any information if x=0 and we have to work with only the last 2 equations. If we plug x=0 into the last one, we get y=+-1, now we plug x=0 and y=+-1 into the second equation and we get that lambda equals 0. (0,1) and (0,-1) are still worth checking. I just saw the graph on the first video again and they happen to be local maxima and minima...
@aylora7033
@aylora7033 3 жыл бұрын
nicely explained bro. when i looked back on the graph it basically outlined the diameter of the circle so i couldnt figure out if its local maxima or minima but i looked at it with regard to part of the function that is above z axis that had the projection of the circle bended upward - in this case local minima and below z axis that had the projection of the circle bended downward - which is local maxima
@nitfanono
@nitfanono 11 ай бұрын
i said the same thing i think he made a mistake
@fahrenheit2101
@fahrenheit2101 11 ай бұрын
didn't he say this in the video...
@juv7026
@juv7026 9 ай бұрын
first of all, he talks about it in the video. Second of all, you're wrong
@mintylemon66
@mintylemon66 6 ай бұрын
@@juv7026 would you please tell me where he said it? thank you!
@cameronbaird5658
@cameronbaird5658 2 жыл бұрын
I have used the Lagrange multiplier so much in the last few months and I finally understand why. Thank you Grant for yet another masterclass
@garlic7099
@garlic7099 5 жыл бұрын
Thanks A lot! One thing worth mentioning is that the 2 values you crossed out at 5:27 MINIMIZE the function on the constraint.
@GaborGyebnar
@GaborGyebnar 8 жыл бұрын
At 3:01 you say lambda equals y, so both of them need to be zero. But that's only true for x != 0, so "y=lambda" doesn't stand here. Actually, y=+-1, x=0, lambda=0 satisfy all three equations.
@aeroscience9834
@aeroscience9834 7 жыл бұрын
Maxwell Einstein what are you talking about? If x=0 you can't divide the first equation by x in the first place, that's Gabor's point. Going back to the original system of equations, x=0, y=1, lambda=0 satisfied all three original equations.
@iwtwb8
@iwtwb8 7 жыл бұрын
Lambda = 0 is a "trivial solution" (although of course that doesn't mean it's not important). Those come up all the time. He should have mentioned it.
@rodrigo_t9
@rodrigo_t9 7 жыл бұрын
What you say is true, I think, but as I see it, lambda can't be zero because we know none of the gradients is.
@krishanudasbaksi9530
@krishanudasbaksi9530 7 жыл бұрын
Gabor: You are right.. He made a mistake
@alessioulivi6734
@alessioulivi6734 5 жыл бұрын
@@rodrigo_t9 That's not true, in the case of (0,±1) the gradient of f is exactly (0,0), so it is true that grad(f)=0*grad(g).
@LeopoldoTejada
@LeopoldoTejada 11 ай бұрын
I would say there is a mistake when checking for the possibility of x=0. It uses the fact that y=lambda, but this identity holds only if x is not zero. Actually the values x=0, y=1 and lambda=0 seem to be a valid solution, unless I made a mistake
@1Happy_Singh
@1Happy_Singh 10 ай бұрын
Even If We Don't Say That Lambda = y , The Fact That Y Has To Be Zero In The Second Equation Can Be Concluded , Lambda Can't Be Equal To Zero As This Would Mean That There Is No Gradient , Please Let Me Know My Mistake , Or My Lack Of Understanding
@momobeb7361
@momobeb7361 8 ай бұрын
You'r right, I will just say that if x=0, y can be equal to 0, but the constraint will not bé satisfied. I have also a question, because it's thé first time i saw a langrangian multipliar. Why have Lambda =0 a problème ? Why not having a gradient is false here ?
@ardin1437
@ardin1437 Ай бұрын
this doesn't fulfill the second constraint. x squared must be equal to 2 lamba y, which, if you use x=0 and y=1, is not true no matter what lamda is (since it cannot be zero)
@ardin1437
@ardin1437 Ай бұрын
also lamda can't be zero bc then one of the gradients will be a zero vector
@Xilotl
@Xilotl 5 жыл бұрын
What a big help!! Now, I have a test to take on this in 1.5 hours....
@sxd6259
@sxd6259 3 жыл бұрын
whats the result
@Xilotl
@Xilotl 3 жыл бұрын
@@sxd6259 I don't remember that was a year ago
@irtazaisawsome
@irtazaisawsome 7 жыл бұрын
3Blue1Brown! I thought you sounded familiar. :)
@gemacabero6482
@gemacabero6482 3 жыл бұрын
One question. When you analyze the case x = 0, why do you say that lambda has to equal y ? I didn't understand this part. Lambda could equal zero and then y = 1. So you have x = 0 and y = 1, which do satisfy the third equation. Why would this be wrong? Thank you!
@antonzamay4482
@antonzamay4482 3 жыл бұрын
You are right, there is the mistake on the video. We get lambda = y only when we can divide on x (x 0).
@atifzaheer2671
@atifzaheer2671 3 жыл бұрын
Yeah, he made a mistake there.
@rajmehta4643
@rajmehta4643 2 жыл бұрын
Yes, but lambda cannot equal zero, otherwise grad(f) = 0 for all (x,y) implying f is a constant function, which is not true. Hence, if x = 0, y must equal 0 as well.
@vladislav_sidorenko
@vladislav_sidorenko 2 жыл бұрын
@@rajmehta4643 The original equation which must be met is not ∇f(x, y)=λ∇g(x, y), but ∇f(x_m, y_m)=λ∇g(x_m, y_m). We evaluate it at the specific point (x_m, y_m), so λ being equal to 0 implies not that the entire ∇f(x, y) is a constant (0, 0), but that ∇f(x_m, y_m) is (0, 0), which is very much possible. In fact, the original equation has the critical points (0, 1) and (0, -1), which are missed by dismissing that λ can be 0. They, of course, don't turn out to be the solution in this case, but they are potential solutions. While the gradient value of (0, 0) may seem that it cannot mean that the contour line is perpendicular to the graph, so what? In general, it may also mean that the contour is also a single critical point, or there's not enough info to calculate the line (As with the contour line of 0 of (x+y)^2). In both cases, the gradient is (0, 0).
@hakeemnaa
@hakeemnaa 2 жыл бұрын
this is high school math, it is just a different notation if you take the derivative of a function and equal it to zero, you will have no change nearby, so you are at max or min zone here you don't equal it to zero, you equal it to another derivative, you put limda because the derivatives are not equal in magnitude the problem will be that you will have many same directions of the derivative ( same slop or same ratio if change y over the change of x) between two functions even if x and y of one function are far away from the other function so you have to but the constraint
@mikeywatts366
@mikeywatts366 Жыл бұрын
It might be interesting to compare this solution with another method: equating dy/dx of the two given equations. (For f(x, y), we get d(f(x,y)) = 2xy*dx + x^2*dy. But since we're looking at a contour, d(f(x,y)) = 0; similarly, x^2+y^2 = 1 can be differentiated implicitly to get dy/dx = -x/y).This gives -x/y = -2xy/x^2. Solving, we get the same solution as in the video.
@kamitube1059
@kamitube1059 4 жыл бұрын
Wish I found this video earlier. You just explained what my teacher took.a semester do so. Thank you
@ranitchatterjee5552
@ranitchatterjee5552 3 жыл бұрын
Khan Academy never disappoints ❤
@hakeemnaa
@hakeemnaa 2 жыл бұрын
the direction is the slop, ratio of change y/ change of x we equal the direction of both functions Y1/X1=Y2/X2 of course Y1≠ Y2 but we can say Y1= λY2, X1=λX2 ( change of x and y ) so
@nitfanono
@nitfanono 11 ай бұрын
3:32 IF X = 0 we said that it should satisfy the constraint why can't y be plus or minus 1
@piotrzalewski9381
@piotrzalewski9381 2 жыл бұрын
There is solution for x=0 (it is not true that y=lambda if x=0). The (two) solution(s) are [x,y,lambda] = [0,1,0] or [0,-1,0] and both were easy to spot on the graph in the previous part. These are local (constraint) max. and min respectively. The reason (in the context) is that if grad(f)=0 (as it is for x=0) than grad(f)=0*grad(g) for every grad(g). The series is excellent anyway (as usual).
@amaarquadri
@amaarquadri 3 жыл бұрын
At 3:00, when you are analyzing the case where x = 0 you state that lambda = y. But since x = 0, lambda = y no longer applies (that would be like saying 0 * lambda = 0 * y => lambda = y, which is false). In fact, the x = 0, y = 1, lambda = 0 seems to be a solution to the system of equations. It wouldn't be the maximum though, since the objective would evaluate to 0.
@gemacabero6482
@gemacabero6482 3 жыл бұрын
Hi! I had the same question, but why wouldn't y = 1 and x= 0 be a possible solution? It does satisfy the third equation right? Thanks!
@vvmcmurdo
@vvmcmurdo 8 жыл бұрын
@Gábor Gyebnár, True, but lambda can't be zero. That's why that possibility is not useful.
@martingutlbauer9071
@martingutlbauer9071 7 жыл бұрын
@chittaranjan: why not? if lambda equals zero means that the "red" side is zero, but there are solutions to the gradient of f where it equals zero, so that the equations holds. I don't see why we should exclude lambda=0? Can you explain?
@adityaprasad465
@adityaprasad465 5 жыл бұрын
@@martingutlbauer9071 Remember what we're trying to find: places where the gradient vectors of the two functions are a constant multiple of each other, and hence point in the same direction. If one of those vectors is zero, then it's not meaningful to say that the other is a multiple of it.
@praneelmadhuvanesh3770
@praneelmadhuvanesh3770 Жыл бұрын
huh? When checking the x=0 possibility, lambda would no longer equal y. So lambda could equal 0 and y could equal 1. Right?
@mahakjauhri6759
@mahakjauhri6759 5 жыл бұрын
Clear enough! But your voice 😍
@izabilska7278
@izabilska7278 5 жыл бұрын
thank you for being good at math unlike my professor :)
@kavinduadhikari5881
@kavinduadhikari5881 Жыл бұрын
This is the greatest
@5612dag
@5612dag Жыл бұрын
3:06 well, if x=0, we can no longer be sure that lambda equals y! If x is zero, you can't really say anything about the relationship between y and lambda in that equation. (take for example 0*3 = 0 = 0*5, then it is obvious that 3 =/= 5, even though 0*3 equals 0*5. )
@bennicholl7643
@bennicholl7643 5 жыл бұрын
What if their are numerous places that the two functions are perfectly parallel. Would you just iterate through each solution where the partial derivatives of f(x) = partial derivative's of lambda * g(x), than the solution with the max output?
@ethanlawrence2825
@ethanlawrence2825 2 жыл бұрын
Am I correct that following the Legrange Multiplier method only gives you values of x and y that make the function STATIONARY (so could be minimum or maximum).
@thewarlord8904
@thewarlord8904 Ай бұрын
But isnt simple differentiation much easier in this case using parameteic form to put x=sintheta and y=costheta And then differentiating sin^2thetacostheta and put =0
@ankitapaul6426
@ankitapaul6426 3 жыл бұрын
Thank you sir
@smahire299
@smahire299 4 жыл бұрын
let's say within the area of the circle I want to find the maximum point, then do we have to evaluate each and every contour ranging from 0 to 1 for determining max point?
@aidaasekenye3540
@aidaasekenye3540 9 ай бұрын
Utitarianism w1(x1)=square root of x1
@saurabhsingh-ow7ue
@saurabhsingh-ow7ue 4 жыл бұрын
thank you sir.........
@yveltal7012
@yveltal7012 9 ай бұрын
thankyousomuch
@pandicon3
@pandicon3 2 ай бұрын
So, assuming that the examined function has a maximum and a minimum, this method should always find them, right? Or are there some weird cases in which it would miss some solutions, making you miss for example a minimum?
@riddhimasapra5358
@riddhimasapra5358 6 ай бұрын
Thank youuu ❤️
@capybara-k6g
@capybara-k6g 3 ай бұрын
Can't thank you enough :)
@amol5146
@amol5146 3 жыл бұрын
Can't we just substitute x^2 = 1 - y^2 into the function and set the derivative = 0?
@alexdigg
@alexdigg 19 күн бұрын
i have a similar problem except my g(x) is more like (x-7)^2 + (y-8)^2 = 18. When im taking the derivative of g(x) here do I need to subtract over the 18 or divide it over so that i have =1 like the example here?
@MattyMatiss
@MattyMatiss 2 ай бұрын
Why do we assume that the gradient is only proportional when both functions are tangent? Can't it be that they happen to be proportional at some other values for f, just by coincidence?
@MattyMatiss
@MattyMatiss 2 ай бұрын
Also, can't it happen that lambda is some kind of a rotation coefficient or matrix which will spoil the whole idea of making sure these are pointing in the same direction?
@jasdeepsinghgrover2470
@jasdeepsinghgrover2470 6 жыл бұрын
Thanks a lot for making great videos. Does this method always work. Like maximize z=-(x-1)^2 given (x-1)^2+y^2=1. The contours seem to be perpendicular here
@CSBAMBATIPUDIRISHIVINAYAKA
@CSBAMBATIPUDIRISHIVINAYAKA 3 жыл бұрын
Is it a coincidence that we got minimum value of function for lambda < 0 case, or can we have maximum value even when lambda < 0?
@scariuslvl9987
@scariuslvl9987 3 жыл бұрын
hi, I have a question: at 2 min. 30 you say lambda=0 if x=0, but that's assuming you can cancel out x in the first equation if x=0, but wouldn't that mean that you assumed 0/0=1? Or am I looking at it the wrong way? edit: If x=0, then 0*2y = 0*2*lambda; 0^2 = y*2*lambda; 0^2 + y^2 = 1 => y=1; lambda=0 This is my reasoning, it doesn't change much because it isn't a relevant solution but I want to know if my way of thinking is wrong, please help!
@osamasahib7741
@osamasahib7741 5 жыл бұрын
Thanks a lot
@FineFlu
@FineFlu Жыл бұрын
Can someone explain why lambda is seemingly irrelevant in the end?
@MoguMogu818
@MoguMogu818 8 ай бұрын
thank you 3b1b.
@vladimirkolovrat2846
@vladimirkolovrat2846 6 жыл бұрын
Very clear! Thank you.
@thisiskartik
@thisiskartik 2 жыл бұрын
Is it grant Sanderson in this video?
@DianaMorales-sk7uf
@DianaMorales-sk7uf 6 жыл бұрын
helped with hw
@nguyennguyenkhoi9988
@nguyennguyenkhoi9988 2 жыл бұрын
3:28 if x is zero y not need to equal lamda so your conclusion if x = 0 there is no y is totally wrong
@CalleTful
@CalleTful 2 жыл бұрын
Which playlist is this in?
@-mwolf
@-mwolf 2 жыл бұрын
I love you bro
@Bunk_Moreland
@Bunk_Moreland 7 жыл бұрын
so, where is the use of lagrange multipliers (lambda) in this method?
@Igdrazil
@Igdrazil 2 жыл бұрын
No, when x=0, y=+1 or -1, and lambda=0. So no way y=lambda as in the general case.
@k.markendahl4063
@k.markendahl4063 5 жыл бұрын
Is the maximum lokal or global?
@sxd6259
@sxd6259 3 жыл бұрын
brandt sanderson >>>>>>>>>>>>>>>> any maths teacher
@amaljeevk3950
@amaljeevk3950 Жыл бұрын
@SakuraxStars
@SakuraxStars 5 жыл бұрын
This voice!!
@dihancheng952
@dihancheng952 Жыл бұрын
the reasoning on the case x = 0 is not right
@mrwess1927
@mrwess1927 5 жыл бұрын
What do you mean by maximizing the function f(x,y)?
@ConceptualCalculus
@ConceptualCalculus 4 жыл бұрын
Find the pair (x, y) that gets the largest possible value out of the function.
Lagrange multiplier example, part 1
7:50
Khan Academy
Рет қаралды 258 М.
The Lagrangian
12:28
Khan Academy
Рет қаралды 490 М.
Trick-or-Treating in a Rush. Part 2
00:37
Daniel LaBelle
Рет қаралды 45 МЛН
Constrained Optimization: Intuition behind the Lagrangian
10:49
Understanding Lagrange Multipliers Visually
13:18
Serpentine Integral
Рет қаралды 363 М.
What is Jacobian? | The right way of thinking derivatives and integrals
27:14
Lec 13: Lagrange multipliers | MIT 18.02 Multivariable Calculus, Fall 2007
50:10
Meaning of Lagrange multiplier
10:08
Khan Academy
Рет қаралды 240 М.
Introduction To The Lagrange Multiplier Method
21:25
Good Vibrations with Freeball
Рет қаралды 21 М.
Lagrange Multipliers | Geometric Meaning & Full Example
12:24
Dr. Trefor Bazett
Рет қаралды 308 М.
This is why you're learning differential equations
18:36
Zach Star
Рет қаралды 3,5 МЛН
Intuition and Examples for Lagrange Multipliers (Animated)
14:59
Casual Science
Рет қаралды 34 М.