Finally someone explains this stuff in a clear way. My teacher is pretty bad, a minutes ago he was introducing this new topic and just did an exercise and he wasn´t able to get an answer pfff
Thank you very much, i was stuck on various problems and got many wrong answer, but thanks to this video everything is clear now and i can solve all the problems.
guys, if its on the unit sphere, then we can simplify the objective function: f = x + y^2 + 2z^2 + (x^2+y^2+z^2) = x + y^2 + 2z^2 + 1. Since we are looking for points on the unit sphere x^2+y^2+z^2 = 1
People learn how to solve systems of equations in middle or early high school, but multivariable calculus, which is used here with calculating the gradients, along with the idea of lagrange multipliers themselves, is generally learned in late high school or early college (by people to whom applied math is of interest).
I think the value for lamda for y and z is switch around becuase for the three possibility we suppose to check is a) y=z=0 b) z=0 or lamda=3 c) y=0 or lamda=2 for b and c the lamda value is switch around please check it back.
He wrote it that way to simplify it. He took the square root of 4, but left the square root of three at the top. What he said was -+V(3/4) what he wrote was -+V(3)/2. which is the same thing.
1:17 This is what I didn't get. Why this, is a maximum when the gradient of the objective function is parallel to the gradient of the constraint function?
He simplified it. Say you have sqrt(16x). Since the square root of 16 is 4, this simplifies to 4sqrt(x). This works also for fractions. sqrt(x/16) = sqrt(x)/4. The square root of 1/4 is 1/2, so bring the 1/2 out of the radical. What he said: sqrt(3/4). What he wrote: sqrt(3)/2. Notice the difference. It's maybe hard to see on his chalkboard, but his radical sits _on top of_ the fraction, not around it. If memory serves, he did the same thing for sqrt(15/16) (i.e. simplifying it to sqrt(15)/4).
In the 2nd equation you can't divide both sides by y unless it's non-zero. So you have to take into account the two solutions. Either y is non-zero and, therefore, you can solve for λ, or y =0. The same goes for the 3rd equation with respect to z.
Mistake in case b. The z equation implies that z = 1, so the constraint can't be satisfied. Mistake in case c. The y equation implies that y = 1, so the constraint can't be satisfied. Only case a needs to be checked.
Damian Sowinski actually, it doesn't. I thought it did as well, but if you think about it, in case B it just implies that z/z = 1, and not that z=1, so Z can still be anything (other than 0). Same logic for case C
@Evan2718281828 Hi there. Well, the reason is the following one, if I may respond to your question. The unit sphere is a compact set( it is closed and bounded ), and the function f in the problem is a continuous function. Any continuous function defined on a bounded set reaches its maximum and minimun on that set.
I don't understand the partial derivatives in this. The Lagrange function is (l=lambda): L(x,y,z,l)= f(x,y,z)+ l(h(x,y,z)) with f being the function and h(x,y,z) being the constraint. The partial derivative of L(x,y,z,l) would be: 2x+1+l(2x) = 0 2x+1 = -l(2x) etc. Why are the values on the right side not negative?
Because if you choose y=0 and λ=2 then the point you will obtain by solving the equation is (1/2, 0,0) which does not lie on the sphere same way you can check for the case z=0 and λ=3 then the point you will obtain is (1/4, 0,0) which again does not lie on the sphere as 0.25²+0²+0²≠1
The explanation an execution 10/10 but the only problem i had was keeping up with the cases. I'm still stuck on how these cases came to be and why so many?
Very late but here's an example of how extra can arise so as to elucidate that for future viewers: when we have lamba*3x=x (as an example), we can obviously find lamba=1/3 where x=/=0; however, this leaves us with the case x=0 where lambda can be ANY (0*lambda=0 for all lambda) This means that the only case in which lambda can be anything other than 1/3 is when x=0; thus, when we solve for other cases (e.g. lambda*y=2y => lambda=2 for y=/=0) we have the addendum x=0 as an additional condition. Edit: lastly, under these same circumstances, (0, 0, z) allows for any lambda and is a critical point per the aforementioned analysis. In this case, then, we have three candidates for extrema and can solve the systems of eq. for the given conditions in order to evaluate said extrema
what happens in a 2 variable case where, even after the partial differentiation you still have 2 variables (as well as lamba) in each equation?? How would I to solve for one variable/
great video , could you do a video including the algebra for getting the system of equations and solving those. additionally can you show how to get the max and min of a boundary. this would be extremely beneficial to apply to public finance problems which involve calculating externalities thank you
we can find variable x,y,z in terms of lemada and put them into equation and find value of lemada, and we can find extremum point for the equation easily.
What would be the problem with solving the constraint equation for y^2 and subbing it into F(x,y,z) thereby making F into a function of just x and z. Then you could take the partials of F wrt x and z, set them equal to zero and solve for x, y and z that way. Except I don't get all of the points you are arriving at. I'm just not sure why not. (I come up with only the point (1/2, sqrt(3)/2, 0).
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 🙏🙏🙏
Learnt the proof for Lagrangian when I was 16 at high school. They also taught many other proofs such as inclusion-exclusion via induction, mgf, pdf etc.
I tried to do this by myself, but failed after arriving at the system of equations. I understand it once Joel went through it and paused and completed once I was put back on track. Very messy!
We know two things 1. y = 0 or k = 2 2. z = 0 or k = 3 The final solution must result from a combination of these results. Therefore the following three cases arise: a) y = z = 0 b) y = 0 and k = 3 c) z = 0 and k = 2 Obviously, k = 2 and k = 3 is not possible.
at around 6:50ish when you were solving for the points, for y=0 and lambda=3, if you use 6z=lambda*2z, z would = 1 and x would be 0, why isnt that a possible max/min?
From my understanding, there are 2 sets of variables he's working with when coming up with case a and b. Think about it like y and Lambda y and z and Lambda z. For case A, he sets both y and z to 0. For B, y is still 0, but now he takes the lambda z component, which is 3. Hope this helps! I'm learning this as well, so apologies if I'm incorrect.
hello, i'm spanish, and i have a problem with a similar exercise. the function is T(x,y,z)=10xyz as (x,y,z) varies on the unit sphere x^2+y^2+z^2=1. My problem is, i don't know as resolve the exercise when obtein the values of x, y, z and lamda.
why wouldn't it be when y = 0 lambda = 2 and when z = 0 lambda = 3? That is the only thing that I'm not grasping about this video. Can anyone help me out?
What country are you in? I'm in Ireland and this wasn't on the Leaving Cert ( A-Level/ SAT) course.Maybe its on the Applied Maths/ optional maths course.
Hey can u help me with this: Maximize V (x,y, z) =x*y*z under the following two constraints: (a) 4 (x+y+z) =P; (b) 2 (x*y+y*z+z*x) =S; where P and S are known constants? I need the values of x,y,z in terms of P and S only.
Why case 2) lambda=3 and not lambda=2 same as case 3) lambda=2 and not lambda=3??? This is confusing at this part, or you just got the cases mixed up, but the rest of the discussion i got.
If you only get one point. than it means it is the only point where the gradient of g(x,y) is parallel to gradient of f(x,y), its safe to assume it is a maximum (most of the time it is), but if g(x,y) is like part of a circle with radius of 1 from π/4 to 3π/4 and lets say the gradient of f(x,y) is a vector field pointing to the origin (0,0) from all direction, than you will only get one point at (0,1) where the gradient of the two functions are parallel but you still need to evaluate the ends points of g(x,y): f(cos π/4, sin π/4) and f(cos 3π/4, sin 3π/4) to make sure if its a max or a min, in the example i just gave you it actually ends up as a min value. it gets complicated when your dealing with f(x,y,z) where instead of two end-points you have and and infinite number of end points on some curve to evaluate.
You wouldn't, since the function isn't differentiable at the minimum value. It has a cusp at its minimum of x=0, and doesn't work well with the principles of using differentiation to find extreme points.
***** If you say y=0, then lambda can be anything, because it will satisfy the eq. 4y = lambda*2y, so he wants to be able to say that either y AND another variable can be a certain value, or lambda AND another variable can be a certain value.
***** so in equ. 2, 4y = 2y*lambda. so y can either be 0 if not we can divide both sides by y which will give us lambda = 2. for 2 different conditions and only one can be true, hence either y = 0 or if y = a value then lambda = 2. same goes for the 3rd equation..and later it sums up to four different equations and each pair is exclusive condition to the other but not the second one. as the prior conditions were y=0 OR lambda=2 z=0 OR lambda=3 therefore we end up getting 3 different paired values.. if 1) y=0 and lambda = 3 2) y=0 and z=0 3) z=0 and lambda = 2 and we utilize each paired values in separate condition to the sphere equation of x^2+y^2+z^2 = 1, evaluating the other unknown variables x,y or z. which gives us the points mentioned. using those points in each module we put replace them on the objective function f(x,y,z) = x^2+x+2y^2+3z^2 and get the maximum as 25/8 = 3.125 for (1/4,0,+/-sqrt(15)/4) and minimum = 0 as there is no negative value for (-1,0,0)
He did not deduce it. It is one of the four possible combinations that would satisfy the second and third equations involving the derivatives of utility and constraints.
No illuminaty conspiracy theories or blaming jews for whatever reason!!! Sweeeet in 33 yrs old and im recently getting addicted to math problems when in highschool i was bad at it and hated Math. Is that normal or am i losing my mind?
Are you saying you're an ex-conspiracy theorist that has come to maths and science because you started studying into all the claims you were believing from your conspiracy theory sources? I'm 27 and I started studying this shit 5 years ago do to studying chemistry and biology to fact check all my GMO conspiracies.
Finally someone explains this stuff in a clear way.
My teacher is pretty bad, a minutes ago he was introducing this new topic and just did an exercise and he wasn´t able to get an answer pfff
13 years later and still saving calculus students... THANKS!
You made it look so much easier than my teacher! And my native language is spanish, so you are pretty awsome! thanks a lot
This video was very helpful for me. I was confused on how to solve the system of equations, but you really helped clarify things. Thank you!
Thank you very much, i was stuck on various problems and got many wrong answer, but thanks to this video everything is clear now and i can solve all the problems.
Joel is doing a great job with these home ed. videos! Very helpful indeed.
guys, if its on the unit sphere, then we can simplify the objective function: f = x + y^2 + 2z^2 + (x^2+y^2+z^2) = x + y^2 + 2z^2 + 1. Since we are looking for points on the unit sphere x^2+y^2+z^2 = 1
"x equals a heeaaaalf" !!!! 7:24
So?
People learn how to solve systems of equations in middle or early high school, but multivariable calculus, which is used here with calculating the gradients, along with the idea of lagrange multipliers themselves, is generally learned in late high school or early college (by people to whom applied math is of interest).
@9:48 I'm gonna crunch through all this calculus, but I'll just check my prior notes for the arithmetic, LOL! But very clear and nice breakdown.
I think the value for lamda for y and z is switch around becuase for the three possibility we suppose to check is
a) y=z=0
b) z=0 or lamda=3
c) y=0 or lamda=2
for b and c the lamda value is switch around please check it back.
couldn't be more simple.
He wrote it that way to simplify it. He took the square root of 4, but left the square root of three at the top. What he said was -+V(3/4) what he wrote was -+V(3)/2. which is the same thing.
1:17 This is what I didn't get. Why this, is a maximum when the gradient of the objective function is parallel to the gradient of the constraint function?
check lecture 13 of the 18.02 series
He simplified it. Say you have sqrt(16x). Since the square root of 16 is 4, this simplifies to 4sqrt(x). This works also for fractions. sqrt(x/16) = sqrt(x)/4.
The square root of 1/4 is 1/2, so bring the 1/2 out of the radical. What he said: sqrt(3/4). What he wrote: sqrt(3)/2. Notice the difference. It's maybe hard to see on his chalkboard, but his radical sits _on top of_ the fraction, not around it. If memory serves, he did the same thing for sqrt(15/16) (i.e. simplifying it to sqrt(15)/4).
This may sound fairly stupid but how did you get y=0 and z=0 in 4:37 I really don't understand.
In the 2nd equation you can't divide both sides by y unless it's non-zero. So you have to take into account the two solutions. Either y is non-zero and, therefore, you can solve for λ, or y =0. The same goes for the 3rd equation with respect to z.
I think you missed out on the Hessian Matrix part?
This helped me SOOOOOOOOOO MUCH! THANK YOU THANK YOU THANK YOU
Mistake in case b. The z equation implies that z = 1, so the constraint can't be satisfied.
Mistake in case c. The y equation implies that y = 1, so the constraint can't be satisfied.
Only case a needs to be checked.
Damian Sowinski actually, it doesn't. I thought it did as well, but if you think about it, in case B it just implies that z/z = 1, and not that z=1, so Z can still be anything (other than 0).
Same logic for case C
@Evan2718281828 Hi there. Well, the reason is the following one, if I may respond to your question.
The unit sphere is a compact set( it is closed and bounded ), and the function f in the problem is a continuous function. Any continuous function defined on a bounded set reaches its maximum and minimun on that set.
I don't understand the partial derivatives in this.
The Lagrange function is (l=lambda): L(x,y,z,l)= f(x,y,z)+ l(h(x,y,z)) with f being the function and h(x,y,z) being the constraint.
The partial derivative of L(x,y,z,l) would be:
2x+1+l(2x) = 0
2x+1 = -l(2x)
etc. Why are the values on the right side not negative?
@blkteg21 if choose y=0,lamda= 2, then 6z will not equal lamda.2z
same for z=0,lamda=3
Why can't you choose y=0, lamda=2 to be one of your cases, and z= 0, lamda = 3 to be the other?
Do you know now?
Because if you choose y=0 and λ=2 then the point you will obtain by solving the equation is (1/2, 0,0) which does not lie on the sphere same way you can check for the case z=0 and λ=3 then the point you will obtain is (1/4, 0,0) which again does not lie on the sphere as 0.25²+0²+0²≠1
The explanation an execution 10/10 but the only problem i had was keeping up with the cases. I'm still stuck on how these cases came to be and why so many?
Very late but here's an example of how extra can arise so as to elucidate that for future viewers:
when we have lamba*3x=x (as an example), we can obviously find lamba=1/3 where x=/=0; however, this leaves us with the case x=0 where lambda can be ANY (0*lambda=0 for all lambda)
This means that the only case in which lambda can be anything other than 1/3 is when x=0; thus, when we solve for other cases (e.g. lambda*y=2y => lambda=2 for y=/=0) we have the addendum x=0 as an additional condition.
Edit: lastly, under these same circumstances, (0, 0, z) allows for any lambda and is a critical point per the aforementioned analysis.
In this case, then, we have three candidates for extrema and can solve the systems of eq. for the given conditions in order to evaluate said extrema
@@AxiomaticUncertainty There should be 4 cases, why three?
@@mareshy i wasn't solving for the cases in the video; i was just giving an example of how we can end up with so many cases
Martín Huerta Y why should there be 4 cases? the 4th case seems to be lambda = 2 AND 3 which is impossible. maybe some case I’m missing?
@@mareshy lambda cant be 2 and 3 at the same time
By solving 6z=lambda*2z for lambda. Dividing both sides by 2z gives you lambda=3.
Same issue I found. I guess he got it mixed up
very good explanation. But it would be interesting to define the Lagrange function
what happens in a 2 variable case where, even after the partial differentiation you still have 2 variables (as well as lamba) in each equation?? How would I to solve for one variable/
Jessica Wong You would still have the conatraint function
Must be hard to teach in front of a camera when you have no feedback..Still you're doing a great job ! Thank you !
Great video. Thanks.. (:
OH BOY ! 9:32
Nice! This is a good explanation
This video was very cool!
great video , could you do a video including the algebra for getting the system of equations and solving those. additionally can you show how to get the max and min of a boundary. this would be extremely beneficial to apply to public finance problems which involve calculating externalities
thank you
I Really Like The Video Lagrange multipliers (3 variables) From Your
Actually, if x = 0, the first of the four equations, 2x + 1 = lamda * 2x would give you 0 + 1 = lamda * 2 * 0 => 1 = 0. Therefore, x must not be 0.
we can find variable x,y,z in terms of lemada and put them into equation and find value of lemada, and we can find extremum point for the equation easily.
It's lamda. Are you some bodybuilder?
@@hannukoistinen5329 yes i am
What would be the problem with solving the constraint equation for y^2 and subbing it into F(x,y,z) thereby making F into a function of just x and z. Then you could take the partials of F wrt x and z, set them equal to zero and solve for x, y and z that way. Except I don't get all of the points you are arriving at. I'm just not sure why not. (I come up with only the point (1/2, sqrt(3)/2, 0).
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 🙏🙏🙏
Learnt the proof for Lagrangian when I was 16 at high school. They also taught many other proofs such as inclusion-exclusion via induction, mgf, pdf etc.
Are the "false" solutions meaningful in a way or do they only appear due to the way we're solving the equation system?
I think it has something to do with imaginary numbers in the complex world
can't be the only person listening to this with ZZ Top in the background
I tried to do this by myself, but failed after arriving at the system of equations. I understand it once Joel went through it and paused and completed once I was put back on track. Very messy!
Very helpful, but can I ask where does case a come from?
We know two things
1. y = 0 or k = 2
2. z = 0 or k = 3
The final solution must result from a combination of these results. Therefore the following three cases arise:
a) y = z = 0
b) y = 0 and k = 3
c) z = 0 and k = 2
Obviously, k = 2 and k = 3 is not possible.
The instructor looks like an easter bunny!!!!!!!!
awesome ..you could do some examples with Karush-Kuhn-Tucker conditions ;)
Why don’t we need to examine the case when x=0?
It is easier than I thought! =D
at around 6:50ish when you were solving for the points, for y=0 and lambda=3, if you use 6z=lambda*2z, z would = 1 and x would be 0, why isnt that a possible max/min?
just dont understand why he picked y=z=0 and for b y=0 and lambda =3
From my understanding, there are 2 sets of variables he's working with when coming up with case a and b. Think about it like y and Lambda y and z and Lambda z. For case A, he sets both y and z to 0. For B, y is still 0, but now he takes the lambda z component, which is 3.
Hope this helps! I'm learning this as well, so apologies if I'm incorrect.
best explanation out there
why didn't you take the case of y=0 and lambda=2...and similarly with z??
This guy could lowkey play the Joker in the next Batman film. Just has that vibe.
Wow thank you. Very helpful.
Im learning this in my first year of university and I'm from england.. where are you even from
MIT
CA
@@leoliu7492 cant remember why I asked, but thanks!
His accent seems clear enough to me.
Where did you get y=0 when lambda = 3? I thought those were 2 separate cases.
hello, i'm spanish, and i have a problem with a similar exercise. the function is
T(x,y,z)=10xyz as (x,y,z) varies on the unit sphere x^2+y^2+z^2=1.
My problem is, i don't know as resolve the exercise when obtein the values of x, y, z and lamda.
why wouldn't it be when y = 0 lambda = 2 and when z = 0 lambda = 3? That is the only thing that I'm not grasping about this video. Can anyone help me out?
What country are you in? I'm in Ireland and this wasn't on the Leaving Cert ( A-Level/ SAT) course.Maybe its on the Applied Maths/ optional maths course.
Hey can u help me with this:
Maximize V (x,y, z) =x*y*z under the following two constraints: (a) 4 (x+y+z) =P; (b) 2 (x*y+y*z+z*x) =S; where P and S are known constants?
I need the values of x,y,z in terms of P and S only.
na
If I wasn't confused will I be watching you👀
Why case 2) lambda=3 and not lambda=2 same as case 3) lambda=2 and not lambda=3??? This is confusing at this part, or you just got the cases mixed up, but the rest of the discussion i got.
HydroXY31 y=0 OR lambda = 2. Not and. OR
Thank you very much!, very good explanation!.
in b)- y=0 or landa=2..why landa=3?
y=0 or lambda=2, in this case y is equal to 0 so lambda is then not equal to 2
he says y=0 AND lambda=3
lambda = 6z/2z
lambda = 3
@@robinjohansson8297 thanks dude I had the same doubt, your comment helped me a lot!
Very well done. Thank you!
will this be local or global extremas?
what do you do if you only get one point? is it a max a min or neither?
I'm here to find that answer as well. Did you figured it out ?
If you only get one point. than it means it is the only point where the gradient of g(x,y) is parallel to gradient of f(x,y), its safe to assume it is a maximum (most of the time it is), but if g(x,y) is like part of a circle with radius of 1 from π/4 to 3π/4 and lets say the gradient of f(x,y) is a vector field pointing to the origin (0,0) from all direction, than you will only get one point at (0,1) where the gradient of the two functions are parallel but you still need to evaluate the ends points of g(x,y): f(cos π/4, sin π/4) and f(cos 3π/4, sin 3π/4) to make sure if its a max or a min, in the example i just gave you it actually ends up as a min value.
it gets complicated when your dealing with f(x,y,z) where instead of two end-points you have and and infinite number of end points on some curve to evaluate.
Good job homie
Can someone share solution to this:
f(x,y) = (a*x^2 + b*y^2)/((a*x^2 + b*y^2)^.5)
Constraint: x^2 + y^2 = 1
Awesome ! Thanks sir !
this was very helpful ! thanks a lot! OH BOY ! :D
This was really helpful! Thank you!
How do you apply this method to solve min x under the constraint x^3-y^2=0 ?
You wouldn't, since the function isn't differentiable at the minimum value. It has a cusp at its minimum of x=0, and doesn't work well with the principles of using differentiation to find extreme points.
What is the value of lambda?
Merveilleux
its hard to decide the conditions
thank you....very helpful :)
why did you start y = 0 and lambda = 3, and not by y = 0 and lambda = 2 ? . How did you know the order among the variables?
***** If you say y=0, then lambda can be anything, because it will satisfy the eq. 4y = lambda*2y, so he wants to be able to say that either y AND another variable can be a certain value, or lambda AND another variable can be a certain value.
***** so in equ. 2, 4y = 2y*lambda. so y can either be 0 if not we can divide both sides by y which will give us lambda = 2. for 2 different conditions and only one can be true, hence either y = 0 or if y = a value then lambda = 2.
same goes for the 3rd equation..and later it sums up to four different equations and each pair is exclusive condition to the other but not the second one.
as the prior conditions were
y=0 OR lambda=2
z=0 OR lambda=3
therefore we end up getting 3 different paired values..
if
1) y=0 and lambda = 3
2) y=0 and z=0
3) z=0 and lambda = 2
and we utilize each paired values in separate condition to the sphere equation of x^2+y^2+z^2 = 1, evaluating the other unknown variables x,y or z. which gives us the points mentioned. using those points in each module we put replace them on the objective function f(x,y,z) = x^2+x+2y^2+3z^2 and get the maximum as 25/8 = 3.125 for (1/4,0,+/-sqrt(15)/4) and minimum = 0 as there is no negative value for (-1,0,0)
sulbrain uno what?
great question bruuh
how did he deduce that lambda = 3 at 6:40?
He did not deduce it. It is one of the four possible combinations that would satisfy the second and third equations involving the derivatives of utility and constraints.
good stuff, thanks.
I think you calculated wrong here. 6z = lambda*2z actually implicates
z=z. So it doenst give give us any valuable information.
Thank you!
Thank you.
For the average person, doing real world living, what is a practical use for any of this? What is this actually used for?
Production and forniture combination buy in, for an industry
thx...joel.......nice explanation.......:)
@1966lavc I had no problem hearing-_-
No illuminaty conspiracy theories or blaming jews for whatever reason!!! Sweeeet in 33 yrs old and im recently getting addicted to math problems when in highschool i was bad at it and hated Math. Is that normal or am i losing my mind?
Are you saying you're an ex-conspiracy theorist that has come to maths and science because you started studying into all the claims you were believing from your conspiracy theory sources?
I'm 27 and I started studying this shit 5 years ago do to studying chemistry and biology to fact check all my GMO conspiracies.
...and all the other conspiracies that are out there.
Thanks buddy, very useful :)
video wont load...
when you lower your voice we can not hear anything.
Like si piensas que los videos de los ingleses son mucho mejores explicando materia de universidad que los canales españoles o habla hispana.
Thaaannkk yoouu
thanks you very much
Simple and great LANGRANDE demistify :)
THANK YOUUUUU
Thanks!
Perfect!
thanks mit sir
Thumbs up if you did not pause the video at 0:41
very clear thx
Am I the only one who thinks he looks like James Aubrey in Bones