<p>Given the cost function of the two plants
<span class="math-container">$c_1(q_1)=10q_1-4q_1^2+q_1^3$</span> and <span class="math-container">$c_2(q_2)=10q_2-2q_2^2+q_2^3$</span>, we want to solve the following cost minimisation problem:
<span class="math-container">\begin{eqnarray*}\min_{(q_1,q_2)\in\mathbb{R}^2_+} &amp; c_1(q_1)+c_2(q_2) \\ \text{s.t.} &amp; q_1+q_2=4\end{eqnarray*}</span>
Here is the plot of the marginal costs of the two plants, we can observe and compare different possibilities for the solution in the graph below.</p>
<p><a href="https://i.sstatic.net/AJDDcu78.png" rel="noreferrer"><img src="https://i.sstatic.net/AJDDcu78.png" alt="enter image description here" /></a></p>
<p>If we observe the marginal costs of the two plants in the graph above, we observe that the optimal solution is where two firms operate at the same marginal cost i.e. where <span class="math-container">$10-8q_1+3q_1^2=10-4q_2+3q_2^2$</span> and <span class="math-container">$q_1+q_2=4$</span> holds. This yields the solution as <span class="math-container">$q_1^*=\frac{8}{3}$</span>, and <span class="math-container">$q_2^*=\frac{4}{3}$</span>. In the picture above, the optimal cost is represented by the colored area which is equal to <span class="math-container">$c_1(\frac{8}{3})+c_2(\frac{4}{3})$</span>.</p>

CC BY-SA 4.0
2024-11-22T02:37:19.350Z
+1, I want to point out that OPs question and this answer is remarkable from a pedagogic view because it shows that even if a firm has two plants where one has a much higher variable cost, it still makes sense to produce something there.

My math skills have atrophied so I appreciate this answer!
EconJohn
CC BY-SA 4.0
2024-11-22T03:35:29.010Z
+1. Did you make your graphs in TikZ/pgfplots or some other program? Would love to see the code/template.
Herr K.
CC BY-SA 4.0
2024-11-22T05:25:53.460Z
@HerrK. I have used Mathcha.io to plot this graph. Here is the link: https://www.mathcha.io/editor/E1ZLVspwI5gIGqhElZJE4SOY3O11IQwVkgYuXVerP6
Amit
CC BY-SA 4.0
2024-11-22T14:45:29.187Z
@Amit: This is neat. Thanks!
Herr K.
CC BY-SA 4.0
2024-11-24T15:33:58.090Z
The confusion I have is surely there are many different combinations of q1 and q2 than when added make 4 but for each of these combinations they will have different MC values .Why does equating the 2 MC equations under the constraint of q1+q2=4 produce the exact combination of quantities that yields the smallest cost ?
j jose
CC BY-SA 4.0
2024-11-22T00:34:24.960Z
2024-11-22T00:42:07.357Z
2024-11-22T00:42:07.357Z
Amit
<p>The intuition is that a firm should produce at the lowest cost possible. Suppose <span class="math-container">$MC_1&lt;MC_2$</span>, then the firm should let plant 1 produce as long as this inequality holds. Since MC is increasing in both plants, the inequality will eventually be violated. This is when plant 2 becomes the less costly plant and thus should take over production responsibility from plant 1. Eventually, the optimal production arrangement occurs when the two plants have equal MCs.</p>
<p>Formally, the intuition can be demonstrated in the following cost minimization exercise. Let <span class="math-container">$C(q)$</span> be the firm-level cost function and <span class="math-container">$C_i(q_i)$</span>, where <span class="math-container">$i=1,2$</span>, be the plant-level cost functions.
<span class="math-container">\begin{equation}
C(q) = \min_{q_1,q_2}\;C_1(q_1)+C_2(q_2), \qquad\text{such that }q=q_1+q_2.
\end{equation}</span>
The Lagrangian for the minimization is
<span class="math-container">\begin{equation}
\mathcal L(q_1,q_2,\lambda) = C_1(q_2)+C_2(q_2)+\lambda[q-q_1-q_2]. 
\end{equation}</span>
Assuming interior solutions, the FOCs imply
<span class="math-container">\begin{align}
\frac{\partial C_i}{\partial q_i} = MC_i(q_i^*) = \lambda, \qquad i=1,2,
\end{align}</span>
which means <span class="math-container">$MC_1(q_1^*)=MC_2(q_2^*)$</span> at the optimum.</p>

CC BY-SA 4.0
2024-11-24T15:41:11.763Z
What confuses me here is that when you say MC1<MC2, you refer to this condition as when we looked at a fixed level of q for both curves they will have different MC values and there will be a quantity for both firms where their MC values are equal. However the quantities of both firms need to add up to 4 so we can have a point where the two curves intersect at one value of q for both firms but they wont add to 4.
j jose
CC BY-SA 4.0
2024-11-24T15:42:05.633Z
his concept of intersection confuses me cos we can have many combinations of q1 and q2 that add to 4 and yield the same MC values(by this I mean if we had a slider for values MC so a horizontal line on the Y axis that intersects both curves), there will be many such combinations of q1 and q2 that add to make 4
j jose
CC BY-SA 4.0
2024-11-24T16:30:31.623Z
@jjose: Yes, there are many $(q_1,q_2)$ pairs that add up to $4$, but here there's only one pair that can equalize MC across the two plants. As to your confusion about $MC_1<MC_2$, let's be more explicit and write: $MC_1(q_1)<MC_2(4-q_1)$, which incorporates the constraint that $q_1+q_2=4$. So if the last unit produced by plant 1 is less costly than plant 2, then plant 2 should produce one less unit and plant 1 should produce 1 more unit.
Herr K.
CC BY-SA 4.0
2024-11-21T16:32:54.790Z
2024-11-21T16:47:04.383Z
2024-11-21T16:47:04.383Z
Herr K.
<p>A way to show formally (without the Lagrangian method) that for minimum cost we must have <span class="math-container">$MC_1=MC_2$</span>:</p>
<p>Let <span class="math-container">$C(q_1)=C_1(q_1)+C_2(q_1)$</span> where <span class="math-container">$C_2(q_1)$</span> is the cost function obtained by substituting <span class="math-container">$q_2=4-q_1$</span> in <span class="math-container">$C_2(q_2)$</span>. A first-order condition for <span class="math-container">$C$</span> to be a minimum is:</p>
<p><span class="math-container">$$\dfrac{dC}{dq_1}=\dfrac{dC_1}{dq_1}+\dfrac{dC_2}{dq_1}=0\quad\quad(1)$$</span></p>
<p>But since <span class="math-container">$q_1=4-q_2$</span> we have:</p>
<p><span class="math-container">$$\dfrac{dq_1}{dq_2}=-1$$</span></p>
<p>and so:</p>
<p><span class="math-container">$$\dfrac{dC_2}{dq_1}=-\dfrac{dC_2}{dq_2}$$</span></p>
<p>Hence, substituting in (1):</p>
<p><span class="math-container">$$\dfrac{dC_1}{dq_1}-\dfrac{dC_2}{dq_2}=MC_1-MC_2=0$$</span></p>
<p>which implies <span class="math-container">$MC_1=MC_2$</span>.</p>

CC BY-SA 4.0
2024-11-24T21:05:50.387Z
Thanks this really helped, because I logically could not tell from theory the intuition as to why this condition made sense, I'm assuming you can only see it with the maths which I see now.
j jose
CC BY-SA 4.0
2024-11-22T12:52:12.647Z
2024-11-22T20:18:39.483Z
2024-11-22T20:18:39.483Z
Adam Bailey
<p>So for optimization problems we have only been given scenarios in which we can just solve by doing MRTS= -w/r  and the quantity that wants to be produced is stated in the question.</p>
<p>However I was given this question <a href="https://i.sstatic.net/gwgnmNcI.jpg" rel="noreferrer"><img src="https://i.sstatic.net/gwgnmNcI.jpg" alt="enter image description here" /></a></p>
<p>Here as far as I can understand we can do this via Lagrangian methods, but we have not been taught this yet. As far as I know, the question asking what is the best combination of output from both factories to produce a total of 4 units at the lowest total cost.</p>
<p>In order to do this question you had to set MC₁=MC₂ which you can get via lagrangian methods. However I was told that this condition is also just basic intuition, but I have no idea why having this condition would lead to the smallest total cost. I would gratefully if someone explain the intuition step by step.</p>

CC BY-SA 4.0
2024-11-22T11:28:12.587Z
This question would probably be a better fit for https://or.stackexchange.com/
J Fabian Meier
CC BY-SA 4.0
2024-11-23T19:41:59.680Z
Assuming everything is continuous and production is happening in both plants, having different marginal costs cannot be optimal. Shifting a small amount of production from the higher marginal cost plant to the lower marginal cost plant will reduce total cost.
Henry
<optimization>
Constrained optimization problem
j jose
# Constrained optimization problem

(Asked by: username_0 on 2024-11-21)

So for optimization problems we have only been given scenarios in which we can just solve by doing MRTS= -w/r and the quantity that wants to be produced is stated in the question.

However I was given this question [![enter image description here](https://i.sstatic.net/gwgnmNcI.jpg)](https://i.sstatic.net/gwgnmNcI.jpg)

Here as far as I can understand we can do this via Lagrangian methods, but we have not been taught this yet. As far as I know, the question asking what is the best combination of output from both factories to produce a total of 4 units at the lowest total cost.

In order to do this question you had to set MC₁=MC₂ which you can get via lagrangian methods. However I was told that this condition is also just basic intuition, but I have no idea why having this condition would lead to the smallest total cost. I would gratefully if someone explain the intuition step by step.

**Tags:** optimization
> **Comments:**
> **username_1**: This question would probably be a better fit for https://or.stackexchange.com/  
> **username_2**: Assuming everything is continuous and production is happening in both plants, having different marginal costs cannot be optimal. Shifting a small amount of production from the higher marginal cost plant to the lower marginal cost plant will reduce total cost.  

---

## 3 answers

### Answer by username_3 on 2024-11-22. Score: 5

Given the cost function of the two plants
$c\_1(q\_1)=10q\_1-4q\_1^2+q\_1^3$ and $c\_2(q\_2)=10q\_2-2q\_2^2+q\_2^3$, we want to solve the following cost minimisation problem:
\begin{eqnarray\*}\min\_{(q\_1,q\_2)\in\mathbb{R}^2\_+} & c\_1(q\_1)+c\_2(q\_2) \\ \text{s.t.} & q\_1+q\_2=4\end{eqnarray\*}
Here is the plot of the marginal costs of the two plants, we can observe and compare different possibilities for the solution in the graph below.

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

If we observe the marginal costs of the two plants in the graph above, we observe that the optimal solution is where two firms operate at the same marginal cost i.e. where $10-8q\_1+3q\_1^2=10-4q\_2+3q\_2^2$ and $q\_1+q\_2=4$ holds. This yields the solution as $q\_1^\*=\frac{8}{3}$, and $q\_2^\*=\frac{4}{3}$. In the picture above, the optimal cost is represented by the colored area which is equal to $c\_1(\frac{8}{3})+c\_2(\frac{4}{3})$.

> **Comments:**
> **username_4**: +1, I want to point out that OPs question and this answer is remarkable from a pedagogic view because it shows that even if a firm has two plants where one has a much higher variable cost, it still makes sense to produce something there.  My math skills have atrophied so I appreciate this answer!  
> **username_5**: +1. Did you make your graphs in TikZ/pgfplots or some other program? Would love to see the code/template.  
> **username_3**: @HerrK. I have used Mathcha.io to plot this graph. Here is the link: https://www.mathcha.io/editor/E1ZLVspwI5gIGqhElZJE4SOY3O11IQwVkgYuXVerP6  
> **username_5**: @Amit: This is neat. Thanks!  
> **username_0**: The confusion I have is surely there are many different combinations of q1 and q2 than when added make 4 but for each of these combinations they will have different MC values .Why does equating the 2 MC equations under the constraint of q1+q2=4 produce the exact combination of quantities that yields the smallest cost ?  

---

### Answer by username_5 on 2024-11-21. Score: 3

The intuition is that a firm should produce at the lowest cost possible. Suppose $MC\_1, then the firm should let plant 1 produce as long as this inequality holds. Since MC is increasing in both plants, the inequality will eventually be violated. This is when plant 2 becomes the less costly plant and thus should take over production responsibility from plant 1. Eventually, the optimal production arrangement occurs when the two plants have equal MCs.

Formally, the intuition can be demonstrated in the following cost minimization exercise. Let $C(q)$ be the firm-level cost function and $C\_i(q\_i)$, where $i=1,2$, be the plant-level cost functions.
\begin{equation}
C(q) = \min\_{q\_1,q\_2}\;C\_1(q\_1)+C\_2(q\_2), \qquad\text{such that }q=q\_1+q\_2.
\end{equation}
The Lagrangian for the minimization is
\begin{equation}
\mathcal L(q\_1,q\_2,\lambda) = C\_1(q\_2)+C\_2(q\_2)+\lambda[q-q\_1-q\_2].
\end{equation}
Assuming interior solutions, the FOCs imply
\begin{align}
\frac{\partial C\_i}{\partial q\_i} = MC\_i(q\_i^\*) = \lambda, \qquad i=1,2,
\end{align}
which means $MC\_1(q\_1^\*)=MC\_2(q\_2^\*)$ at the optimum.

> **Comments:**
> **username_0**: What confuses me here is that when you say MC1<MC2, you refer to this condition as when we looked at a fixed level of q for both curves they will have different MC values and there will be a quantity for both firms where their MC values are equal. However the quantities of both firms need to add up to 4 so we can have a point where the two curves intersect at one value of q for both firms but they wont add to 4.  
> **username_0**: his concept of intersection confuses me cos we can have many combinations of q1 and q2 that add to 4 and yield the same MC values(by this I mean if we had a slider for values MC so a horizontal line on the Y axis that intersects both curves), there will be many such combinations of q1 and q2 that add to make 4  
> **username_5**: @jjose: Yes, there are many $(q_1,q_2)$ pairs that add up to $4$, but here there's only one pair that can equalize MC across the two plants. As to your confusion about $MC_1<MC_2$, let's be more explicit and write: $MC_1(q_1)<MC_2(4-q_1)$, which incorporates the constraint that $q_1+q_2=4$. So if the last unit produced by plant 1 is less costly than plant 2, then plant 2 should produce one less unit and plant 1 should produce 1 more unit.  

---

### Answer by username_6 on 2024-11-22. Score: 2

A way to show formally (without the Lagrangian method) that for minimum cost we must have $MC\_1=MC\_2$:

Let $C(q\_1)=C\_1(q\_1)+C\_2(q\_1)$ where $C\_2(q\_1)$ is the cost function obtained by substituting $q\_2=4-q\_1$ in $C\_2(q\_2)$. A first-order condition for $C$ to be a minimum is:

$$\dfrac{dC}{dq\_1}=\dfrac{dC\_1}{dq\_1}+\dfrac{dC\_2}{dq\_1}=0\quad\quad(1)$$

But since $q\_1=4-q\_2$ we have:

$$\dfrac{dq\_1}{dq\_2}=-1$$

and so:

$$\dfrac{dC\_2}{dq\_1}=-\dfrac{dC\_2}{dq\_2}$$

Hence, substituting in (1):

$$\dfrac{dC\_1}{dq\_1}-\dfrac{dC\_2}{dq\_2}=MC\_1-MC\_2=0$$

which implies $MC\_1=MC\_2$.

> **Comments:**
> **username_0**: Thanks this really helped, because I logically could not tell from theory the intuition as to why this condition made sense, I'm assuming you can only see it with the maths which I see now.  

---

