## Single var maximisation and Lagrange multiplier question

Pls take a look at my solution, as I don't have the model answer.

Question.

Company headquarters (HQ) holds 100 units of a raw material; it proposes to sell this material at a price $w$ per unit to its three area factories in the North, the Midlands and the South of the country. Each factory can turn the amount $Q$ of the raw material into an output $\sqrt{Q}$. Local variations in prices are such that the selling prices are:

North=3,
Midlands=4,
South=5.

Compute in terms of $w$ how much raw material each factory should buy from company HQ so as to maximise the factory's profit. How should HQ select the price $w$ to maximise the company's total divisional revenue:

$3\sqrt{x}+4\sqrt{y}+5\sqrt{z}-w(x+y+z)$

where $x,y,z$ are the optimal amounts which the factories buy from HQ. [Hint: Use the Lagrange multiplier method].

I see the first part of the problem as a maximisation of a function of a single variable. Eg for North,

the profit function is $f_N(x)=3\sqrt{x}-wx$, so setting its first derivative to zero we get

$\frac{3}{2\sqrt{x}}-w=0$ which gives

$x=\frac{9}{4w^2}$

The second derivative is negative, therefore, this is indeed the maximum of the profit function.

Similarly, for Midlands $y=\frac{4}{w^2}$
for South $z=\frac{25}{4w^2}$

For the second part, I will use the Lagrange multiplier method to find common tangent points of the profit function f(x,y,z) and the 'budget' function g(x,y,z)=x+y+z=100.

$\nabla{f}=\lambda\nabla{g}$

$(\frac{\partial{f}}{\partial{x}}, \frac{\partial{f}}{\partial{y}},\frac{\partial{f}} {\partial{z}})^T=\lambda(\frac{\partial{g}}{\parti al{x}}, \frac{\partial{g}}{\partial{y}},\frac{\partial{g}} {\partial{z}})^T$

$(\frac{3}{2\sqrt{x}},\frac{4}{2\sqrt{y}},\frac{5}{ 2\sqrt{z}})^T=\lambda(1,1,1)^T$

which I solve for x, y and z using the fact that $\frac{2}{2\sqrt{x}}=\frac{4}{2\sqrt{y}}=\frac{5}{2 \sqrt{z}}, x+y+z=100$

$x=18, y=32, z=50$

Interpretation: these quantities will maximise the total revenue of the division after intercompany sales of the 100 units of the given material. Question: common sense would suggest that all this quantity should be sold to South, which enjoys the largest profit on sale of the end product. Where did I go wrong?

Then if I substitute any of these into a solution for x, y or z in part one, I can find $w$, which is the same if I use x, y or z:

$x=\frac{9}{4w^2}=18, -> w=\frac{1}{\sqrt{8}}=\frac{1}{2\sqrt{2}}$