Finishing the intro lagrange multiplier example

  Рет қаралды 241,277

Khan Academy

Khan Academy

7 жыл бұрын

Courses on Khan Academy are always 100% free. Start practicing-and saving your progress-now: www.khanacademy.org/math/mult...
Working out the algebra for the final solution the the example from the previous two videos.

Пікірлер: 85
@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 2 жыл бұрын
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
@user-hb2wq1pl7u
@user-hb2wq1pl7u 7 ай бұрын
i said the same thing i think he made a mistake
@fahrenheit2101
@fahrenheit2101 7 ай бұрын
didn't he say this in the video...
@juv7026
@juv7026 5 ай бұрын
first of all, he talks about it in the video. Second of all, you're wrong
@mintylemon66
@mintylemon66 2 ай бұрын
@@juv7026 would you please tell me where he said it? thank you!
@cameronbaird5658
@cameronbaird5658 Жыл бұрын
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
@irtazaisawsome
@irtazaisawsome 6 жыл бұрын
3Blue1Brown! I thought you sounded familiar. :)
@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.
@LeopoldoTejada
@LeopoldoTejada 7 ай бұрын
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 6 ай бұрын
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 4 ай бұрын
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 ?
@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).
@GaborGyebnar
@GaborGyebnar 7 жыл бұрын
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.
@Ropbastos
@Ropbastos 6 жыл бұрын
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 6 жыл бұрын
Gabor: You are right.. He made a mistake
@alessioulivi6734
@alessioulivi6734 5 жыл бұрын
@@Ropbastos 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).
@kamitube1059
@kamitube1059 4 жыл бұрын
Wish I found this video earlier. You just explained what my teacher took.a semester do so. Thank you
@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
@ranitchatterjee5552
@ranitchatterjee5552 3 жыл бұрын
Khan Academy never disappoints ❤
@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?
@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
@ethanlawrence2825
@ethanlawrence2825 Жыл бұрын
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).
@mikeywatts366
@mikeywatts366 11 ай бұрын
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.
@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!
@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?
@mahakjauhri6759
@mahakjauhri6759 4 жыл бұрын
Clear enough! But your voice 😍
@vvmcmurdo
@vvmcmurdo 7 жыл бұрын
@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 4 жыл бұрын
@@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.
@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
@saurabhsingh-ow7ue
@saurabhsingh-ow7ue 4 жыл бұрын
thank you sir.........
@vladimirkolovrat2846
@vladimirkolovrat2846 6 жыл бұрын
Very clear! Thank you.
@piotrzalewski9381
@piotrzalewski9381 Жыл бұрын
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).
@ankitapaul6426
@ankitapaul6426 3 жыл бұрын
Thank you sir
@osamasahib7741
@osamasahib7741 4 жыл бұрын
Thanks a lot
@kavinduadhikari5881
@kavinduadhikari5881 Жыл бұрын
This is the greatest
@k.markendahl4063
@k.markendahl4063 5 жыл бұрын
Is the maximum lokal or global?
@user-hb2wq1pl7u
@user-hb2wq1pl7u 7 ай бұрын
3:32 IF X = 0 we said that it should satisfy the constraint why can't y be plus or minus 1
@izabilska7278
@izabilska7278 4 жыл бұрын
thank you for being good at math unlike my professor :)
@riddhimasapra5358
@riddhimasapra5358 2 ай бұрын
Thank youuu ❤️
@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
@CalleTful
@CalleTful 2 жыл бұрын
Which playlist is this in?
@yveltal7012
@yveltal7012 5 ай бұрын
thankyousomuch
@DianaMorales-sk7uf
@DianaMorales-sk7uf 5 жыл бұрын
helped with hw
@amol5146
@amol5146 3 жыл бұрын
Can't we just substitute x^2 = 1 - y^2 into the function and set the derivative = 0?
@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!
@CSBAMBATIPUDIRISHIVINAYAKA
@CSBAMBATIPUDIRISHIVINAYAKA 2 жыл бұрын
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?
@praneelmadhuvanesh3770
@praneelmadhuvanesh3770 8 ай бұрын
huh? When checking the x=0 possibility, lambda would no longer equal y. So lambda could equal 0 and y could equal 1. Right?
@Bunk_Moreland
@Bunk_Moreland 7 жыл бұрын
so, where is the use of lagrange multipliers (lambda) in this method?
@thisiskartik
@thisiskartik 2 жыл бұрын
Is it grant Sanderson in this video?
@FineFlu
@FineFlu Жыл бұрын
Can someone explain why lambda is seemingly irrelevant in the end?
@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. )
@MoguMogu818
@MoguMogu818 4 ай бұрын
thank you 3b1b.
@aidaasekenye3540
@aidaasekenye3540 5 ай бұрын
Utitarianism w1(x1)=square root of x1
@-mwolf
@-mwolf 2 жыл бұрын
I love you bro
@funnzone7945
@funnzone7945 Жыл бұрын
you great
@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
@amaljeevk3950
@amaljeevk3950 11 ай бұрын
@mrwess1927
@mrwess1927 5 жыл бұрын
What do you mean by maximizing the function f(x,y)?
@ConceptualCalculus
@ConceptualCalculus 3 жыл бұрын
Find the pair (x, y) that gets the largest possible value out of the function.
@SakuraxStars
@SakuraxStars 4 жыл бұрын
This voice!!
@kumarparshotam662
@kumarparshotam662 4 жыл бұрын
3 blue 1brown
@sxd6259
@sxd6259 3 жыл бұрын
brandt sanderson >>>>>>>>>>>>>>>> any maths teacher
@dihancheng952
@dihancheng952 11 ай бұрын
the reasoning on the case x = 0 is not right
Lagrange multiplier example, part 1
7:50
Khan Academy
Рет қаралды 253 М.
Understanding Lagrange Multipliers Visually
13:18
Serpentine Integral
Рет қаралды 328 М.
Despicable Me Fart Blaster
00:51
_vector_
Рет қаралды 19 МЛН
Nutella bro sis family Challenge 😋
00:31
Mr. Clabik
Рет қаралды 13 МЛН
how Laplace solved the Gaussian integral
15:01
blackpenredpen
Рет қаралды 729 М.
Lagrange Multipliers with TWO constraints | Multivariable Optimization
16:29
Lagrange Multipliers | Geometric Meaning & Full Example
12:24
Dr. Trefor Bazett
Рет қаралды 274 М.
Euler-Lagrange equation explained intuitively - Lagrangian Mechanics
18:22
Physics Videos by Eugene Khutoryansky
Рет қаралды 399 М.
Constrained Optimization: Intuition behind the Lagrangian
10:49
The Lagrangian
12:28
Khan Academy
Рет қаралды 478 М.
The SAT Question Everyone Got Wrong
18:25
Veritasium
Рет қаралды 12 МЛН
Getting kids hooked on motorcycles not drugs 👏
0:18
Twinstunts
Рет қаралды 7 МЛН
DAD LEFT HIS OLD SOCKS ON THE COUCH…😱😂
0:24
JULI_PROETO
Рет қаралды 4 МЛН
Quem vai beber a água horrível?! 😱 #shorts #challenge
0:11
HENRIQUE & GABI
Рет қаралды 4,1 МЛН