<p>Imagine that you are a dictator in Sausageland. Your legitimicay depends on you delevering sausages to the inhabitants. Each inhabitant must be given 1 sausage and there are <span class="math-container">$y$</span> inhabitants. To produce sausages you command two factories: One factory produces <span class="math-container">$x_1$</span> vegan sausages using <span class="math-container">$x_1$</span> cabbage heads the other factory produces <span class="math-container">$x_2$</span> pork sausages using <span class="math-container">$x_2$</span> units of pork meat. Which factory do you use?</p>
<p>Well since the factories are equally productive transforming one unit of input into one unit of output independent of the level of production <span class="math-container">$y$</span> you simple follow the rule of cost minimizing and use the factory for which the input is the cheapest.</p>
<p><strong>Vegan sausage case:</strong>
So in the case where <span class="math-container">$w_1&lt;w_2$</span> it follows that <span class="math-container">$\min(w_1,w_2) = w_1$</span> and <span class="math-container">$y=x_1$</span> so costs are <span class="math-container">$w_1x_1$</span> which is <span class="math-container">$\min(w_1,w_2)y$</span>.</p>
<p><strong>Pork sausage case:</strong>
So in the case where <span class="math-container">$w_2&lt;w_1$</span> it follows that <span class="math-container">$\min(w_1,w_2) = w_2$</span> and <span class="math-container">$y=x_2$</span> so costs are <span class="math-container">$w_2x_2$</span> which is <span class="math-container">$\min(w_1,w_2)y$</span>.</p>
<p>In the knife edge case where <span class="math-container">$w_1=w_2$</span> it does not matter whether you produce pork
sausages or cabbage sausages they are equally costly to produce so the only requirement is that the total number of sausages  add up to <span class="math-container">$y$</span> hence <span class="math-container">$x_1+x_2=y$</span> with the solution set <span class="math-container">$\{(x_1,x_2) \lvert x_1+x_2=y,x_1\geq0,x_2\geq 0\}$</span>.</p>
<p><strong>Combined sausage case:</strong>
So in the case where <span class="math-container">$w_2=w_1$</span> it follows that <span class="math-container">$\min(w_1,w_2) = w_2=w_1$</span> and <span class="math-container">$y=x_2+x_1$</span> so costs are <span class="math-container">$w_1x_1+w_2x_2 = w_1(x_1+x_2) = w_1 y$</span> which is <span class="math-container">$\min(w_1,w_2)y$</span>.</p>
<p>So in all three cases the cost function can be written as</p>
<p><span class="math-container">$$C(w_1,w_2,y) = \min(w_1,w_2)y$$</span></p>
<h2>Cost minimizing program</h2>
<p>Another approach is to set up the cost minimizing program. The costs are given as <span class="math-container">$w_1x_1 + w_2x_2$</span> which is the objective function to be minimized. The constraints are that <span class="math-container">$f(x_1,x_2) = x_1 + x_2 \geq y$</span> and <span class="math-container">$x_1\geq 0$</span> and <span class="math-container">$x_2\geq 0$</span>.</p>
<p>The cost function is derived by solving the problem</p>
<p><span class="math-container">$$\min_{x_1,x_2} \ \ w_1x_1 + w_2x_2 \\ s.t. \ \ x_1 + x_2 \geq y \\ \ \ x_1 \geq 0 \\ \ \ x_2 \geq 0$$</span></p>
<p>The costs are given as <span class="math-container">$w_1x_1 + w_2x_2$</span> and they are to be minimized subject to the constraint that at least <span class="math-container">$y$</span> is produced as output.</p>
<p>One potential first step could be to check if some of the inequality constraints must be binding in optimum. So consider the case where <span class="math-container">$f(x_1,x_2) = x_1 + x_2 &gt; y$</span> for which a numerical example could be that you are supposed to produce at least <span class="math-container">$y=4$</span> and you produce <span class="math-container">$f(x_1,x_2)=4.1$</span> using inputs <span class="math-container">$x_1=2.1$</span> and <span class="math-container">$x_2=2$</span>. Clearly you could reduce costs by using less <span class="math-container">$x_1$</span> and still respecting the constraint <span class="math-container">$x_1 + x_2 \geq y$</span> (I am assuming that <span class="math-container">$w_1$</span> and <span class="math-container">$w_2$</span> are both strictly positive so reducing <span class="math-container">$x_1$</span> decrease costs <span class="math-container">$w_1x_1 + w_2x_2$</span>). Hopefully you can convince yourself that it would always be a waste of money to produce more output <span class="math-container">$f(x_1,x_2) = x_1 + x_2$</span> than required <span class="math-container">$y$</span>. And you can therefore conclude that any solution <span class="math-container">$(x_1^\star,x_2^\star)$</span>  must satisfy</p>
<p><span class="math-container">$$(1) \ \ x_1 + x_2 = y.$$</span></p>
<p>You now have one equation in two unknowns which is great progress but not enough.</p>
<p>Again you follow the procedure of considering the three cases <span class="math-container">$w_1&gt;w_2$</span>, <span class="math-container">$w_2&gt;w_1$</span> and <span class="math-container">$w_1=w_2$</span>. For the cases <span class="math-container">$w_1\not =w_2$</span> you should be able to convince yourself that you produce with the cheapest production factor and therefore for the other factor you have <span class="math-container">$x_i = 0$</span>. In either case you have two equations with two unknowns and by similar arguments as above <span class="math-container">$\min(w_1,w_2) y$</span> are the costs.</p>
<p>In the knife edge case where <span class="math-container">$w_1=w_2$</span> non of the constraints <span class="math-container">$x_1\geq 0$</span> and <span class="math-container">$x_2\geq 0$</span> are binding. You therefore do not end up with two equation in two unknowns and but simly have the inequalities <span class="math-container">$x_1\geq 0$</span> and <span class="math-container">$x_2 \geq 0$</span> and the equality <span class="math-container">$x_1+x_2=y$</span> and infinitely many solutions <span class="math-container">$\{(x_1,x_2) \lvert x_1\geq 0, x_2 \geq 0,x_1+x_2=y\}$</span>. Obviously, this can seem annoying when hoping for a unique solution. However, you should be familiar with this case from utility maximization for perfect substitutes.</p>
<h2>Lagrange</h2>
<p>You can perfectly well use Lagrange for this problem. However, imagine that you forget the positivity constraints on <span class="math-container">$x_1$</span> and <span class="math-container">$x_2$</span> then your Lagrangian function becomes</p>
<p><span class="math-container">$$L(x_1,x_2) = w_1x_1 + w_2x_2 - \lambda(x_1 + x_2 - y),$$</span></p>
<p>with first order conditions</p>
<p><span class="math-container">$$w_1 - \lambda = 0 \\ w_2 - \lambda = 0$$</span></p>
<p>using the assumption that <span class="math-container">$w_1&gt;0$</span> it follows by the complementarity condition <span class="math-container">$\lambda(x_1 + x_2 - y)=0$</span> that <span class="math-container">$x_1 + x_2 - y=0$</span> so <span class="math-container">$x_1+x_2=y$</span>. That is not a problem.</p>
<p>However, you also have the implication that <span class="math-container">$\lambda = w_1 = w_2$</span> which is a problem because it excludes the real possibilities that <span class="math-container">$w_1\not = w_2$</span>. Nevertheless, let us assume that <span class="math-container">$w_1=w_2$</span> then the FOC do not tell us anything about <span class="math-container">$(x_1,x_2)$</span> and are trivially satisfied by any <span class="math-container">$(x_1,x_2)$</span>. Again you are left with the solution being all <span class="math-container">$(x_1,x_2)$</span> where <span class="math-container">$x_1+x_2=y$</span> for the case where <span class="math-container">$w_1=w_2$</span>. In this case it is not wrong bu it is incomplete.</p>
<p>So including the positivity constraints in the Lagrangian you get</p>
<p><span class="math-container">$$L(x_1,x_2) = w_1x_1 + w_2x_2 - \lambda(x_1 + x_2 - y) - \delta_1x_1 - \delta_2 x_2$$</span></p>
<p>with FOC's</p>
<p><span class="math-container">$$w_1 - \lambda - \delta_1 = 0$$</span>
<span class="math-container">$$w_2 - \lambda - \delta_2 = 0$$</span></p>
<p>Here you should use the complemetarity conditions to consider which inequalitites are binding in optimum.</p>
<p>So first assume that <span class="math-container">$x_1&gt;0$</span> then by complementarity <span class="math-container">$\delta_1 x_1=0$</span> it follows that <span class="math-container">$\delta_1=0$</span>. Using the first order condition you then get that <span class="math-container">$w_1 = \lambda$</span> and since <span class="math-container">$w_1&gt;0$</span> it follows that <span class="math-container">$\lambda&gt;0$</span>. Using that <span class="math-container">$\lambda&gt;0$</span> in combination with the complementarity condition <span class="math-container">$\lambda(x_1+x_2-y)=0$</span> you get <span class="math-container">$x_1+x_2=y$</span>.</p>
<p>Combining <span class="math-container">$w_1=\lambda$</span> with the second FOC <span class="math-container">$w_2 - \lambda - \delta_2=0$</span> implies that <span class="math-container">$w_2 - w_1 = \delta_2$</span>. It is known from KKT-theorem that <span class="math-container">$\delta_2\geq 0$</span>. If we assume <span class="math-container">$\delta_2 = 0$</span> we are back in the solution <span class="math-container">$w_1=w_2$</span> so we instead let <span class="math-container">$\delta_2&gt;0$</span> but by complementarity this then implies that <span class="math-container">$x_2=0$</span> and by the identity <span class="math-container">$w_2 - w_1 = \delta_2$</span> this is the case where <span class="math-container">$w_2&gt;w_1$</span>.</p>
<p>A completely symmetrical arguments is used to solve for <span class="math-container">$w_1&gt;w_2$</span>. But as you can see using Lagrange is tedious in this simple case. For a statement of the KKT-theorem you can see <a href="https://www.csie.ntu.edu.tw/%7Er97002/temp/num_optimization.pdf" rel="noreferrer">Nocedal and Wright</a> page 328.</p>

CC BY-SA 4.0
2021-01-07T09:43:52.567Z
Not convinced that "You can perfectly well use Lagrange for this problem". You should mention Kuhn and Tucker instead of Lagrange... OK there is a reference to KKT at the end.
Bertrand
CC BY-SA 4.0
2021-01-05T19:18:19.760Z
2021-01-05T19:18:19.760Z
Jesper Hybel
<p>This problem is most easily solved using iso-cost lines and production level curves. Consider the <span class="math-container">$(x_1,x_2)$</span>-plane and the line defined by <span class="math-container">$$y = x_1 + x_2 \Leftrightarrow x_2 = y - x_1$$</span> which is a line cutting <span class="math-container">$x_2$</span>-axis in <span class="math-container">$y$</span> and having a slope of <span class="math-container">$-1$</span> as shown here</p>
<p><a href="https://i.sstatic.net/RC5Hm.jpg" rel="nofollow noreferrer"><img src="https://i.sstatic.net/RC5Hm.jpg" alt="enter image description here" /></a></p>
<p>Consider now isocost-lines given by <span class="math-container">$w_1x_1 + w_2x_2 = c$</span> such that <span class="math-container">$x_2 = \frac{c}{w_2} - \frac{w_1}{w_2} x_1$</span>. Obviously when <span class="math-container">$w_2&gt;w_1$</span> the slope of the line is larger than -1 (the slope is less negative than -1). For increasing costs <span class="math-container">$c$</span> the iso-cost line is shifted upwards and will eventually connect with the blue iso-output line. Because <span class="math-container">$w_2&gt;w_1$</span> the isocost line will connect with the iso-output line in the lower right corner (on the x1-axis).</p>
<p><a href="https://i.sstatic.net/tRFuk.jpg" rel="nofollow noreferrer"><img src="https://i.sstatic.net/tRFuk.jpg" alt="enter image description here" /></a></p>
<p>When <span class="math-container">$w_2&lt;w_1$</span> the slope <span class="math-container">$-w_1/w_2&lt;-1$</span> is more negative than <span class="math-container">$-1$</span>. So increasing the cost will result in conneting the iso-ouput line in the upper right corner. This is shown here</p>
<p><a href="https://i.sstatic.net/QLRbZ.jpg" rel="nofollow noreferrer"><img src="https://i.sstatic.net/QLRbZ.jpg" alt="enter image description here" /></a></p>
<p>Finally consider the case where <span class="math-container">$w_1=w_2$</span> such that the slope of the iso-cost lines are exactly the same as the slope of the iso-output line. In this case the isocost line will connect the iso-ouput line everywhere</p>
<p><a href="https://i.sstatic.net/9E6Th.jpg" rel="nofollow noreferrer"><img src="https://i.sstatic.net/9E6Th.jpg" alt="enter image description here" /></a></p>

CC BY-SA 4.0
2021-01-05T19:57:01.827Z
2021-01-05T19:57:01.827Z
Jesper Hybel
<p>How can I find the cost function c(w,p) given that the production is</p>
<p><span class="math-container">$f(x) = x_1+x_2$</span></p>
<p>I did Lagrangien's method but my problem is that I got no <span class="math-container">$x_1$</span> and no <span class="math-container">$x_2$</span> after taking the derivate.
So I would like to know how can I derive a cost function?</p>
<p>Thanks in advance !</p>

CC BY-SA 4.0
2021-01-05T10:57:59.227Z
x1, x2 are factors of production? w, p are prices of these factors?
Dayne
CC BY-SA 4.0
2021-01-05T11:06:08.550Z
You can solve this without explicitly solving the langrangian. From production function, it is clear that whichever factor is cheaper, you use only that as the marginal product is constant. WLOG let $w<p$. So producer will only use $x_1$ for production. Cost of production is therefore simply $C=wY=wx_1$
Dayne
CC BY-SA 4.0
2021-01-05T11:13:26.243Z
Did you check the conditions under which is it allowed to use the Lagrangien?
Bertrand
CC BY-SA 4.0
2021-01-05T11:23:47.857Z
ok , so I just say if w1<w2 so C = w1y  else if w1> w2 so C = w2y ?      But what are  my x1*  and my x2*  ?
victor
CC BY-SA 4.0
2021-01-05T14:13:04.903Z
The equilibrium amount of the good with the higher w will be 0. The other one will depend on  the market structure and the factor cost. Since mc is constant, the firm will either produce nothing if p<mc, or as much as possible if p>mc, under perfect competition.
Andre
<microeconomics>
Cost function from an easy CES production function
victor
# Cost function from an easy CES production function

(Asked by: username_0 on 2021-01-05)

How can I find the cost function c(w,p) given that the production is

$f(x) = x\_1+x\_2$

I did Lagrangien's method but my problem is that I got no $x\_1$ and no $x\_2$ after taking the derivate.
So I would like to know how can I derive a cost function?

Thanks in advance !

**Tags:** microeconomics
> **Comments:**
> **username_1**: x1, x2 are factors of production? w, p are prices of these factors?  
> **username_1**: You can solve this without explicitly solving the langrangian. From production function, it is clear that whichever factor is cheaper, you use only that as the marginal product is constant. WLOG let $w<p$. So producer will only use $x_1$ for production. Cost of production is therefore simply $C=wY=wx_1$  
> **username_2**: Did you check the conditions under which is it allowed to use the Lagrangien?  
> **username_0**: ok , so I just say if w1<w2 so C = w1y  else if w1> w2 so C = w2y ?      But what are  my x1*  and my x2*  ?  
> **username_3**: The equilibrium amount of the good with the higher w will be 0. The other one will depend on  the market structure and the factor cost. Since mc is constant, the firm will either produce nothing if p<mc, or as much as possible if p>mc, under perfect competition.  

---

## 2 answers

### Answer by username_4 on 2021-01-05. Score: 7

Imagine that you are a dictator in Sausageland. Your legitimicay depends on you delevering sausages to the inhabitants. Each inhabitant must be given 1 sausage and there are $y$ inhabitants. To produce sausages you command two factories: One factory produces $x\_1$ vegan sausages using $x\_1$ cabbage heads the other factory produces $x\_2$ pork sausages using $x\_2$ units of pork meat. Which factory do you use?

Well since the factories are equally productive transforming one unit of input into one unit of output independent of the level of production $y$ you simple follow the rule of cost minimizing and use the factory for which the input is the cheapest.

**Vegan sausage case:**
So in the case where $w\_1 it follows that $\min(w\_1,w\_2) = w\_1$ and $y=x\_1$ so costs are $w\_1x\_1$ which is $\min(w\_1,w\_2)y$.

**Pork sausage case:**
So in the case where $w\_2 it follows that $\min(w\_1,w\_2) = w\_2$ and $y=x\_2$ so costs are $w\_2x\_2$ which is $\min(w\_1,w\_2)y$.

In the knife edge case where $w\_1=w\_2$ it does not matter whether you produce pork
sausages or cabbage sausages they are equally costly to produce so the only requirement is that the total number of sausages add up to $y$ hence $x\_1+x\_2=y$ with the solution set $\{(x\_1,x\_2) \lvert x\_1+x\_2=y,x\_1\geq0,x\_2\geq 0\}$.

**Combined sausage case:**
So in the case where $w\_2=w\_1$ it follows that $\min(w\_1,w\_2) = w\_2=w\_1$ and $y=x\_2+x\_1$ so costs are $w\_1x\_1+w\_2x\_2 = w\_1(x\_1+x\_2) = w\_1 y$ which is $\min(w\_1,w\_2)y$.

So in all three cases the cost function can be written as

$$C(w\_1,w\_2,y) = \min(w\_1,w\_2)y$$

## Cost minimizing program

Another approach is to set up the cost minimizing program. The costs are given as $w\_1x\_1 + w\_2x\_2$ which is the objective function to be minimized. The constraints are that $f(x\_1,x\_2) = x\_1 + x\_2 \geq y$ and $x\_1\geq 0$ and $x\_2\geq 0$.

The cost function is derived by solving the problem

$$\min\_{x\_1,x\_2} \ \ w\_1x\_1 + w\_2x\_2 \\ s.t. \ \ x\_1 + x\_2 \geq y \\ \ \ x\_1 \geq 0 \\ \ \ x\_2 \geq 0$$

The costs are given as $w\_1x\_1 + w\_2x\_2$ and they are to be minimized subject to the constraint that at least $y$ is produced as output.

One potential first step could be to check if some of the inequality constraints must be binding in optimum. So consider the case where $f(x\_1,x\_2) = x\_1 + x\_2 > y$ for which a numerical example could be that you are supposed to produce at least $y=4$ and you produce $f(x\_1,x\_2)=4.1$ using inputs $x\_1=2.1$ and $x\_2=2$. Clearly you could reduce costs by using less $x\_1$ and still respecting the constraint $x\_1 + x\_2 \geq y$ (I am assuming that $w\_1$ and $w\_2$ are both strictly positive so reducing $x\_1$ decrease costs $w\_1x\_1 + w\_2x\_2$). Hopefully you can convince yourself that it would always be a waste of money to produce more output $f(x\_1,x\_2) = x\_1 + x\_2$ than required $y$. And you can therefore conclude that any solution $(x\_1^\star,x\_2^\star)$ must satisfy

$$(1) \ \ x\_1 + x\_2 = y.$$

You now have one equation in two unknowns which is great progress but not enough.

Again you follow the procedure of considering the three cases $w\_1>w\_2$, $w\_2>w\_1$ and $w\_1=w\_2$. For the cases $w\_1\not =w\_2$ you should be able to convince yourself that you produce with the cheapest production factor and therefore for the other factor you have $x\_i = 0$. In either case you have two equations with two unknowns and by similar arguments as above $\min(w\_1,w\_2) y$ are the costs.

In the knife edge case where $w\_1=w\_2$ non of the constraints $x\_1\geq 0$ and $x\_2\geq 0$ are binding. You therefore do not end up with two equation in two unknowns and but simly have the inequalities $x\_1\geq 0$ and $x\_2 \geq 0$ and the equality $x\_1+x\_2=y$ and infinitely many solutions $\{(x\_1,x\_2) \lvert x\_1\geq 0, x\_2 \geq 0,x\_1+x\_2=y\}$. Obviously, this can seem annoying when hoping for a unique solution. However, you should be familiar with this case from utility maximization for perfect substitutes.

## Lagrange

You can perfectly well use Lagrange for this problem. However, imagine that you forget the positivity constraints on $x\_1$ and $x\_2$ then your Lagrangian function becomes

$$L(x\_1,x\_2) = w\_1x\_1 + w\_2x\_2 - \lambda(x\_1 + x\_2 - y),$$

with first order conditions

$$w\_1 - \lambda = 0 \\ w\_2 - \lambda = 0$$

using the assumption that $w\_1>0$ it follows by the complementarity condition $\lambda(x\_1 + x\_2 - y)=0$ that $x\_1 + x\_2 - y=0$ so $x\_1+x\_2=y$. That is not a problem.

However, you also have the implication that $\lambda = w\_1 = w\_2$ which is a problem because it excludes the real possibilities that $w\_1\not = w\_2$. Nevertheless, let us assume that $w\_1=w\_2$ then the FOC do not tell us anything about $(x\_1,x\_2)$ and are trivially satisfied by any $(x\_1,x\_2)$. Again you are left with the solution being all $(x\_1,x\_2)$ where $x\_1+x\_2=y$ for the case where $w\_1=w\_2$. In this case it is not wrong bu it is incomplete.

So including the positivity constraints in the Lagrangian you get

$$L(x\_1,x\_2) = w\_1x\_1 + w\_2x\_2 - \lambda(x\_1 + x\_2 - y) - \delta\_1x\_1 - \delta\_2 x\_2$$

with FOC's

$$w\_1 - \lambda - \delta\_1 = 0$$
$$w\_2 - \lambda - \delta\_2 = 0$$

Here you should use the complemetarity conditions to consider which inequalitites are binding in optimum.

So first assume that $x\_1>0$ then by complementarity $\delta\_1 x\_1=0$ it follows that $\delta\_1=0$. Using the first order condition you then get that $w\_1 = \lambda$ and since $w\_1>0$ it follows that $\lambda>0$. Using that $\lambda>0$ in combination with the complementarity condition $\lambda(x\_1+x\_2-y)=0$ you get $x\_1+x\_2=y$.

Combining $w\_1=\lambda$ with the second FOC $w\_2 - \lambda - \delta\_2=0$ implies that $w\_2 - w\_1 = \delta\_2$. It is known from KKT-theorem that $\delta\_2\geq 0$. If we assume $\delta\_2 = 0$ we are back in the solution $w\_1=w\_2$ so we instead let $\delta\_2>0$ but by complementarity this then implies that $x\_2=0$ and by the identity $w\_2 - w\_1 = \delta\_2$ this is the case where $w\_2>w\_1$.

A completely symmetrical arguments is used to solve for $w\_1>w\_2$. But as you can see using Lagrange is tedious in this simple case. For a statement of the KKT-theorem you can see [Nocedal and Wright](https://www.csie.ntu.edu.tw/%7Er97002/temp/num_optimization.pdf) page 328.

> **Comments:**
> **username_2**: Not convinced that "You can perfectly well use Lagrange for this problem". You should mention Kuhn and Tucker instead of Lagrange... OK there is a reference to KKT at the end.  

---

### Answer by username_4 on 2021-01-05. Score: 3

This problem is most easily solved using iso-cost lines and production level curves. Consider the $(x\_1,x\_2)$-plane and the line defined by $$y = x\_1 + x\_2 \Leftrightarrow x\_2 = y - x\_1$$ which is a line cutting $x\_2$-axis in $y$ and having a slope of $-1$ as shown here

[![enter image description here](https://i.sstatic.net/RC5Hm.jpg)](https://i.sstatic.net/RC5Hm.jpg)

Consider now isocost-lines given by $w\_1x\_1 + w\_2x\_2 = c$ such that $x\_2 = \frac{c}{w\_2} - \frac{w\_1}{w\_2} x\_1$. Obviously when $w\_2>w\_1$ the slope of the line is larger than -1 (the slope is less negative than -1). For increasing costs $c$ the iso-cost line is shifted upwards and will eventually connect with the blue iso-output line. Because $w\_2>w\_1$ the isocost line will connect with the iso-output line in the lower right corner (on the x1-axis).

[![enter image description here](https://i.sstatic.net/tRFuk.jpg)](https://i.sstatic.net/tRFuk.jpg)

When $w\_2 the slope $-w\_1/w\_2<-1$ is more negative than $-1$. So increasing the cost will result in conneting the iso-ouput line in the upper right corner. This is shown here

[![enter image description here](https://i.sstatic.net/QLRbZ.jpg)](https://i.sstatic.net/QLRbZ.jpg)

Finally consider the case where $w\_1=w\_2$ such that the slope of the iso-cost lines are exactly the same as the slope of the iso-output line. In this case the isocost line will connect the iso-ouput line everywhere

[![enter image description here](https://i.sstatic.net/9E6Th.jpg)](https://i.sstatic.net/9E6Th.jpg)


---

