yego.me
💡 Stop wasting time. Read Youtube instead of watch. Download Chrome Extension

Lagrange multiplier example, part 2


4m read
·Nov 11, 2024

So where we left off, we have these two different equations that we want to solve. Um, and there's three unknowns: there's S, the tons of steel that you're using; H, the hours of labor; and then Lambda, this Lagrange multiplier we introduced that's basically a proportionality constant between the gradient vectors of the revenue function and the constraint function.

And always the third equation that we're dealing with here to solve this is the constraint itself that gives us another equation that'll help solve for H and S, and ultimately Lambda if that's something you want as well.

So as kind of a first pass here, I'm going to do a little more simplifying, but I'm going to make a substitution that'll make this easier for us. So I see S over H here, and they're both to the same power, so I feel it might be a little bit easier if I just substitute U in for S / H. What that'll let me do is rewrite this first equation here as 3/23 * U^(1/3), and that's equal to 20 * Lambda.

Then likewise, what that means for this guy is, well, this is H over S, not S over H, so that one's going to be 1003, not times U^(2/3), but times U^(-2/3) because we swapped the H and S here. So that's U^(-2/3), and this is just to make it a little bit cleaner; I think we kind of want to treat H and S in the same package.

Now let me go ahead and put all the constants together, and I'm going to take this guy and multiply it by 3, divide by 200, and multiply both sides of that just to cancel out what's on the left side here. What that's going to give me, and I'll go ahead and write it over here, kind of all over the place, U^(1/3) is equal to, let's see, 3/200. So that 20 almost cancels out with the 200; it just leaves a 10, so that's going to give me 3/10 * Lambda.

Then similarly over here, I'm going to take this whole equation and multiply it by 3 over 100, and what that's going to leave me with is that U^(-2/3) is equal to, let's see, this 2,000 when we divide by 100 becomes 20, and that 20 * 3 is 60. So that'll be 60 * Lambda.

Alright, so now I want a way to simplify each of these, and what I notice is they look pretty similar on each side. You know that it's something related to U equal to Lambda. So if I can get this in a form where I'm really isolating U, that would be great. The way I'm going to do this is I'm going to multiply each one of them by U^(2/3).

I'm going to multiply it into this guy, and I'm going to multiply it into that guy because on the top it's going to turn this into just U, which will be nice, and on the bottom, it'll cancel out that U entirely. So it feels like it'll make both of these nicer, even though it might make the right side a little uglier. Those right sides will still kind of be the same, and we'll take advantage of that.

So when I do that to the top part, like I said, that U^(1/3) * U^(2/3) ends up being U, and then on the right side we have our 3/10 * Lambda but now U^(2/3). Then on the bottom here, when I multiply it by U^(2/3), the right side becomes one because it cancels out with U^(-2/3), and the right side is 60 * Lambda * U^(2/3).

Now these right sides look very similar, and the left sides are quite simple, so I'm going to multiply this top one by whatever it takes to make it look exactly like that right side. So in this case, I'm going to multiply that top by 10, which will get it to 30, and then by another 20 to make that constant 60.

So I'm going to multiply this entire top equation by 200, and what that gives me is that 200 * U is equal to 60 * Lambda * U^(2/3). Now these two equations have the same right side, so this is the same as saying 200 * U is equal to, well, one, because each one of those expressions equals the same complicated thing.

And now, 200 * U, well that's S / H, so this is the same thing as saying 200 * (S / H) = 1, which we can write more succinctly as H is equal to 200 * S. Great! So I'm going to go ahead and circle that: H is equal to 200 * S.

Now what we apply that to is the constraint: 200 * H + 2,000 * S equals our budget. I'll go ahead and kind of write that down again: that our 20 * H, I think 20 * the hours of labor plus $2,000 per ton of steel is equal to our budget of $20,000.

Now we can just substitute in. Instead of H, I'm going to write 200S. So that's 200; sorry, 20 * 200S plus 2,000 * S is equal to 20,000. Now this right side, 20 * 200 is equal to 4,000, and I'm just going to go ahead and kind of write, so this here is 4,000S.

So the entire right side of the equation simplifies to 6,000S is equal to 20,000, and when those cancel out, what that gives us is S is equal to 20 / 6, which is the same as 10 divided by 3.

So that's how many tons of steel we should get. S is 10 over 3. Then when we apply that to the fact that H is 200 * S, that's going to mean that H is equal to 200 times that value, 10 over 3, which is equal to 2,000 over 3. That's how many hours of labor we want.

So evidently, in our original problem where we have this model for our revenue function for our widgets, with $20 per hour of labor and $2,000 per ton of steel, with a budget of $20,000, the allocation that you should make is to buy 10/3 of a ton of steel and 2,000/3 hours of labor.

More Articles

View All
The Entire History of Space, I guess
[Music] Earth and civilization as we know it has come a long way in the past 200,000 years and has experienced a multitude of changes. In that time, the human species has only existed for a mere 0.0015% of the immense 13.7 billion year age of the universe…
TRUMP JUST STORMED WALL STREET
What’s up, grab it’s guys here. So, normally I don’t make videos like this, and I tend to stay away from anything involving politics. But today we gotta talk about one of the most requested topics of investing that stands to make or lose people a lot of m…
Distillation | Intermolecular forces and properties | AP Chemistry | Khan Academy
Let’s say that you have a solution where the solvent is water and the solute is what we would consider drinking alcohol or ethanol. So, this is our solution right over here. Let’s say that it is 10 percent ethanol, which is drinking alcohol, and let’s say…
A private jet for $500,000?
Steve: “I’ve heard about these jets called Haers. Yeah, what about them? I didn’t even know they exist. Could you tell me a little bit more about them?” Sure, of course! Come over here. These are the airplanes. They’re really inexpensive from the standpo…
“The US Economy is Collapsing Before Our Eyes” - Billionaire Sam Zell’s Economic Warning
When you think about, we added about 7 trillion to our debt in three years. Uh, this is, this is, you know, this is the Weimar Republic. And if the United States isn’t careful, they’re going to find themselves in the Weimar Republic. If we lose the U.S do…
Phototropism | Plant Biology | Khan Academy
You’ve probably seen plants either in your house or, if you go for a walk, you’ve seen parts of the plants twist and turn in all sorts of directions. If you observe closely, you’ll see that oftentimes it looks like the plant is twisting or turning towards…