<p>You have added inequality constraints <span class="math-container">$x_1 \geq 0$</span> and <span class="math-container">$x_2 \geq 0$</span>.
Hence, you now have Kuhn-Tucker conditions for complimentary slackness:
<span class="math-container">$$
\mu_1 x_1 = 0 \text{ and } \mu_2x_2 = 0
$$</span></p>
<p>So whenever <span class="math-container">$x_i &gt; 0$</span>, by the complimentary slackness condition, <span class="math-container">$\mu_i = 0$</span>.</p>
<p>See <a href="https://en.wikipedia.org/wiki/Karush%E2%80%93Kuhn%E2%80%93Tucker_conditions" rel="nofollow noreferrer">Karush-Kuhn-Tucker conditions</a>. It also contains regularity conditions you ask for.</p>

CC BY-SA 4.0
2020-10-31T01:14:17.620Z
Thanks!  So I all have to say is clearly from conditions 1 and 2, $x_i > 0$ because otherwise if $x_1 = 0$, then that implies $\lambda = \infty$ and $x_2 = 0$, so we have a contradiction from the third condition (and similarly for $x_2$)?  Or can I just say clearly from the original utility function, we cannot have $x_i = 0$ since you cannot take the natural log of 0.
Alex
CC BY-SA 4.0
2020-10-31T01:56:34.490Z
I think the first argument works.
Walrasian Auctioneer
CC BY-SA 4.0
2020-10-31T00:59:15.667Z
2020-10-31T00:59:15.667Z
Walrasian Auctioneer
<p>I know how to solve the 2 variable constrained optimization problem using MRS = MRT, but I also want to make sure I understand how to do it with the Lagrangian method.</p>
<p>So if I have the following problem</p>
<p><span class="math-container">$U(x) = \alpha\ln(x_1) + (1-\alpha)\ln(x_2)$</span></p>
<p>with <span class="math-container">$p_1x_1 + p_2x_2 = w$</span></p>
<p>I got the answer using the MRS = MRT method as <span class="math-container">$x_1 = \frac{w\alpha}{p_1}$</span> and <span class="math-container">$x_2 = \frac{w(1-\alpha)}{p_2}$</span>.  I am a bit confused on how to set up the Lagrangian.  Here's what I did</p>
<p>So <span class="math-container">$L = \alpha\ln(x_1) + (1-\alpha)\ln(x_2) + \lambda(w - p_1x_1 - p_2x_2) + \mu_1x_1 + \mu_2x_2$</span></p>
<p><span class="math-container">$\frac{dL}{dx_1} = \frac{\alpha}{x_1} + p_1\lambda + \mu_1 = 0$</span></p>
<p><span class="math-container">$\frac{dL}{dx_1} = \frac{1-\alpha}{x_2} + p_2\lambda + \mu_2 = 0$</span></p>
<p><span class="math-container">$\frac{dL}{d\lambda} = w - p_1x_1 - p_2x_2 = 0$</span></p>
<p><span class="math-container">$\frac{dL}{d\mu_1} = x_1 = 0$</span></p>
<p><span class="math-container">$\frac{dL}{d\mu_2} = x_2 = 0$</span></p>
<p>Here is my issue here.  If I assume <span class="math-container">$x_1$</span> and <span class="math-container">$x_2$</span> cannot be 0 and I somehow assume <span class="math-container">$\mu_1$</span> and <span class="math-container">$\mu_2$</span> are 0, then I can solve it pretty easily.  I then just equate the <span class="math-container">$\lambda$</span> in the first two equations and then plug into the budget constraint like in the MRS = MRT case.</p>
<ol>
<li><p>However, what gives me the right to make <span class="math-container">$\mu_1$</span> and <span class="math-container">$\mu_2$</span> equal to 0?  Is this the correct approach?  When are they not 0?</p>
</li>
<li><p>I heard in order to use the Lagrangian method, some &quot;conditions&quot; need to be satisfied.  What conditions need to be satisfied?  How do I verify this?  Is this related to differentiability?</p>
</li>
<li><p>Is there some restrictions on what <span class="math-container">$\lambda$</span> and <span class="math-container">$\mu$</span> can be?</p>
</li>
</ol>
<p>Thanks!</p>

CC BY-SA 4.0
2020-10-31T00:47:09.033Z
Why are you adding $\mu$'s to the lagrangian, and why are you differentiating lagrangian with respect to them? Are they some additional constraints?
1muflon1
CC BY-SA 4.0
2020-10-31T00:50:02.127Z
Yea I thought since $x_1 \geq 0$ and $x_2 \geq 0$ were natural constraints.  Obviously, they can't actually equal 0 here, but if I change the problem to like just the term $x_1$ rather than $\ln(x_1)$ then it can equal 0.
Alex
CC BY-SA 4.0
2020-10-31T01:03:18.430Z
These non-negativity constraints are superfluous given that there is already a positive budget constraint. With inequality constraints you will also have to check the Kuhn-Tucker conditions and it would have to be solved slightly differently. The reason why often lagrangian is for a budget applied with equality even if there is an inequality condition there is that rational person will always consume at the budget line but you cant use the same argument to replace the non-negativity constraints with equality to zero.
1muflon1
<utility>
Solving Utility Maximization with Lagrangian
Alex
# Solving Utility Maximization with Lagrangian

(Asked by: username_0 on 2020-10-31)

I know how to solve the 2 variable constrained optimization problem using MRS = MRT, but I also want to make sure I understand how to do it with the Lagrangian method.

So if I have the following problem

$U(x) = \alpha\ln(x\_1) + (1-\alpha)\ln(x\_2)$

with $p\_1x\_1 + p\_2x\_2 = w$

I got the answer using the MRS = MRT method as $x\_1 = \frac{w\alpha}{p\_1}$ and $x\_2 = \frac{w(1-\alpha)}{p\_2}$. I am a bit confused on how to set up the Lagrangian. Here's what I did

So $L = \alpha\ln(x\_1) + (1-\alpha)\ln(x\_2) + \lambda(w - p\_1x\_1 - p\_2x\_2) + \mu\_1x\_1 + \mu\_2x\_2$

$\frac{dL}{dx\_1} = \frac{\alpha}{x\_1} + p\_1\lambda + \mu\_1 = 0$

$\frac{dL}{dx\_1} = \frac{1-\alpha}{x\_2} + p\_2\lambda + \mu\_2 = 0$

$\frac{dL}{d\lambda} = w - p\_1x\_1 - p\_2x\_2 = 0$

$\frac{dL}{d\mu\_1} = x\_1 = 0$

$\frac{dL}{d\mu\_2} = x\_2 = 0$

Here is my issue here. If I assume $x\_1$ and $x\_2$ cannot be 0 and I somehow assume $\mu\_1$ and $\mu\_2$ are 0, then I can solve it pretty easily. I then just equate the $\lambda$ in the first two equations and then plug into the budget constraint like in the MRS = MRT case.

1. However, what gives me the right to make $\mu\_1$ and $\mu\_2$ equal to 0? Is this the correct approach? When are they not 0?
2. I heard in order to use the Lagrangian method, some "conditions" need to be satisfied. What conditions need to be satisfied? How do I verify this? Is this related to differentiability?
3. Is there some restrictions on what $\lambda$ and $\mu$ can be?

Thanks!

**Tags:** utility

> **Comments:**
> **username_1**: Why are you adding $\mu$'s to the lagrangian, and why are you differentiating lagrangian with respect to them? Are they some additional constraints?  
> **username_0**: Yea I thought since $x_1 \geq 0$ and $x_2 \geq 0$ were natural constraints.  Obviously, they can't actually equal 0 here, but if I change the problem to like just the term $x_1$ rather than $\ln(x_1)$ then it can equal 0.  
> **username_1**: These non-negativity constraints are superfluous given that there is already a positive budget constraint. With inequality constraints you will also have to check the Kuhn-Tucker conditions and it would have to be solved slightly differently. The reason why often lagrangian is for a budget applied with equality even if there is an inequality condition there is that rational person will always consume at the budget line but you cant use the same argument to replace the non-negativity constraints with equality to zero.  

---

## 1 answers

### Answer by username_2 on 2020-10-31. Score: 3

You have added inequality constraints $x\_1 \geq 0$ and $x\_2 \geq 0$.
Hence, you now have Kuhn-Tucker conditions for complimentary slackness:
$$
\mu\_1 x\_1 = 0 \text{ and } \mu\_2x\_2 = 0
$$

So whenever $x\_i > 0$, by the complimentary slackness condition, $\mu\_i = 0$.

See [Karush-Kuhn-Tucker conditions](https://en.wikipedia.org/wiki/Karush%E2%80%93Kuhn%E2%80%93Tucker_conditions). It also contains regularity conditions you ask for.

> **Comments:**
> **username_0**: Thanks!  So I all have to say is clearly from conditions 1 and 2, $x_i > 0$ because otherwise if $x_1 = 0$, then that implies $\lambda = \infty$ and $x_2 = 0$, so we have a contradiction from the third condition (and similarly for $x_2$)?  Or can I just say clearly from the original utility function, we cannot have $x_i = 0$ since you cannot take the natural log of 0.  
> **username_2**: I think the first argument works.  

---

