# Homework Help: Nonlinear programming

1. Oct 6, 2015

### squenshl

1. The problem statement, all variables and given/known data
Consider a consumer with wealth $w$ who consumes two goods, which we shall call goods $1$ and $2.$ Let the amount of good $\mathcal{l}$ that the consumer consumes be $x_{\mathcal{l}}$ and the price of good $\mathcal{l}$ be $p_{\mathcal{l}}$. Suppose that the consumer’s preferences are described by the utility function $u(x_1,x_2) = \log{(x_1)} + \log{(x_2)}.$ Thus, the consumer’s problem is to maximise
$u(x_1,x_2)$ subject to the constraint that $p_1x_1 + p_2x_2 \leq w$.

1. Set up the utility maximisation problem as a nonlinear programme and give the Kuhn-Tucker conditions.
2. Explain why the solution to the nonlinear programme will be the same as the solution to the maximisation problem with the budget set given as an equality constraint and no explicit statement of the non-negativity constraints.
3. Solve the first order conditions to obtain the Marshallian (or uncompensated) demand functions.
4. Substitute the Marshallian demands back into the utility function to obtain the indirect utility function.
5. State Roy’s Theorem. Use Roy’s theorem to find the Marshallian demands
and verify that Roy’s Theorem does indeed give the same Marshallian demands that you found above.
6. For the same utility function, consider the expenditure minimisation problem $$\min_{x_1,x_2} p_1x_1+p_2x_2$$ subject to $u(x_1,x_2) \geq u.$ Give the Kuhn-Tucker conditions for this problem.
7. Solve the Kuhn-Tucker conditions to obtain the Hicksian (or compensated)
demand functions. [Hint: Again, the solution will be the same as the solution with equality constraints]

2. Relevant equations

3. The attempt at a solution
1. The utility maximisation problem as a nonlinear programme is $$\begin{split} &\max_{x_1,x_2}\left\{\log{(x_1)}+\log{(x_2)}\right\} \\ &\text{subject to} \; x_1 \geq 0, \; x_2 \geq 0 \\ &p_1w_1+p_2w_2 \leq w. \end{split}$$
The Lagrangian function is given by $$\mathcal{L}(x_1,x_2,\lambda) = f(x_1,x_2) - \lambda g(x_1,x_2) = \log{(x_1)}+\log{(x_2)} - \lambda(w-p_1w_1-p_2w_2).$$
The Kuhn-Tucker conditions for $x^*$ to solve the maximisation problem are
$$\begin{split} \frac{\partial \mathcal{L}}{\partial x}(x^*,\lambda) &\leq 0 \\ x^*\frac{\partial \mathcal{L}}{\partial x}(x^*,\lambda) &= 0 \\ x^* &\geq 0 \\ \frac{\partial \mathcal{L}}{\partial \lambda}(x^*,\lambda) &\geq 0 \\ \lambda\frac{\partial \mathcal{L}}{\partial \lambda}(x^*,\lambda) &= 0 \\ \lambda &\geq 0 \end{split}$$ where $x = (x_1,x_2).$
2. Not exactly sure what they are asking here because it's clear from the Lagrangian that the nonlinear programme way is exactly the same as the maximisation problem with the budget set given as an equality constraint and no explicit statement of the non-negativity constraints.
3-7. I'm pretty happy with.

Last edited: Oct 6, 2015
2. Oct 7, 2015

### Ray Vickson

Your Lagrangian is incorrect: for a problem of the form $\max f(x)$ subject to $g(x) \geq 0$ we need $L = f + \lambda g$ with $\lambda \geq 0$. Since your constraint has the form $w \geq p_1 x_1 + p_2 x_2 \longrightarrow w - p_1 x_1 - p_2 x_2 \geq 0$ you need $+ \lambda (w - p_1 x_1 -p_2 x_2)$ with $\lambda \geq 0$ (or else you can keep what you wrote, but with $\lambda \leq 0$).

There is a simple memory device that you can use to help keep these issues straight: for a feasible solution, the Lagrangian should be better than the objective. For a max problem, "better" = "larger", so you need to add a positive multiple of a $\geq 0$ constraint or subtract a positive multiple of a $\leq 0$ constraint. For a min problem, "better" = "smaller", so you would need to subtract a positive multiple of a $\geq 0$ constraint or add a positive multiple of a $\leq 0$ constraint.

3. Oct 7, 2015

### squenshl

I actually was supposed to put a $+$ not a $-$ there oops.

That's a very good rule.
Thanks!!!

4. Oct 7, 2015

### squenshl

Why would we get the same result as if we had $p_1x_1+p_2x_2=w.$ (which of course means u don't have $x_1,x_2 \geq 0$)

5. Oct 13, 2015

### squenshl

I still got no idea why we would get the same result as if we had $p_1x_1+p_2x_2=w$??