Problem 2.4.6 Computer Sales

NOTE: This is an unevaluated Mathematica notebook!

A manufacturer of personal computers currently sells 10,000 units per month of a basic model. The cost of manufacture is $700/unit, and the wholesale price is $950. During the last quarter the manufacturer lowered the price $100 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 $50,000 per month. The advertising agency claims that increasing the advertising budget by $10,000/month would result in a sales increase of 200 units/month. Management has agreed to consider an increase in the advertising budget to no more than $100,000/month.

Determine the price and the advertising budget that will maximize the profit.

The Question

The variables in this problem are, with the units in brackets, and any constants which the problem provides given:

({{Variable, Definition, Units, Constant/Variable}, {nc, \(number\ of\ computers\ currently\ sold\), units/month, constant, 10000 units/month}, {mc, cost of manufacture, $/
              unit, constant, $700/unit}, {wp, wholesale price, $/
              unit, constant, $950/unit}, {pr, price reduction, $/
              unit, constant, $100/unit}, {prsi, price reduction sales increase, %,  
            no unit, constant, 50  %}, {ab, advertising budget, $/month, variable}, {abi, advertising budget increase, $/
              month, constant,  $10 000/month}, {abisi, ad budget increase sales increase, units/
              month, constant,  200 units/month}, {n, number of computers sold, units/month, variable}, {P, profit, $/month, variable}, {pc, price per computer, $/unit, variable}, {cab, current ad budget, $/
              month, constant,  $50 000/month}})

The number of computers sold is given by either:
n = nc* (1 + (wp-pc)/pr * prsi) +  (ab - cab)/abi * abisi
or
n=(nc+(ab-cab)/abi*abisi) (1+(wp-pc)/pr*prsi).
The first equation decouples the increase in sales due to a reduced price and the increase in sales due to the increased ad budget. The second equation says that the ad budget will change the number of computers sold, and then the decrease in price will increase the sales by a percentage of those sales.

The profit is given by:
Profit = n * (pc-mc) - ab

The constraints for this problem are:
ab ≤ $100 000/ month. (constraint given by management)
pc ≥ $700 / unit. (or we will be selling the computers for less than they cost to make)

We want to find the price and the advertising budget which will maximize the profit.

Select the modeling approach

We will model this problem as a two dimensional constrained optimization. We will solve using Lagrange multipliers.

Formulate the model

We wish to maximize the profit. Without any changes in price or advertising, the profits would remain at $2.45M/month.
The constants in the problem are given as:

nc  =  10000;
mc  =  700;
wp  = 950;
pr  =  100;
prsi  =  50/100;
abi  =  10000;
abisi  =  200;
cab  =  50000;

We can now look at the two different ways of modeling the number of computers sold. I will do this with contour plots.

First, we can plot the number of computers sold modeled with the two types of increase (ad budget and price reduction) uncoupled. This function, along with the resulting profits, is contained in the following diagrams.

n = 
      nc*(1 + (wp - pc)/pr*prsi) + (ab - cab)/abi*
          abisi
plot1  =  
      ContourPlot[n, {pc, 700, 950}, {ab, 50000, 200000}, 
        Contours -> 10, PlotPoints -> 40, 
        FrameLabel -> {"Price", "Ad Budget"}]
Profit[pc_, ab_]  =  
      Simplify[n*(pc - mc) - ab]
Plot3D[Profit[pc, ab], {pc, 700, 1100}, {ab, 50000, 150000}, 
      PlotRange -> {0, 3200000}, ViewPoint -> {1, -1, 1}, 
      ColorFunction -> Hue, 
      AxesLabel -> {"Price", "Ad Budget", "Profit"}]

Secondly, we can plot the number of computers sold as modeled by coupling the two types if increase. The results follow.

n = (nc + (ab - cab)/abi*abisi) (1 + (wp - pc)/pr*
              prsi)
plot1  =  
      ContourPlot[n, {pc, 700, 950}, {ab, 50000, 200000}, 
        Contours -> 10, PlotPoints -> 40, 
        FrameLabel -> {"Price", "Ad Budget"}]
Profit[pc_, ab_]  =  
      Simplify[n*(pc - mc) - ab]
Plot3D[Profit[pc, ab], {pc, 700, 1100}, {ab, 50000, 150000}, 
      PlotRange -> {0, 3200000}, ViewPoint -> {1, -1, 1}, 
      ColorFunction -> Hue, 
      AxesLabel -> {"Price", "Ad Budget", "Profit"}]

We can see the difference in the contour plots of the number of computers sold, as well in the three dimensional plots of the profit. At this point we have to choose which model to use. I am going to use the uncoupled model, because the justifications for each way to increase profits seems to be independent of the other. Therefore, I will assume the profits are given by

n = 
        nc*(1 + (wp - pc)/pr*prsi) + (ab - cab)/abi*
            abisi;
Profit[pc_, ab_]  =  Simplify[n*(pc - mc) - ab]

The contour plot of the profit looks like:

contour1  =  
      ContourPlot[Profit[pc, ab], {pc, 700, 1000}, {ab, 50000, 150000}, 
        Contours -> 30, PlotPoints -> 40, 
        FrameLabel -> {"Price", "Ad Budget"}]

From this, it looks like the maximum profit will occur if we have an advertising budget of $100,000/month and sell the computers for around $930/ unit.

Unit Check:  	
n: [units/
            month]  =  [units/month] ( 
                1  +  (([$/unti]  -  [$/unit])/([$/unit]))[
                    no   unit] )  +  (([$/month]  -  [$/
                        month])/([$/month]))[
              units/month]  =  [units/month]
Profit: [$/
            month]  =  [unit/
                  month] ( [$/unit]  -  [$/
                      unit])  -  [$/month]  =  [$/
              month]
The units are ok!

Solve the model and answer the question

Now, we wish to solve the model. We will do this using the method of Lagrange multipliers. First, let's examine the feasible region and see what we can guess about the solution. We have a feasible region which is given below.

region  =  
      Plot[100000, {pc, 700, 1000}, 
        PlotRange -> {50000, 150000}]

Show[contour1, region]

The feasible region includes pc ≥ 700,  
      ab  ≤  100 000. We can see that the profit would increase if we could relax the restriction that the advertising budget had to be less than $100 000 / month. Let's solve the problem using Lagrange multipliers and see what we find. The constraint we are interested in is g(pc, ab) = ab = 100000. We can tell from the contour plot that the global maximum profit will lie outside our constraint region, and the maximum profit will occur somewhere along this constraint line, at the point where the level curve for the profit touches the line and has a horizontal tangent.

g[pc_, ab_]  =  ab;
eq1  =  
        D[Profit[pc, ab], pc]  ==  
          LM D[g[pc, ab], pc];
eq2  =  
        D[Profit[pc, ab], ab]  ==  
          LM D[g[pc, ab], ab];
eq3  =  g[pc, ab] == 100000;
Solve[{eq1, eq2, eq3}, {pc, ab, LM}]

So we see that the profit will be maximized if the price per computer is $935 / month and the advertising budget is $100000 / month. This agrees well with our guess from above. The profit would be increased by $211250/month (as shown below).

Profit[935, 100000]
Profit[935, 100000] - Profit[950, 50000]

Lagrange Multipliers and Shadow Prices

We can use our knowledge of Lagrange multiplier and shadow prices to convince management that they should raise the advertising budget above $100000/month. The Lagrange multiplier we found was 37/10, and that can be interpreted as the rate of change in the maximum profit as the constraint (here, the upper limit on the ad budget) is relaxed. Our Lagrange multiplier tells us that if we increase the ad budget $10/month over $100 000 /month, then the profits will increase by $37/month. As I am not a trusting soul, I will repeat the calculation (which is very easy in Mathematica!) to verify this.

g[pc_, ab_]  =  ab;
eq1  =  
        D[Profit[pc, ab], pc]  ==  
          LM D[g[pc, ab], pc];
eq2  =  
        D[Profit[pc, ab], ab]  ==  
          LM D[g[pc, ab], ab];
eq3  =  g[pc, ab] == 100010;
Solve[{eq1, eq2, eq3}, {pc, ab, LM}]

N[Profit[467501/500, 100010] - Profit[935, 100000] ]

And we see that indeed, increasing the ad budget to $100010/month would result in an increase in profits of $37/month. It is an increase, but not a very large one!

The key word in this analysis is relaxed, and that means that these extensions are only true when we are changing the value of the constraint slightly. Obviously, the company cannot arbitrarily increase the advertising budget, nor would they want to--other factors would undoubtedly come into play. However, if they are happy with the level of detail contained in this model, then they may wish to consider increasing the ad budget over the $100000/month limit.

Sensitivity Analysis: The Management's Ceiling on the Advertising Budget

The last thing we need to consider is sensitivity analysis. In fact, that has already been done in one sense. We know the sensitivity of the profit to the advertising budget constraint is related to the Lagrange multiplier, 37/10. This allowed us to make our statements regarding the shadow price above. However, let's verify that that is actually true. This will also show how we can check sensitivity to the constraint. 

What we do is change the constraint $100 000/month to a variable, α, and then solve the problem for the optimal price per computer and the optimal advertising budget.

nc  =  10000;
mc  =  700;
wp  = 950;
pr  =  100;
prsi  =  50/100;
abi  =  10000;
abisi  =  200;
cab  =  50000;
n = 
        nc*(1 + (wp - pc)/pr*prsi) + (ab - cab)/abi*
            abisi;
Profit[pc_, ab_]  =  
        Simplify[n*(pc - mc) - ab];
g[pc_, ab_]  =  ab;
eq1  =  
        D[Profit[pc, ab], pc]  ==  
          LM D[g[pc, ab], pc];
eq2  =  
        D[Profit[pc, ab], ab]  ==  
          LM D[g[pc, ab], ab];
eq3  =  g[pc, ab] == α;
Solve[{eq1, eq2, eq3}, {pc, ab, LM}]

Now, we can define the optimal price per computer, and optimal advertising price, in terms of α, which is the upper limit for the advertising budget that is imposed by management.

opc  =  ((4575000 + α)/5000);
oab  =  α;
D[Profit[opc, oab], α]  /.  α -> 
        100000
sensP[α_]  =  
        D[Profit[opc, oab], α] α /
            Profit[opc, oab];
N[sensP[100000]]

Notice that the derivative of the profit with respect to the variable advertising budget evaluated where the advertising budget is $100000/month is the same as the Lagrange multiplier we found above. This is neato! The sensitivity is 0.14, which is about 3/20, which means a 20% increase in the ceiling on the advertising budget would produce a 3% increase in the profits. Again, I am mistrustful, so let's work it out. Below, I increase α from 100000 to 100000 * 1.2, and calculate the optimal profit.

nc  =  10000;
mc  =  700;
wp  = 950;
pr  =  100;
prsi  =  50/100;
abi  =  10000;
abisi  =  200;
cab  =  50000;
n = n = 
          nc*(1 + (wp - pc)/pr*prsi) + (ab - cab)/abi*
              abisi;
Profit[pc_, ab_]  =  
        Simplify[n*(pc - mc) - ab];
g[pc_, ab_]  =  ab;
eq1  =  
        D[Profit[pc, ab], pc]  ==  
          LM D[g[pc, ab], pc];
eq2  =  
        D[Profit[pc, ab], ab]  ==  
          LM D[g[pc, ab], ab];
eq3  =  g[pc, ab] == 100000*1.2;
Solve[{eq1, eq2, eq3}, {pc, ab, LM}]

If we calculate the percentage increase in profits, we see that it is about 3%. All is well.

N[(Profit[939, 120000] - Profit[935, 100000])/
        Profit[935, 100000]]

Sensitivity Analysis: Percentage Increase in Sales When Price Reduced $100

Let's do another sensitivity analysis. Personally, I think that 50% number is pretty high, and possibly wrong, for the percentage increase in sales when prices are dropped by $100. I have to believe what my marketing gurus tell me, but I want to see how susceptible the optimal profits are to that number. I will proceed by setting the 50% to a variable, and solving the problem in terms of that variable. Here we go! (Mathematica makes these sorts of checks very easy to perform--the work in solving a problem is in setting it up, once it is set up it is almost a shame to stop working on it!)

nc  =  10000;
mc  =  700;
wp  = 950;
pr  =  100;
prsi  =  α/100;
abi  =  10000;
abisi  =  200;
cab  =  50000;
n = n = 
          nc*(1 + (wp - pc)/pr*prsi) + (ab - cab)/abi*
              abisi;
Profit[pc_, ab_]  =  
        Simplify[n*(pc - mc) - ab];
g[pc_, ab_]  =  ab;
eq1  =  
        D[Profit[pc, ab], pc]  ==  
          LM D[g[pc, ab], pc];
eq2  =  
        D[Profit[pc, ab], ab]  ==  
          LM D[g[pc, ab], ab];
eq3  =  g[pc, ab] == 100000;
Solve[{eq1, eq2, eq3}, {pc, ab, LM}]

Not surprisingly, the optimal advertising budget remains at $100000/month, and is independent of α. Now, we can define the optimal price per computer, and optimal advertising price, in terms of α%, which in this case is the percentage that sales increase when the price of the computer is reduced $100.

opc  =  ((275 (20 + 3 α))/α);
oab  =  100000;
sensP[α_]  =  
        D[Profit[opc, oab], α] α /
            Profit[opc, oab];
sensopc[α_]  =  
        D[opc, α] α /opc;
sensoab[α_]  =  
        D[oab, α] α /oab;
N[sensP[50]]
N[sensopc[50]]
N[sensoab[50]]

The interesting number above is the sensitivity of the optimal price per computer to α. -0.11~ -1/10, so every 10% increase in the percentage that sales increase above 50% when the price of the computer is reduced $100 will result in a 1% decrease in the optimal price of the computers. This means if sales increased only 45% for a $100 reduction in price, the optimal price to sell the computers at would be $925.65. This is not a big difference for the original estimate (50% and the optimal selling price should be $935), so I believe that the company would be wise to lower their prices, and up their advertising budget.

Plot[{sensP[α], sensopc[α]}, {α, 0, 100}, 
      PlotStyle -> {{Hue[1], Dashing[{0.05, 0.05}]}, {Hue[3/4], 
            Dashing[{1, 0}]}}, Frame -> True, 
      FrameLabel -> {"α", "Sensitivities"}]

The solid purple line is the sensitivity of the optimal price of the computers to α, and the dashed red line is the sensitivity of the maximum profits to α. Notice that the sensitivity of the maximum profits to α is negative for α% less than about 40%. This means that the optimal profits will be greater than as things stand now, but not as large as they could be if we had a higher percentage of sales increase for a $100 decrease in the price of the computer. 

Remember, my original concern was with the profits, and a plot of the profits as a function of α will easily show that you will generate increased profits for all α, and also illuminate what the change negative sensitivity means:

Plot[{Profit[opc, oab], Profit[950, 50000]}, {α, 0, 100}, 
      PlotRange -> {2000000, 4000000}, Frame -> True,  
      FrameLabel -> {"α", "Maximum Profits"}]

Things look good--you can perform other sensitivity analysis if you desire.