📱

Get Our Mobile App

Take your business learning on the go!

Download on the App StoreGet it on Google Play

Lagrange Multiplier Method and Utility Maximization

BurkeyAcademy23:26

Transcription

I got an email today from somebody asking me if I could show how to do a utility maximization problem, or perhaps a profit maximization problem, using Lagrange multipliers instead of the method that I've used in my other videos. And sure, I'm happy to do so. I've only got a few minutes, so um, what I want to do is quickly review what I do in my other videos. If, if you're not familiar with it, watch the other videos; I'll add some links here. Um, but normally the way I, I go about maximizing utility, say, is by setting the marginal rate of substitution, which is the slope of an indifference curve. And how do you find the marginal rate of substitution? Well, it's the derivative of the utility function with respect to X, the marginal utility of x, divided by the marginal utility of Y; that's just the derivative of utility with respect to y. And you set that marginal rate of substitution—so these are just the same thing here—set the marginal rate of substitution equal to the ratio of the prices of the two goods. And what that does is that, that ensures that the slope of the indifference curve, right here, is equal to the slope of the budget line here. The second condition for maximizing utility is that you spend all your money, so that the price of x * X plus the price of y * Y is equal to your budget. So these are the two equations that I teach how to maximize utility, and you can use similar sorts of uh, logic to maximize other sorts of uh, situation, say maximize profit given some sort of expenditure. Um, let's stick with utility; I'll do another one with, um, with profit maximization if, if somebody wants to, but the logic is kind of similar.

Now, in this case, if, if we just look at this specific utility function here, x to the point 6 * y to the point 2, it could be a production function instead. And if we look at, assume that the price of X is six, the price of Y is three, and you have $100 to spend, maximize utility using a, instead of my, uh, my method, use a Lagrange multiplier. Well, again, before we get to Lagrange multiplier, let me just set up this problem really quickly. I won't go through all the steps, but this is going to tie into what happens with the Lagrange multiplier problem, so I want you to see how easy the Lagrange multiplier problem is once you understand this method, because it's going to be basically the same thing. So, uh, using our, our tricks that I've discussed in, in earlier videos, this part of the equation is just going to be the ratio of the exponents times Y over x, which is going to be .6/.2 * Y/X, and instead of writing that, I'm going to simplify that to 3Y/X. Okay, so if you don't see why that, that is, watch my other videos. 3Y/X and set that equal to the ratio of the prices, uh, price of X over the price of y; 6/3 is just two. So that's the first equation in our process here. The second equation is just the budget constraint, which in this case is going to be 6X + 3Y = 100. Now, when you go through and you solve these two equations and two unknowns, I'll just tell you what the solution is, uh, so I don't go through all the steps here. The solution you're going to get is that the optimal amount of X is equal to 12.5, the optimal amount of Y is 8.3333333; I'll just round that off, and there you go.

Now, what's this Lagrange multiplier method? And it's a little more complicated, but why do we do it? And do we get anything out of it? So let's set that up. So what your professor is teaching you to do with the Lagrange multiplier method is set all this information up in one big equation, and that one big equation is going to look like this in general. So you're going to have this—your professor probably uses some notation like this, L for the Lagrangian equation—and the way you set it up is you just take your utility function, so x to the point 6, and what we want to do is maximize utility, so we're going to maximize utility, which is X to the point 6 * Y to the point 2. And then you've got to build in that budget constraint; the same thing we had over here, we're going to build that into the equation, but here's the way you do it: you add Lambda—this is what we call the Lagrange multiplier—and then we take this budget constraint and we write it this way: we solve it—wow, we don't really solve it, but we, we take it and we subtract this stuff and we put it on the right side here. So basically what you're doing is you're, you're solving this equation just so it's one equation set equal to zero. In other words, what you want to have over here for the is 100 - 6X - 3Y. And so this is your entire Lagrangian function, and, and what we want to do is maximize this equation, and we have three variables, three choice variables that we want to maximize this equation with respect to; we have to choose the right X, the right Y, and the right Lambda, and we have X and Y appearing over here too. So what, what you're doing with a Lagrange, uh, multiplier equation with this constrained maximization problem, it allows you to build in the constraint into the problem, and it allows you to build it in in a general way. This will work even in cases where this, this equation might not be a straight line; it might not be a simple kind of situation, so it's a little more general than this method that we're using: marginal rate of substitution equal the ratio of the prices and the budget line. So the, the big benefit of this, of setting up a constrained maximization problem this way is it allows you to solve, uh, more general situations, kind of problems than, than what we're doing here. There's also another benefit: this Lambda is actually interesting to talk about, and we'll, we'll talk about the value of Lambda when we get done, but let's just, let's just go through the mechanics here.

So we have our equations set up, and again with your budget line, you always want to put the value of your budget minus, and then price of x * x minus price of y * Y. And again, what we're doing here, when the reason is what we want to do is just put all this budget line on one side of an equation and set it equal to zero, so that's why we're moving that—subtracting that from both sides is really what we're doing. Now, what do we do once we've got this Lagrangian thing set up? Well, since we're maximizing this equation with respect to three variables, we have to do three derivatives instead of two, and the third is going to take care of the constraint, so that Lambda is building in the constraint. So what are these three derivatives going to look like? Let's number them here. So one, let's, let's take the derivative with respect to X; this is equation one. So take the partial derivative of the Lagrangian with respect to X, and we're going to have to bring in the derivative here, which is going to be .6X to the -.4 * Y to the .2, and then we've got this X over here also that we've got to take into account, and so we've got a plus Lambda times -6X, so we want to just take the derivative of that term—minus Lambda 6X with respect to X is going to be, um, minus 6 Lambda here. Okay, and since we're maximizing, we want to see where this equation is equal to zero, and or sorry, where the derivatives, not the equation, where the derivatives are equal to zero, and that's our first equation. Here's our second equation: take the derivative of the Lagrangian with respect to Y, so we're going to have .2Y to the -.8 * X to the .6, and then again here we have this Y, so the term, if we multiply Lambda all through, we're going to have a minus Lambda 3Y, and the derivative of that with respect to Y is going to be minus, uh, 3 Lambda, and again equals zero. Our third equation is taking the derivative with respect to that Lambda. Now that's an easy derivative to take because there's no Lambda over here, there's only Lambda here, and so we're going to have 100—Lambda, the derivative is 100, so 100, um, minus 6X—Lambda with respect to Lambda the derivative is just -6X. I mean, really we're just writing down on the budget constraint here—oop, that's not minus—minus 6X minus, actually let me write that a little closer here—minus, uh, 6X and -3Y, again equals zero, because when you're maximizing something you're looking to see where the slope equals to zero with respect to all three variables. So again, this is just the budget constraint; we could undo this moving over of the variables over here, and we could just add these back to both sides, and what do we have? We're just going to have our budget constraint back, so this is just exactly the same thing as 3Y + 6X = 100, so that's just the budget constraint. Um, and now your job is, if you're doing this using the Lagrangian multiplier method, is to solve these three equations for three unknowns: x, y, and Lambda.

Now, if all you want to do is find the optimal amount of X and the optimal amount of Y, if that's all you have to do in this problem, then I have a simplification for you, and that simplification is one way that you can, um, take a system of equations and solve for some of the variables is to take two equations and divide them by each other; that's a way to build them in together. For example, um, let me just, so I don't do anything disturbing, I want to divide this, these two equations by each other, let me just draw a line here, here, so we can divide the top equation by the bottom equation. Now what you're, what you're going to say is, uh, Dr. Berky, wait, you don't want to divide zero by zero; that's, that's a problem; you need a math degree to do that. So before I do that, let me just, in the top equation, I'm going to add six Lambda to both sides, which is going to change the equation like this: I'm going to just, I want that equation to look like that now, so .6X to the -.4Y to the .2 = 6 Lambda, right? Nothing magic; I'm just rearranging, moving that to the other side of the equal sign, and I'm going to do the same thing here: add three Lambda to both sides, and that simplifies things a little bit. Now we can divide these equations, and we don't have to divide by zero; it wouldn't have mattered before, but you know, I get touchy when people try to divide things by zero. And what are we going to end up with when we divide those equations by each other? Well, believe it or not, what you're going to get is this equation right here; let me put it in, circle it in red; you're going to get that. Now, how? Well, if, if you've watched my videos about marginal rate of substitution, let's, let's just see what's going to happen: 6/2 is three, X to the -.4 / X to the .6 is X in the denominator, Y to the .2 divided by Y to the -.8—subtract those exponents—and you get Y, so we get 3Y/X equals what's on the right side: 6/3 is 2, Lambda over Lambda cancels, and so you get the same thing, guys. Even if you do it with this Lagrangian multiplier method, you're left really with two equations: number one, marginal rate of substitution equals ratio of the prices, and the budget constraint is your second equation. So what's the big deal, Dr. Berky? Why is it that my professor wants me to do it this way with the Lagrangian, uh, multiplier method? Well, as I said before, the first benefit is if you understand this method of here's what you want to maximize, here's a constraint, then this Lagrangian multiplier method can be used in all sorts of different contexts where memorizing this idea—marginal rate of substitution equals ratio of the prices—that's a little more limited, right? So this is a powerful mathematical technique, number one. Number two, the Lambda itself is kind of interesting. Now, why is that? Well, let's, let's just take one of these two equations here that has Lambda in it, say the first one, and so what we have in this first equation is that six Lambda—let me change, change my color there—that 6 Lambda = .6 * X to the -.4 * Y to the .2, and if we solve that for Lambda, we're just going to divide both sides by six. Okay, so, um, we get this function of Lambda after we have solved the equation, and again, if I had to solve the equation in this case, I would just use these same two equations we did before; it works that way. Um, and then once we get our answer that X = 12.5 and Y = 8.33, then plug those values into this equation. So for X, plug in 12.5, for Y plug in 8.33, and if after you evaluate that function, then you get the answer that Lambda equals approximately .0556, and that means something, and it's a little, it's kind of interesting in this problem, not as much as in some other problems. What the Lambda means is if we were to, in this context of, of maximizing utility, what the Lambda means is if I were to relax the constraint by one unit. Now, what does that mean? Well, the constraint is that you only have a hundred bucks; if I relax the constraint by one unit, that means I'm giving you one more dollar to spend, then what this Lambda tells you is how much will your utility go up. So suppose you've already spent $100 and you bought 12.5 X and you've bought 8.33 Y's; if I were to give you one more dollar to spend on the optimal amount of X and Y, this Lambda tells us that your utility would go up by .0556. It tells us the slope of the utility function in the direction that you would want to go to maximize your utility.

Let's look at this on a graph real quickly. So here's a graph of this utility function, U = X to the .6 * Y to the .2, and the X axis is along this side, and Y axis is along this side, I think, and I have drawn in the budget constraint; that's like a wall that you hit. Now, if it wasn't for that wall, we'd have an unconstrained maximization problem, and we could just keep consuming X and Y, and we could keep going up the hill higher and higher and higher and getting higher and higher utility, living the big life, but because of this wall, we're constrained, and we're spending our money, spending our money, and we're going to hit that wall, and we're going to have to stop. Now, if we look at the overhead view of this—let me turn this up here—you can see the budget constraint, and normally it would extend up if we were making a good graph of this; I apologize, but we want to see where the highest indifference curve—maybe this one—is tangent to the budget line, and here's, you know, looks like about 12 1/2 X and about 8.33 Y. And so what the, what that Lambda, what that Lagrange multiplier, the value of it, the .0556, is telling us is if, if we could relax this constraint by $1, move it out this way just a little bit, how much would your utility increase? And graphically what we're looking at is really kind of what's the slope of this utility surface as we move in this direction, uh, when we're consuming the optimal ratio of X's and Y's. If you were to give me one more dollar, how much higher up on that, you know, so look at the units of utility over here, just one more dollar, how much more utility could I get? What's my marginal utility for one more dollar spent in the optimal way? So that's what that Lambda means. Now, let's, let's think about this in, suppose a different context, in a different context, uh, think about what if, uh, instead of this being a utility function, what if this were a production function, and what if this were the, uh, amount of money my boss was letting me spend on, instead of X and Y being goods, labor and, and, uh, capital goods, then what would the Lagrangian multiplier mean? What would this .0556 mean in that case? Well, it would mean that if, if I were allowed one more dollar in budget to buy materials with, to invest in producing this good, it would mean how much additional output I could get would be .0556 units. And I know that doesn't sound like a lot, but this could be .05556 million units or something like that. So I hope this brief—I know this is all my, all my brief videos are long—but I hope this brief look at the Lagrangian multipliers and how, what you're really doing, what the mathematics is really getting at, um, when you do a constrained maximization for a utility problem, you end up with the same two equations that you would if you did the marginal rate of substitution equals ratio of the prices and the budget constraint method, but it does give you one more bit of information here, which is how much higher would my optimal value be if I could relax my constraint by one unit. In other words, changing that, um, changing that constraint from $100 to $101. If you really want to understand this, do that problem and solve it again; in other words, calculate the optimum, the maximum utility with the budget constraint of $100, and then do it again changing that to 101 and see how much your utility changes with $100 versus 101, and you'll find that it'll be almost exactly equal to an increase in utility of .0556 when you do that slight difference due to the curvature of the utility surface changing. Okay, I've made this long and complicated enough; I'm interested to hear what your, your additional questions and comments are related to Lagrange multipliers. Please leave them in the comment, uh, section below or send me an email; I would be happy to do some more on this topic. This is Berky Academy signing out.