Lagrange Multipliers | Geometric Meaning & Full Example

Video Statistics and Information

Video
Captions Word Cloud
Reddit Comments
Captions
one of the most powerful applications of calculus is optimization indeed if I'm given some function how do I know that functions can have a maximum and how do I know what's going to have a minimum however what we are going to do in this video is look at a special type of optimization a special type runtime maxims of minimums it's when they ask you to find the maximum or the minimum but I give you a constraint I give you a restriction for instance consider this graph what I have is just to grab some function the function X Y plus 1 and the graph itself will have has a saddle point at the point 0 0 but it then goes up in one direction forever and goes down in some other direction however if I impose a constraint if I say it has to be on this particular curve and I'm asking what is the maximum of this function restricted to that curve what is the minimum of this function restricted to that curve the blue curve that I put up here if I look at it in this the domain of my function it's just the equation of the circle x squared plus y squared is equal to 1 so in the domain I have a circle I'm saying you were restricted to that circle and then in the graph of the function you look at well what does the function do above that circle and the question is what's the maximum of the function of the circle what's the minimum of this function on the circle this video is gonna talk about something called LeGrande multipliers and the garag multipliers are gonna give us a method to figure out the maximums of functions like these when you're constrained to Pacific constraints like this circle for instance I've highlighted here in the red dots the maximum of the value of the function constrained live on the curve and then in the domain the two red dots say well later in the domain am I gonna have these maximum also looks like I have two minimums as well to help me understand what's going on here I put up contours of the graph of my function remember that what the contour is is you telling me the height is constant so I'm setting the function value this XY plus 1 equal to various constants and then I get these resulting curves so for instance if I set it equal to the value would have set equal to two you get one curve if I set it set equal to one point five you get a different curve and so on this gives you a bunch of level curves and then I want to I can look at what these look like in the domain as well well if I take the sort of bird's eye view and I'm going straight down then I get this similar kind of effect so I've got my blue circle the restriction and then the yellow curves are the level curves of the original function for instance if I take that set equal to two then I have this n equal to two books like two pieces of these curves and set equal to one point five is moving a little bit and so forth indeed the way I compute these is it that the output of my function is two so XY plus one is two then that means that X Y is one which means that Y is just one over X so indeed this curve here just representing the equation one over X in the domain and that it has the height of two now a voltage of the level curves one of them is special one of these level curves only just barely touches the restriction your focus just in on this one this particular level curve has the front great that this little curve goes right through what looks to be the maximum of this function and indeed if I look at what happens down in the domain that level curve it comes along and just barely kisses the constraints and this restriction that I'm choosing the particular level curve that comes in and just barely touches it that's gonna be my candidate to be maximum minimum well it just barely touches it it means something about the equation of tangent lines in particular what it means is that the equation of the tangent line to the constraint the equation B equals y squared equal one that's got a tangent line and the level curve also has a tangent line if they come along and just meet those tangent lines are the same thing so at the two spots where this particular curve comes and just barely touches the constraint curve then the tangent line is shared by both of these curves indeed if I put all other curves back on here again you see this case is pretty special you'll see that some of the level curves don't intersect at all and which things are just not relevant they can't be part of that constraint they're not even all on the constraint and then some of the level curves they come in and they intersect it at multiple places but those values have lower values are the ones that just comes and touch it the one spot if you imagine sort of continuously varying the height as you move your level curves up well as you go up and up and up and up by one point you just finally stop being subject to it indeed if I took that special one the one that's just come along and just kissed it if I moved it even a little bit higher it would no longer intersect the constraint any weight would no longer be relevant so the one on you to take inner level curve that just comes and kisses it that's gonna be your candidates for maximum and indeed we can see here we also have minimums where it just comes and kisses it in the other direction along Y blue minus X or just kisses affects your candidates to be minimums okay let's take this geometry and try to study in a bit more algebraic so I'm gonna return back to the simplified picture what I want to notice is that they share a tangent line then they're normals are also related for example let me look at the constraint the blue circle here there is a normal to that curve and you may recall that the gradient vector always is normal to a level curve so at these two points the gradient of G is normal to the particular level curve and indeed normal to this particular tangent line likewise if I look at the normals to the level curve of my function well I'm also going to get a gradient of F and my green and gradient G they're both normal to the same tangent line so the gradient of that then the gradient G are both normal to the same tangent line and it's greedy of that reading of G are both normal to the same tangent line what that means is they are scalar multiples of one another that the gradient of F might be twice or one half of the gradient G but either way it's in the same direction so this picture that I have motivates the LeGrande multiplier method and it goes a little bit like this there are two relevant equations here the first equation is relationship between these two gradient vectors is what we just talked about geometrically that the gradient of that is just some multiple of the gradient G lambda is just some constant and it says that these two vectors are just a multiple together and the other equation is when we began with we had their original constraining equation G equal to zero so that isn't going anywhere so that's still here so I'm kind of maximizing that means I've got these two conditions this business about these gradients being scalar multiples and the original constraint the Jeep with it's really okay so let's plug in the formulas and see what we get so first of all we started with our function f of X equal to this XY plus 1 that means that my gradient of that is just going to be Y X the gradient is the partial respect to X in the first component that just Y and partial derivative respect to Y in the second component that's just X then if I look at my constraint equation the G I can do the same thing what is the gradient of this well again I have to figure out the partial derivatives effective X partial respect to Y and what I'm gonna get is 2x and 2y both of these gradients are easy to compute so if I look at the two different equations that I sort of begin with it turns out that these two equations are really three equations in three unknowns the unknowns of the X and the y and this new thing we've come up as lambda so sorry unknown then X Y and lambda but there's really three equations because the first equation is a vector equation a gradient that is lambda grading of G is equated to two dimensional vectors so the first components of that is first component of grading f is lambda times the first important gradient G in other words just y equals lambda times 2x comparing the second coordinates of this now I'm saying X is lambda times 2y so the second component of gradient of F is equal to lambda times the second component of gradient of Chi and then my third equation is the good-old and strength we've always had the x squared plus y squared minus 1 is equal to zero so these are my three equations now depending on your problem the specifics of the algebra of solving these equations simultaneously that might change this particular case it's relatively straightforward what I do is I take the second equation X equal to land it to Y I'm going to plug into the first and that's going to give me the equation that Y is lambda times 2 times the lambda times 2y you put all that together you get Y is 4 y squared times y of this equation has two possible answers 1 the solution is just that Y is equal to 0 you just have 0 both sides if Y is no 1 0 that you can divide out by the 0 and then if you solve a gift lambda is equal to plus or minus 1/2 now in the first case if Y is equal to 0 then reading off either the first or second line you get that X is equal to 0 and 0 0 was not on the original ellipse the ellipse expert was y squared equal to 1 so this is just not actually a solution it's just not satisfied the third equation so another take the lambda equal to plus or minus 1/2 and plug this in this tells us you have a relationship between y and X Y is plus or minus x and now that I know this if I take the Y is plus or minus X and so the trick finally into that third equation into that constraint I get an x squared then I get a minus X all squared is equal to 1 this tells me 2 x squared is equal to 1 so X is plus or minus 1 over root 2 there's much more possibilities here X is plus or minus 1 over root 2 and Y is plus or minus those values so also plus or minus 1 over the square root of root 2 so there's four different possibilities where the X's and Y's so return back to the geometry where wrath of my function and where I've got my domain satisfied and what I've done is a taking two of those four points and what we can see is that for two of those four points those do represent the maxims of assumption if you wish you could plug these numbers into the function you get the value one point five that is the maximum of this function constrain to this particular equation likewise for the other two well they represented by shift the situation I now not ask for maximums but I asked for minimums they give you a slightly different pair of points and you get a different level curve now happens to be equal to the height of the 0.5 and these two points are at the minimums so notice that just by getting those four points I didn't know which was maxim's and which was minimums the idea of the garage multipliers is that this geometric analysis that we did gave a very nice extra equation but creating a path was lambda gradient of G but that equation was in addition to the constraint that we already had that U is 0 when I looked at those equations and solve them up but they gave me were all of my candidates to be maximums or minimums I didn't know which were maximums and minimums ahead of time but if you bend evaluate your function at the points in this case the four points that we've had you can see the two of them were going to be the same value maximum and two of them we're going to be the same value and the minimum if you have a question about this video leave it down in the comments below real mathematicians here we appreciate algorithms so let's just help the YouTube algorithm is video alike and finally if you want to watch more multivariable calculus videos this video is part of a larger playlist a multivariable calculus so you can check out those videos here and we'll do some more math in the next video
Info
Channel: Dr. Trefor Bazett
Views: 74,752
Rating: 4.9599442 out of 5
Keywords: Math, Example, Geometric, Meaning, Lagrange, Multiplier, Solution, Optimization, Constrained, Tangent, Constraint, Gradient, Contour, tangency
Id: 8mjcnxGMwFo
Channel Id: undefined
Length: 12min 23sec (743 seconds)
Published: Wed Nov 27 2019
Related Videos
Note
Please note that this website is currently a work in progress! Lots of interesting data and statistics to come.