1. Limited time only! Sign up for a free 30min personal tutor trial with Chegg Tutors
    Dismiss Notice
Dismiss Notice
Join Physics Forums Today!
The friendliest, high quality science and math community on the planet! Everyone who loves science is here!

Lagrange Multipliers and Shadow Prices

  1. Oct 13, 2014 #1
    This is a homework in mathematical modeling and optimization; we're up to Lagrange multipliers and shadow prices.

    1. The problem statement, all variables and given/known data

    A manufacturer of PCs currently sells 10,000 units per month of a basic model. The cost of manufacture is 700$/unit, and the wholesale price is $950. The cost of manufacture is $700/unit, and the wholesale price is $950. During the last quarter the manufacturer lowered the price $100 dollars in a few test markets, and the result was a 50% increase in sales. The company has been advertising its product nationwide at a cost of $50000 per month. The advertising agency claims that increasing the advertising budget by $10000 a month would result in a sales increase of 200 units a month. Managemeny has agreed to consider an increase in the advertising budget to no more than $100000 a month.

    I have to find the price and advertising budget that will maximize profits, among other analyses.

    2. Relevant equations
    A main part of the exercise is to set up the relevant equations.

    3. The attempt at a solution
    Time is in months, money in dollars.
    Let u be the units sold and produced.
    I have that u starts at 10000. then I add 200a, where a is how much I'm increasing the advertising budget in 10000's of dollars.
    u = 10000 + 200a + ?
    where the "?" is how much more revenue edit: how many more units sold I'm getting by reducing the price.
    Also, the expenses are going to be equal to:
    c = 700u + (50000 + 10000a)
    where the quantity in parenthesis is the budget put to advertising.
    I don't know how to deal with the price variable and everything connected to it; what is it I'm increasing by 50%? The relation between pricing and everything else has me confused.

    Also, I have that the constraint is [itex]a \in [0..5][/itex], but that's an interval, not a curve, and don't I need the constraint to be a curve to use Lagrange multipliers?
    Last edited: Oct 13, 2014
  2. jcsd
  3. Oct 13, 2014 #2

    Ray Vickson

    User Avatar
    Science Advisor
    Homework Helper

    No, it is not a good idea to try to write "u = 10000 + 200a + ?" You should not try to add revenue to u; you should just increase u itself, by some relevant amount that depends on selling price s. Then revenue will be s*u---that is, selling price times all of u (due to whatever infuences and factors).

    I agree that some aspects of the problem are not well explained/documented. Presumably the basic 10,000 units per month are total (national or international) sales. Surely, a "few test markets" would not be the whole market, so we are not given information about the size of the test markets to which that 50% increase applies after the $100 sales price cut. Is that your problem? If so, I agree with you. Anyway, an issue is how the market changes when the prices changes by less or more than $100. Absent other information, all you can assume is "linearity", at least over a limited range. Again, though, the issue of the test market size rears its ugly head, and if I were doing this problem I would go to my instructor and ask for clarification. Barring that, I would just assume that the "test market" was the total market, and so assume the 50% applies to the whole 10,000. I wouldn't like it, but I would have no choice.

    BTW: do not start a new thread for the same problem; that is considered bad form and is against PF rules, I believe.
  4. Oct 13, 2014 #3


    User Avatar

    Staff: Mentor

    Sorry for that Ray, it's ok, I had asked him to start a new thread using the template for clarity, I linked the old thread with your response to this thread.
    Last edited: Oct 13, 2014
  5. Oct 13, 2014 #4
    I mistyped what I had u was, I edited it, I meant to say:

    u = 10000 + 200a + ?
    where the "?" is how many more units sold I'm getting by reducing the price.
    Let's then make the assumption that the test market behaves the same as the real market, i.e., assume the 50% would just scale to the whole market. So now what? Thanks.
  6. Oct 13, 2014 #5

    Ray Vickson

    User Avatar
    Science Advisor
    Homework Helper

    You tell me. If a $100 price reduction increases sales by 5,000 units, how much of an increase would you get for a $1 price cut? A $7 price cut? A price cut of c dollars?

    It is always a good idea to be careful about choice of units in variable definitions. Using ##u## for (in 000s of) units sold per month instead of units per month makes things a bit neater. Using ##a## for advertising budget increase (in $000s/month) gives a more manageable final model than if it was in straight $. So, in these units ##a = 10## stands for a $10000 budget increase and leads to a sales increase of ##\Delta u = 0.2## (000s). Assuming linearity, you can figure out ##\Delta u## for a symbolic amount ##a##, with ##0 \leq a \leq 100##.
  7. Oct 13, 2014 #6
    Where did you get that from? Are we saying that "increase by half" always means "increase by 5000"?
    Also, the choice of variables will make things more complicated for me in Maple, I can play with it later but right now I don't know how to set up Maple to assign variables like that.
    I also don't have an answer as to my interval instead of a curve problem.
  8. Oct 13, 2014 #7

    Ray Vickson

    User Avatar
    Science Advisor
    Homework Helper

    What is 50% of 10,000?
  9. Oct 13, 2014 #8
    Well I know that, but I assumed "increase by half" means "increase whatever we would sell otherwise", which is going to be more than 10000 after we put more money in advertising.
    Maybe I'm missing something fundamental? I'm trying to find u as a function of 2 variables, right? It's a function of the money put into advertising and also a function of the unit price?
    Let p be the unit price. Then I have both p being a function of u and u being a function both of p and a? Is that correct?
    So u = 10000 + 200a + (some function of p)?
    Last edited: Oct 13, 2014
  10. Oct 13, 2014 #9

    Ray Vickson

    User Avatar
    Science Advisor
    Homework Helper

    Assuming the price-cut experiment involved the fixed $50,000 ad budget, the percentage increase can be converted right away to a number of units. If you wanted to make the increase in sales come as a percentage of sales that include the effects of a variable ad budget, you will get a much more complicated model and which is much more "nonlinear". Try it and see!

    There is a final issue: must the advertising budget stay the same or increase, or can we allow it to decrease? Must the selling price remain at its current value or less, or can we allow it to increase as well?
  11. Oct 15, 2014 #10
    Putting up my current work on the problem in case anyone is curious. I realize checking the corner points was unnecessary, so I'l remove that part for the next draft.

    Attached Files:

    Last edited: Oct 15, 2014
  12. Oct 15, 2014 #11

    Ray Vickson

    User Avatar
    Science Advisor
    Homework Helper

    I avoid using ##d## as a variable name, since that is already reserved for the differentiation operation. So, you convert to an unconstrained problem in the two variables ##a,p##:
    [tex] \max F(a,p) \\
    0 \leq a \leq 5, \; p \geq 0[/tex]

    In such a problem you cannot necessarily set derivatives to zero; instead, the necessary conditions for an optimum at ##(a^*,p^*)## are as follows. In the notation ##F_a = \partial F / \partial a## and ##F_p = \partial F/\partial p## we have
    [tex] F_a \begin{cases} \leq 0 & \text{if }\; a^* = 0\\
    = 0 & \text{if }\; 0 < a^* < 5\\
    \geq 0 & \text{if } \; a^* = 5\end{cases}\\
    F_p \begin{cases} \leq 0 & \text{if } \: p^* = 0 \\
    = 0 & \text{if } \; p^* > 0 \end{cases}

    In a minimization problem the directions of the inequalities would be the reverse of the above.

    Since you are using Maple, you can always check your results using the "NLPSolve" routine in the "Optimization" package (invoked by 'with(Optimization)').

    If, instead, you want to use Lagrange multipliers, you can have the objective to be maximized just equal to (950-p)*u - C, and introduce the two defining equations for u = u(a,p) and C = C(a,p) as constraints. Then the necessary conditions for an optimum would be as above, but with derivatives of the Lagrangian instead of F.
  13. Oct 15, 2014 #12
    What's wrong with the way I did it?
  14. Oct 15, 2014 #13

    Ray Vickson

    User Avatar
    Science Advisor
    Homework Helper

    The formulation looks wrong to me. You seem to be applying the "cost" effect onto the "advertising" effect, leading to extra nonlinearities. OK, I guess that is one valid interpretation, but it is not the one I would choose. I used an additive model with U = 10000 + (2/100)(A-50000) - 50(S - 950) [units sold per month] and C = 700 U + A [cost ($/mo)], Profit = SU-C and S >= 0, 0 <= A <= 100,000 (so we can increase or cut the price, and decrease or increase the advertising budget) and got a slightly different answer from yours. (When using software such as Maple---which I do, always---one need not bother re-scaling, etc., because roundoff errors and numerical instability will not be an issue; it only matters---sometimes a lot--- when using other types of software. That is why I recommended using different units, but if you use Maple it does not make much difference.)

    The way you deal with the bound constraint condition is needlessly complicated---not wrong, just harder than it needs to be. I know what you are doing (viz., introducing the bound as a constraint and then applying Lagrange multipliers) but you have left out some important information when doing that: when you are at the boundary of an inequality constraint, the sign of the Lagrange multiplier is determined (by some rules I will skip here). In fact, one can tell the "solution" ##a=0, d = 0.25, \lambda = 40625## is wrong because the sign of ##\lambda## is wrong. In other words, ##a=0## is the wrong boundary. For similar reasons we can tell that ##a = 5## is the correct boundary because ##\lambda## now has the correct sign. Of course, you were able to eliminate the incorrect solution by just computing the profit at the two points and throwing out the lower one. That certainly works, and is maybe all you can do at this stage if you have not yet studied the Karush-Kuhn-Tucker conditions, but it is definitely not the best way.
  15. Oct 15, 2014 #14
    He says he doesn't care what model we use as long as we explain what we're doing. The problem is vaguely worded and allows for any number of interpretations.
    And we didn't deal with the Karush-whatever equations at all, so this is the way I know how. Granted you have to use the (3d) graph or the Hessian or test points around the solution to make sure that it is indeed a maximum, etc. We need to use Lagrange multipliers because we're analyzing λ as the shadow price, which is later on in the problem.

    What do you mean by defining custom units, can you please explain what you mean by that suggestion?
  16. Oct 15, 2014 #15

    Ray Vickson

    User Avatar
    Science Advisor
    Homework Helper

    I meant that when I did it in Maple I did not bother to use $000s for costs, $00s for price, 000s for units produced, etc. I just used numbers like 50,000, 950, 10,000 etc. without bothering to try making them smaller. Had I been using different software that would (possibly) not have been the best way to go.

    Note: in the problem ##\max f(x,y)\; a \leq x \leq b, \; y \geq c## the simple conditions like
    [tex] f_x \leq 0, f_x = 0, \text{ or }\: f_x \geq 0 [/tex]
    (according as ##x^* = a##, ##x^* \in (a,b)## or ##x^*= b##) already give you the shadow prices directly: the shadow price of the constraint ##x \geq a## is ##-f_x## (or, maybe ##+ f_x##, depending on how you define/use it) and the shadow price of ##x = b## is ##f_x##. These are, of course, just the Lagrange multiplier values themselves!

    BTW: I would be very careful about using Hessians to check for max or min in constrained problems. The actual optimality test in these cases needs the Hessian of the Lagrangian (not the objective you are optimizing!), and furthermore, that Hessian needs to be projected down into the tangent subspaces of the active constraints. Ouch!
  17. Oct 19, 2014 #16
    Okay, I am very confused as to what the book wants me to do next. It says:
    "Determine the sensitivity of the decision variables (price and advertising) to price elasticity (the 50% number)"
    "Determine the sensitivity of the decision variables to the advertising agency's estimate of 200 new sales each time the advertising budget is increased by $10 000"

    But the book never defines what decision variables are. In one place they seem to be the arguments of the objective function. I'm not getting useful answers on Google. I suppose the decision variables are a and d, but those aren't the same as advertising and price variables! In fact, I don't even know what the advertising variable is.
    The book defines the sentivity of x to y as ##S(x,y) = \frac{\mathrm dx}{\mathrm dy}\frac y x##

    edit: for now I'll just assume it's the derivative of the objective function WRT that variable.
    Last edited: Oct 19, 2014
  18. Oct 19, 2014 #17

    Ray Vickson

    User Avatar
    Science Advisor
    Homework Helper

    Decision variables are just that---they are the quantities under managerial/engineering control and whose values need to be decided. In this case there are two things that need deciding: the selling price p and the advertising budget a (= advertising variable).

    The 50% figure is a 'parameter' (part of the input problem data---not a decision variable, since we have no control over it), and the book is now asking you to see what happens to the optimal profit if you vary it a bit.

    BTW: when a book does not define some terms, an internet search works instead. Google 'decision variable' to see numerous articles that deal with this issue.
  19. Oct 19, 2014 #18
    I suppose I should have looked harder on Google. Thanks for the suggestion.
    Since the price set isn't a function of the parameter, am I right that the sensitivity of the price of the unit to the parameter given is 0?
  20. Oct 19, 2014 #19

    Ray Vickson

    User Avatar
    Science Advisor
    Homework Helper

    No. You can look at sensitivity
    [tex] \frac{dF^*}{da}\; \text{ or } \; \frac{dF^*}{F^*} \cdot \frac{ a}{da} [/tex]
    where ##F^*= ## optimal profit and ##a## is some input parameter, initially given as ##a = a_0##. In fact, I would say that this is the only definition of sensitivity that makes sense: if ##x## is a decision variable with optimum ##x^*##, what meaning could we attach to a quantity such as
    [tex] \frac{dF^*}{dx} = \left. \frac{dF(x)}{dx} \right|_{x = x^*} ? [/tex]

    This would answer the question "how much would the optimal profit vary if we go away from the optimal solution?" I suppose from one point of view that is not a bad question, since a 'nearby' value ##x_0## may be easier to use than the exact value ##x^*## (if, for example, ##x## is a machine setting and oddball settings are hard to achieve with accuracy). However, that is normally not what we mean when we speak of sensitivity---which, typically, refers to sensitivity with respect to input parameters.
  21. Oct 19, 2014 #20
    I'm sorry Ray, are you saying that even according to the book's definition of sensitivity, the sensitivity of the price variable WRT the 1/2 value is non-zero? Or are you saying that the book's definition isn't a good one? I don't know whether you're explaining the textbook or saying something different. The definition I have to work with is "the sensitivity of x to y" is S(x,y) = dy/dx x/y. When the book asks me what the sensitivity of the cost is to the 1/2 value, what else could it mean other than (dcost/dv) (1/2/cost*) (where the cost parameter is v) and cost* is the cost at the optimum that I found above? In which case dcost/dv = 0...
    Last edited: Oct 19, 2014
Know someone interested in this topic? Share this thread via Reddit, Google+, Twitter, or Facebook

Have something to add?
Draft saved Draft deleted

Similar Discussions: Lagrange Multipliers and Shadow Prices
  1. Lagrange Multiplier (Replies: 2)

  2. Lagrange Multipliers (Replies: 7)

  3. Lagrange Multipliers (Replies: 8)

  4. Lagrange Multipliers (Replies: 8)