Conditional maximization of consumer utility I'm trying to solve the following consumer problem:
Consumers: The economy is populated by an infinity of homogeneous individuals who inelastically supply an amount L of work. The individual has preference over the consumption of the N goods in the economy. Consumers are faced with the following problem:
$Max \left[ \sum_{i \in N} c_i^{\frac{\theta - 1}{\theta}} \right]^{\frac{\theta}{\theta - 1}}$ 
st: $\sum_{i \in N} p_i c_i = wL$
Where $c_i$ is consumption, the parameter $\theta$ provides the degree of complementarity between the goods, and $w$ is the wages.
I tried to solve this but I was not successful. My teacher said the solution is as follows:
$c_i = \left(\frac{p_1}{p_i}\right)^{\theta} \frac{wL}{p_1^\theta \sum_{i \in N} p_i^{1-\theta}} $
However, he did not demonstrate how to arrive at this result. So I'm not sure how to solve this.
 A: The Lagrangian for the problem is
$$L(c,\lambda)=u(c)+\lambda (wL-\sum_{i=1}^Np_ic_i)$$
where $u$ is the utility function.
The first order conditions are
$$u_i(c)=\lambda p_i\qquad (i=1,\ldots,n)$$
and
$$wL=\sum_{i=1}^Np_ic_i$$
For any $i\neq j$ the first-order conditions give
$$\frac{u_i(c)}{u_j(c)}=\frac{p_i}{p_j}$$
i.e. the marginal rate of substitution is equal to the price ratio. Now
$$\frac{u_i(c)}{u_j(c)}=\frac{c_i^{-\frac{1}{\theta}}}{c_j^{-\frac{1}{\theta}}}=\left(\frac{c_i}{c_j}\right)^{-\frac{1}{\theta}}$$
So for any $i\neq j$ we must have
$$\left(\frac{c_i}{c_j}\right)^{-\frac{1}{\theta}}=\frac{p_i}{p_j}$$
or
$$\frac{c_i}{c_j}=\left(\frac{p_j}{p_i}\right)^\theta $$
In particular,
$$c_i=\left(\frac{p_1}{p_i}\right)^\theta c_1\tag{1}$$
Substituting into the constraint gives
$$p_1c_1+\sum_{i=2}^Np_i\left(\frac{p_1}{p_i}\right)^\theta c_1=wL$$
or
$$c_1\left[p_1+p_1^\theta\sum_{i=2}^Np_i^{1-\theta}\right]=wL$$
so that
$$c_1=\frac{wL}{p_1+p_1^\theta\sum_{i=2}^Np_i^{1-\theta}}=\frac{wL}{p_1^{\theta}\sum_{i=1}^Np_i^{1-\theta}}$$
Substituting this into $(1)$ gives
$$c_i=\left(\frac{p_1}{p_k}\right)^\theta\frac{wL}{p_1^{\theta}\sum_{k=1}^Np_k^{1-\theta}}$$
