<p>Here is the cost minimisation problem that we need to solve:
<span class="math-container">\begin{eqnarray*} \min_{x_1,x_2} &amp; w_1x_1+w_2x_2 \\ \text{s.t. } &amp; \sqrt{x_1x_2}=\overline{y} \\ \text{and } &amp; x_1\geq 1, x_2\geq 0 \end{eqnarray*}</span>
where <span class="math-container">$w_1&gt;0$</span>, <span class="math-container">$w_2&gt;0$</span>, <span class="math-container">$\overline{y}&gt;0$</span> are given.
Solving this problem, we get the conditional input demands as follows:
<span class="math-container">\begin{eqnarray*}(x_1^c,x_2^c)(w_1,w_2,\overline{y})=\begin{cases}\left(\sqrt{\dfrac{w_2\overline{y}^2}{w_1}},\sqrt{\dfrac{w_1\overline{y}^2}{w_2}}\right) &amp; \text{if } \dfrac{w_2\overline{y}^2}{w_1}\geq 1 \\ \left(1,\overline{y}^2\right) &amp; \text{if } \dfrac{w_2\overline{y}^2}{w_1}&lt; 1\end{cases}\end{eqnarray*}</span>
and the cost function is:
<span class="math-container">\begin{eqnarray*} C(w_1,w_2,\overline{y})=\begin{cases} (2\sqrt{w_1w_2})\overline{y} &amp; \text{if } \dfrac{w_2\overline{y}^2}{w_1}\geq 1 \\ w_1+w_2\overline{y}^2 &amp; \text{if } \dfrac{w_2\overline{y}^2}{w_1}&lt; 1\end{cases}\end{eqnarray*}</span></p>

CC BY-SA 4.0
2024-05-20T15:58:58.147Z
2024-05-20T15:58:58.147Z
Amit
<p>Let's setup the optimization problem first,
<span class="math-container">$$min_{\{x_1,x_2\}} \omega_1x_1+\omega_2x_2 $$</span>
<span class="math-container">$$ s.t \hspace{5 mm} (\bar{y}=x_1^{\frac{1}{2}}x_2^{\frac{1}{2}}) \wedge(x_1 \ge 1)\wedge (x_2 \ge 0)$$</span></p>
<p>Discussion before solving the optimization problem, here we have the objective function as convex, which means that the Local Minimizer is a Global Minimizer.</p>
<p>Now lets consider the Lagrangian,
<span class="math-container">$$\mathcal{L}(x_1,x_2)= \omega_1x_1+\omega_2x_2-\lambda(x_1^{\frac{1}{2}}x_2^{\frac{1}{2}}-\bar{y})-\mu_{1}(x_1-1)-\mu_2x_2$$</span>
Now as per the KKT first order conditions, we have,</p>
<p><span class="math-container">$$\frac{\partial \mathcal{L}}{\partial x_1}=\omega_1-(\frac{\lambda}{2}x_1^{\frac{-1}{2}}x_2^{\frac{1}{2}})-\mu_1=0$$</span>
<span class="math-container">$$\frac{\partial \mathcal{L}}{\partial x_2}=\omega_2-(\frac{\lambda}{2}x_1^{\frac{1}{2}}x_2^{\frac{-1}{2}})-\mu_2=0$$</span>
<span class="math-container">$$\text{and} \hspace{2mm} \bar{y}= x_1^{\frac{1}{2}}x_2^{\frac{1}{2}}; \hspace{2mm}\lambda\ge0;\hspace{2mm} \mu_1\ge0;\hspace{2mm} \mu_2\ge0 $$</span>
<span class="math-container">$$ \lambda(\bar{y}-x_1^{\frac{1}{2}}x_2^{\frac{1}{2}})=0;\hspace{2mm}\mu_{1}(x_1-1)=0;\hspace{2mm}\mu_2x_2=0$$</span></p>
<p>After some mind-numbing algebra, we get</p>
<p>case 1: <span class="math-container">$$x_1=1, x_2=\bar{y}^2, \lambda= 2\omega_2 \bar{y}, \mu_1=-\omega_2(\bar{y}^2)+\omega_1,\mu_2=0$$</span></p>
<p>Here as <span class="math-container">$\mu_1 \ge 0$</span>
<span class="math-container">$\iff \frac{\omega_2}{\omega_1}(\bar{y}^2) \le 1 $</span></p>
<p>and case 2:
<span class="math-container">$$x_1=(\frac{\omega_2}{\omega_1})^\frac{1}{2}\bar{y}, x_2=(\frac{\omega_1}{\omega_2})^\frac{1}{2}\bar{y}, \lambda=2(\omega_1\omega_2)^\frac{1}{2},\mu_1=0,\mu_2=0$$</span></p>
<p>Therefore, we will end up with the conditional factor demands,
<span class="math-container">$$(x_1^c,x_2^c)=\begin{cases}(1,\bar{y}^2), &amp; \frac{\omega_2}{\omega_1}(\bar{y}^2) \le 1 \\
((\frac{\omega_2}{\omega_1})^\frac{1}{2}\bar{y},(\frac{\omega_1}{\omega_2})^\frac{1}{2}\bar{y}),&amp; \text{otherwise}  \end{cases}$$</span>
Hence we will get the cost function as, <span class="math-container">$$C(\omega_1,\omega_2,\bar{y})= \begin{cases}\omega_1+\omega_2\bar{y}^2, &amp; \frac{\omega_2}{\omega_1}(\bar{y}^2) \le 1 \\
2(\omega_1\omega_2)^\frac{1}{2}\bar{y},&amp; \text{otherwise}  \end{cases}$$</span></p>

CC BY-SA 4.0
2024-05-21T11:50:25.973Z
Cost function is not equal to $\min\{\omega_1+\omega_2(\overline{y})^2, 2(\omega_1\omega_2)^\frac{1}{2}\overline{y} \}$
Amit
CC BY-SA 4.0
2024-05-21T13:17:31.303Z
For example, if $w_1=w_2=1$ and $\bar{y}=\frac{1}{2}$, the minimum cost solution meeting the constraint is $(x_1,x_2)=(1,\frac{1}{4})$ with cost $1.25$ but $2(w_1w_2)^{\frac{1}{2}}\bar{y}=1$.
Adam Bailey
CC BY-SA 4.0
2024-05-22T06:13:48.473Z
Thanks for your inputs, I made the necessary changes to my answer.
SGP
CC BY-SA 4.0
2024-05-20T15:06:28.713Z
2024-05-22T06:10:33.797Z
2024-05-22T06:10:33.797Z
SGP
<p>The term <span class="math-container">$\lambda_2(x_1-1)$</span> in your Lagrangian is incorrect; it treats the second constraint as an equality rather than an inequality. To allow for the constraint being an inequality you can include a <a href="https://en.wikipedia.org/wiki/Slack_variable" rel="noreferrer">slack variable</a>, say <span class="math-container">$a$</span>, and rewrite the term as <span class="math-container">$\lambda_2(x_1-1-a^2)$</span>. You can then proceed to calculate the first-order conditions, but these will now need to include: <span class="math-container">$\partial \mathcal{L}/\partial a=0$</span>. Note that the first-order condition:</p>
<p><span class="math-container">$$\frac{\partial \mathcal{L}}{\partial \lambda_2}=x_1-1-a^2=0$$</span></p>
<p>implies <span class="math-container">$x_1\geq1$</span> since <span class="math-container">$a^2$</span> must be non-negative.</p>

CC BY-SA 4.0
2024-05-20T13:31:49.357Z
2024-05-20T16:38:59.480Z
2024-05-20T16:38:59.480Z
Adam Bailey
<p>A firm produces an output <span class="math-container">$y$</span> using two inputs <span class="math-container">$x_1$</span> and <span class="math-container">$x_2$</span>, where the production function is given by <span class="math-container">$y = \sqrt{x_1 x_2}$</span> for any <span class="math-container">$(x_1, x_2) \in \mathbb{R}^2_+$</span>. Union agreements obligate the firm to use at least one unit of <span class="math-container">$x_1$</span> in its production process. The input prices of <span class="math-container">$x_1$</span> and <span class="math-container">$x_2$</span> are given by <span class="math-container">$w_1$</span> and <span class="math-container">$w_2$</span>, respectively. The firm is supposed to produce <span class="math-container">$\bar{y}$</span> units of output due to its commitments. I want to find the minimum cost. When I set up the Lagrangian I obtained:
<span class="math-container">\begin{equation}
\mathcal{L} = w_1 x_1 + w_2 x_2 + \lambda_1 (\sqrt{x_1 x_2} - \bar{y}) + \lambda_2 (x_1 -1)
\end{equation}</span>
But when I consider the first order conditions, I obtained that <span class="math-container">$x_1 = 1$</span>, but this does not seem reasonable to me. I am wondering if there is a mistake in my Lagrangian and first order condition. Any help is appreciated.</p>

<mathematical-economics><optimization><cost-functions>
Cost Minimization and Karush-Kuhn-Tucker
bruno
# Cost Minimization and Karush-Kuhn-Tucker

(Asked by: username_0 on 2024-05-20)

A firm produces an output $y$ using two inputs $x\_1$ and $x\_2$, where the production function is given by $y = \sqrt{x\_1 x\_2}$ for any $(x\_1, x\_2) \in \mathbb{R}^2\_+$. Union agreements obligate the firm to use at least one unit of $x\_1$ in its production process. The input prices of $x\_1$ and $x\_2$ are given by $w\_1$ and $w\_2$, respectively. The firm is supposed to produce $\bar{y}$ units of output due to its commitments. I want to find the minimum cost. When I set up the Lagrangian I obtained:
\begin{equation}
\mathcal{L} = w\_1 x\_1 + w\_2 x\_2 + \lambda\_1 (\sqrt{x\_1 x\_2} - \bar{y}) + \lambda\_2 (x\_1 -1)
\end{equation}
But when I consider the first order conditions, I obtained that $x\_1 = 1$, but this does not seem reasonable to me. I am wondering if there is a mistake in my Lagrangian and first order condition. Any help is appreciated.

**Tags:** mathematical-economics, optimization, cost-functions


---

## 3 answers

### Answer by username_3 on 2024-05-20. Score: 9 | Accepted answer

The term $\lambda\_2(x\_1-1)$ in your Lagrangian is incorrect; it treats the second constraint as an equality rather than an inequality. To allow for the constraint being an inequality you can include a [slack variable](https://en.wikipedia.org/wiki/Slack_variable), say $a$, and rewrite the term as $\lambda\_2(x\_1-1-a^2)$. You can then proceed to calculate the first-order conditions, but these will now need to include: $\partial \mathcal{L}/\partial a=0$. Note that the first-order condition:

$$\frac{\partial \mathcal{L}}{\partial \lambda\_2}=x\_1-1-a^2=0$$

implies $x\_1\geq1$ since $a^2$ must be non-negative.


---

### Answer by username_1 on 2024-05-20. Score: 6

Here is the cost minimisation problem that we need to solve:
\begin{eqnarray\*} \min\_{x\_1,x\_2} & w\_1x\_1+w\_2x\_2 \\ \text{s.t. } & \sqrt{x\_1x\_2}=\overline{y} \\ \text{and } & x\_1\geq 1, x\_2\geq 0 \end{eqnarray\*}
where $w\_1>0$, $w\_2>0$, $\overline{y}>0$ are given.
Solving this problem, we get the conditional input demands as follows:
\begin{eqnarray\*}(x\_1^c,x\_2^c)(w\_1,w\_2,\overline{y})=\begin{cases}\left(\sqrt{\dfrac{w\_2\overline{y}^2}{w\_1}},\sqrt{\dfrac{w\_1\overline{y}^2}{w\_2}}\right) & \text{if } \dfrac{w\_2\overline{y}^2}{w\_1}\geq 1 \\ \left(1,\overline{y}^2\right) & \text{if } \dfrac{w\_2\overline{y}^2}{w\_1}< 1\end{cases}\end{eqnarray\*}
and the cost function is:
\begin{eqnarray\*} C(w\_1,w\_2,\overline{y})=\begin{cases} (2\sqrt{w\_1w\_2})\overline{y} & \text{if } \dfrac{w\_2\overline{y}^2}{w\_1}\geq 1 \\ w\_1+w\_2\overline{y}^2 & \text{if } \dfrac{w\_2\overline{y}^2}{w\_1}< 1\end{cases}\end{eqnarray\*}


---

### Answer by username_2 on 2024-05-20. Score: 5

Let's setup the optimization problem first,
$$min\_{\{x\_1,x\_2\}} \omega\_1x\_1+\omega\_2x\_2 $$
$$ s.t \hspace{5 mm} (\bar{y}=x\_1^{\frac{1}{2}}x\_2^{\frac{1}{2}}) \wedge(x\_1 \ge 1)\wedge (x\_2 \ge 0)$$

Discussion before solving the optimization problem, here we have the objective function as convex, which means that the Local Minimizer is a Global Minimizer.

Now lets consider the Lagrangian,
$$\mathcal{L}(x\_1,x\_2)= \omega\_1x\_1+\omega\_2x\_2-\lambda(x\_1^{\frac{1}{2}}x\_2^{\frac{1}{2}}-\bar{y})-\mu\_{1}(x\_1-1)-\mu\_2x\_2$$
Now as per the KKT first order conditions, we have,

$$\frac{\partial \mathcal{L}}{\partial x\_1}=\omega\_1-(\frac{\lambda}{2}x\_1^{\frac{-1}{2}}x\_2^{\frac{1}{2}})-\mu\_1=0$$
$$\frac{\partial \mathcal{L}}{\partial x\_2}=\omega\_2-(\frac{\lambda}{2}x\_1^{\frac{1}{2}}x\_2^{\frac{-1}{2}})-\mu\_2=0$$
$$\text{and} \hspace{2mm} \bar{y}= x\_1^{\frac{1}{2}}x\_2^{\frac{1}{2}}; \hspace{2mm}\lambda\ge0;\hspace{2mm} \mu\_1\ge0;\hspace{2mm} \mu\_2\ge0 $$
$$ \lambda(\bar{y}-x\_1^{\frac{1}{2}}x\_2^{\frac{1}{2}})=0;\hspace{2mm}\mu\_{1}(x\_1-1)=0;\hspace{2mm}\mu\_2x\_2=0$$

After some mind-numbing algebra, we get

case 1: $$x\_1=1, x\_2=\bar{y}^2, \lambda= 2\omega\_2 \bar{y}, \mu\_1=-\omega\_2(\bar{y}^2)+\omega\_1,\mu\_2=0$$

Here as $\mu\_1 \ge 0$
$\iff \frac{\omega\_2}{\omega\_1}(\bar{y}^2) \le 1 $

and case 2:
$$x\_1=(\frac{\omega\_2}{\omega\_1})^\frac{1}{2}\bar{y}, x\_2=(\frac{\omega\_1}{\omega\_2})^\frac{1}{2}\bar{y}, \lambda=2(\omega\_1\omega\_2)^\frac{1}{2},\mu\_1=0,\mu\_2=0$$

Therefore, we will end up with the conditional factor demands,
$$(x\_1^c,x\_2^c)=\begin{cases}(1,\bar{y}^2), & \frac{\omega\_2}{\omega\_1}(\bar{y}^2) \le 1 \\
((\frac{\omega\_2}{\omega\_1})^\frac{1}{2}\bar{y},(\frac{\omega\_1}{\omega\_2})^\frac{1}{2}\bar{y}),& \text{otherwise} \end{cases}$$
Hence we will get the cost function as, $$C(\omega\_1,\omega\_2,\bar{y})= \begin{cases}\omega\_1+\omega\_2\bar{y}^2, & \frac{\omega\_2}{\omega\_1}(\bar{y}^2) \le 1 \\
2(\omega\_1\omega\_2)^\frac{1}{2}\bar{y},& \text{otherwise} \end{cases}$$

> **Comments:**
> **username_1**: Cost function is not equal to $\min\{\omega_1+\omega_2(\overline{y})^2, 2(\omega_1\omega_2)^\frac{1}{2}\overline{y} \}$  
> **username_3**: For example, if $w_1=w_2=1$ and $\bar{y}=\frac{1}{2}$, the minimum cost solution meeting the constraint is $(x_1,x_2)=(1,\frac{1}{4})$ with cost $1.25$ but $2(w_1w_2)^{\frac{1}{2}}\bar{y}=1$.  
> **username_2**: Thanks for your inputs, I made the necessary changes to my answer.  

---

