Consider an economy with a continuum of commodities, with one commodity for each point in $[0,1]$.
Suppose a consumer wants to maximise $$U = \int_0^1 c_i^\theta\,di\qquad 0<\theta<1$$ subject to $$\int_0^1 p_i c_i\,di = M$$ where $c_i$ is the amount of the $i$-th commodity consumed, $p_i$ its price and $M$ the consumer's money income.
This kind of problem arises for example in applying the Dixit-Stiglitz model to macroeconomics or international trade.
The solution to this problem is supposedly $$c_i = Ap_i^{1 \over {\theta-1}}$$ where $A$ is a constant chosen to ensure that the budget constraint is satisfied.
I am not very satisfied with derivations of this result which use Lagrange multipliers in analogy with the case of a finite number of commodities. What would be a completely mathematically rigorous method of deriving the above result?
It seems clear that there isn't a unique solution since arbitrarily changing the values of $c_i$ for a finite number of values of $i$ will leave the integrals in the utility function and budget constraint unchanged. I am expecting that a completely rigorous derivation would also correctly pinpoint this degree of nonuniqueness.
EDIT: In response to the comments by @BKay, @Ubiquitous. My problem with starting out with economies with $n$ commodities and taking the limit as $n \to \infty$ is that this needs to be accompanied by an argument which shows that the limit of optima is an optimum of the limit problem. I would appreciate a reference to a result which shows this either for this particular problem or a general result which is applicable to this problem.
In response to @AlecosPapadopoulos. The proofs of the Langrange multiplier method that is taught in math for economics courses is usually for a finite number of choice variables. I would appreciate a reference to where the method is justified for a continuum of choice variables. Also, the nonuniqueness I mention above shows that the method cannot be exactly right. Then what exactly are the qualifications required for its validity?