Problem. Suppose the utility function is \displaystyle u(x_1,\ldots,x_L, y) =2\left(\sum_{i=1}^{L}\sqrt{x_i}\right)+y. What is the solution to this consumer’s problem?
\displaystyle\max_{x_1,x_2,\ldots,x_L,y} \ 2\left(\sum_{i=1}^{L} \sqrt{x_i}\right)+y
\displaystyle\text{s.t.} \ \sum_{i=1}^{L}p_ix_i+p_Yy\leq M
\text{and } x_1\geq 0, \ x_2\geq 0, \ldots, x_L\geq 0, y\geq 0
where L \in\mathbb{N}, p_1>0, p_2>0,\ldots, p_L>0, p_Y=1 and M\geq 0
Solution. Solving this problem we get the demand for x_i as:
\displaystyle x_i^d(p_1,p_2,\ldots,p_L,p_Y=1,M) = \begin{cases} \dfrac{M}{p_i^2\displaystyle\sum_{j=1}^{L} \frac{1}{p_j}} & \text{if } \displaystyle\sum_{j=1}^{L} \frac{1}{p_j}\geq M \\ \dfrac{1}{p_i^2} & \text{if } \displaystyle\sum_{j=1}^{L} \frac{1}{p_j} < M \end{cases}
and demand for y as:
\displaystyle y^d(p_1,p_2,\ldots,p_L,p_Y=1,M) = \begin{cases} 0 & \text{if } \displaystyle\sum_{j=1}^{L} \frac{1}{p_j}\geq M \\ M - \displaystyle\sum_{j=1}^{L} \frac{1}{p_j} & \text{if } \displaystyle\sum_{j=1}^{L} \frac{1}{p_j} < M \end{cases}