The consumer has a utility function $U(x_1, x_2) = x_1 + x_2$.
Find the demand function and the indirect utility function.
My work:
Consider:
$ \left\{\begin{matrix} -u(x) \to min \\ \sum p_ix_i \le I \end{matrix}\right.$
$\mathcal{L}(x_1, x_2, \lambda) = -x_1 - x_2 - \lambda (p_1 x_1 + p_2 x_2 - I)$
$\frac{\partial \mathcal{L}}{\partial x_1} = -1 - \lambda p_1 \ge 0 \\ \frac{\partial \mathcal{L}}{\partial x_2} = -1 - \lambda p_2 \ge 0 \\ -x_1 - \lambda p_1x_1 = 0 \\ -x_2 - \lambda p_2x_2 = 0 \\ \lambda (p_1 x_1 + p_2 x_2 - I) = 0$
Let $x_i > 0$, then
$-1 - \lambda p_1 = 0 \\ -1 - \lambda p_2 = 0 \\ \lambda (p_1 x_1 + p_2 x_2 - I) = 0$
How to find $x_i$ with this system?
$p_1 = -\frac{1}{\lambda}, p_2 = -\frac{1}{\lambda}\\ \lambda (-\frac{1}{\lambda} x_1 - \frac{1}{\lambda} x_2 - I) = 0\\ x_1 = -\lambda I - x_2$
I would be very grateful for any tips.
Another attempt:
(1) Let $x_i > 0$, then
$\frac{\partial \mathcal{L}}{\partial x_1} = -1 - \lambda p_1 = 0 \Rightarrow \lambda = -\frac{1}{p_1}\\ \frac{\partial \mathcal{L}}{\partial x_2} = -1 - \lambda p_2 = 0 \Rightarrow \lambda = -\frac{1}{p_2} $
So
$-\frac{1}{p_1} = -\frac{1}{p_2} \Rightarrow p_1 = p_2$
$p_1 x_1 + p_1 x_2 = I \Rightarrow x_1 + x_2 = \frac{I}{p_1}$
Any combination $ x_i > 0 $ satisfying $ x_1 + x_2 = \frac{I}{p_1} $ is optimal.
(2) Let $x_1 > 0, x_2 = 0$, then
$ x_1 = \frac{I}{p_1}, \; x_2 = 0 $ and $ U = \frac{I}{p_1} $
(3) Let $x_1 = 0, x_2 > 0$, then
$ x_1 = 0, \; x_2 = \frac{I}{p_2} $ and $ U = \frac{I}{p_2} $