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 !

  • $\begingroup$ x1, x2 are factors of production? w, p are prices of these factors? $\endgroup$
    – Dayne
    Commented Jan 5, 2021 at 10:57
  • 1
    $\begingroup$ 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$ $\endgroup$
    – Dayne
    Commented Jan 5, 2021 at 11:06
  • $\begingroup$ Did you check the conditions under which is it allowed to use the Lagrangien? $\endgroup$
    – Bertrand
    Commented Jan 5, 2021 at 11:13
  • $\begingroup$ 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* ? $\endgroup$
    – victor
    Commented Jan 5, 2021 at 11:23
  • $\begingroup$ 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. $\endgroup$
    – Andre
    Commented Jan 5, 2021 at 14:13

2 Answers 2


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<w_2$ 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<w_1$ 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.


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 page 328.

  • $\begingroup$ 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. $\endgroup$
    – Bertrand
    Commented Jan 7, 2021 at 9:43

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

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

When $w_2<w_1$ 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

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


Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.