# Procedure to solve the utility maximisation problem involving many variables

Proposition. Consider two functions u_X:\mathbb{R}^L_+\rightarrow\mathbb{R} and u_Y:\mathbb{R}^K_+\rightarrow\mathbb{R}. Suppose we have a utility function u:\mathbb{R}^L_+\times\mathbb{R}^K_+\rightarrow\mathbb{R} of the form u(x,y)=u_X(x)+u_Y(y), then solving the following two problems yields the same solution:
Problem 1.
\max_{x\in\mathbb{R}^L_+,y\in\mathbb{R}^K_+} \ u(x,y)
\text{s.t. } \ p\cdot x+q\cdot y \leq M
where p\in\mathbb{R}^L_{++}, q\in\mathbb{R}^K_{++} and M\geq 0.
Problem 2.
\max_{m_X\geq 0, m_Y\geq 0}\left[ [\max_{x\in\mathbb{R}^L_+} \ u_X(x) \text{ s.t. } p\cdot x\leq m_X] + [\max_{y\in\mathbb{R}^K_+} \ u_Y(y) \text{ s.t. } q\cdot y\leq m_Y] \right]
\text{s.t. } \ m_X+m_Y \leq M

Claim 1. If (x^*,y^*) solves problem 1, then ((m_X=p\cdot x^*, m_Y=p\cdot y^*),(x^*,y^*)) solves problem 2.
Proof. Suppose (x^*,y^*) solves problem 1. It is easy to verify that ((m_X=p\cdot x^*, m_Y=q\cdot y^*),(x^*,y^*)) is feasible in problem 2. Suppose, by way of contradiction, ((p\cdot x^*, q\cdot y^*),(x^*,y^*)) does not solve problem 2, then there exists ((m_X',m_Y'),(x',y')) such that u_X(x') + u_Y(y') > u_X(x^*)+u_Y(y^*) and p\cdot x' \leq m_X', q\cdot y' \leq m_Y', and m_X'+m_Y'\leq M, but that implies that p\cdot x' +q\cdot y' \leq m_X'+m_Y'\leq M, contradicting that (x^*,y^*) solves problem 1.

Claim 2. If ((m_X^*, m_Y^*),(x^*,y^*)) solves problem 2, then (x^*,y^*) solves problem 1.
Proof. Suppose ((m_X^*, m_Y^*),(x^*,y^*)) solves problem 2. It is easy to verify that (x^*,y^*) is feasible in problem 1. Suppose, by way of contradiction, (x^*,y^*) does not solve problem 1, then there exists (x',y') such that u_X(x') + u_Y(y') > u_X(x^*)+u_Y(y^*) and p\cdot x' +q\cdot y' \leq M contradicting that ((m_X^*, m_Y^*),(x^*,y^*)) solves problem 2.