If you're seeing this message, it means we're having trouble loading external resources on our website.

If you're behind a web filter, please make sure that the domains *.kastatic.org and *.kasandbox.org are unblocked.

### Course: Multivariable calculus>Unit 3

Lesson 5: Lagrange multipliers and constrained optimization

# Lagrange multiplier example, part 1

A Lagrange multipliers example of maximizing revenues subject to a budgetary constraint. Created by Grant Sanderson.

## Want to join the conversation?

• Grant Sanderson is da best.
• If the equation 20h + 2,000s = 20,000 had immediately been simplified (to h + 100s = 1000), would that have any downstream effect of our optimization? I ask because the gradient of g(h,s) would be different, and therefore the gradient of R would equal something different.
• The gradient of g would actually be different. It would've changed from [20, 2000] to [1, 100]. And it would've gotten you the same equations but lambda would've been different.

The unsimplified equations were
200/3 * (s/h)^1/3 = 20 * lambda
and
100/3 * (h/s)^2/3 = 20000 * lambda

The simplified equations would be the same thing except it would be 1 and 100 instead of 20 and 20000.
But it would be the same equations because essentially, simplifying the equation would have made the vector shorter by 1/20th. But lambda would have compensated for that because the Langrage Multiplier makes the vectors the same length, so the lambda would have been 20 times as big. You would have gotten the same maximized hours of labor and tons of steel.
Solving the problem was based on the assumption that the contours going to the origin won't give a maximum. But what if at those points the contours of the graph is higher?

Wouldn't that mean that it's not necessarily the max point and would depend on whether the graph curves up or down?
• You would need to have an understanding of the behavior of your function. In the given example, the function R(h,s) will increase as h and s increase. R(h,s) will be equal to zero at the origin. Thus our maximum point will be where the contour is tangent to our constraint function.
• How would someone generate a multivariable revenue function like that?
• How can REVENUE be a function of labor and steel COSTS? It seems to me that revenue should be the number of widgets sold times the selling price. PROFIT would be revenue minus the costs of production (labor and steel).
• I am solving a similar problem about budget constraints.I have a bunch of x,y,z values and I want to model an equation based on those datapoints.
In the video he uses direct equation but I have like 20 points and I want to model a best fit equation. Can someone help me
• How to get the extremum of a multivariable function?
• for example if i have a given problem that looks like this z=4x^2+3xy+6y^2 constraint to x + y =56