User:Cybersnoopy/test2

Lagrange_multipliers
Actually this exercise just show you how to use Lagrange multipliers, not ask you to solve some problem using Lagrange multipliers, which means you only need to know simple calculus to solve it.

we already know $$\tfrac{\partial u}{\partial x_i}/p_i = \tfrac{\partial u}{\partial x_j}/p_j$$ holds for any $$i$$,$$j$$. Let's take $$i=1$$,$$j=2$$ for example:

Since $$u = x_1^{a_1} \cdot x_2^{a_2} \cdot \cdots x_n^{a_n}$$, wet get

$$ \begin{align} \frac{\partial u}{\partial x_1}/p_1 & = \frac{\partial u}{\partial x_2}/p_2 \\ \Rightarrow \frac{a_1 x_1^{a_1-1} \cdot x_2^{a_2} \cdot x_3^{a_3} \cdot \cdots x_n^{a_n}}{p_1} & = \frac{x_1^{a_1} \cdot a_2 x_2^{a_2-1} \cdot x_3^{a_3} \cdot \cdots x_n^{a_n}}{p_2} \\ \Rightarrow \frac{x_1}{x_2} &= \frac{a_1/p_1}{a_2/p_2} \end{align} $$

Similarly, we can deduce:

$$ \begin{align} \frac{x_i}{x_j} = \frac{a_i/p_i}{a_j/p_j} \; \text{holds for any}\; i, j \in \{1,2,3\cdots n\} \end{align} $$

then, let

$$ \begin{align} x_i = \frac{a_i}{p_i} \cdot k \;\;\;\; \text{for} \; i\in \{1,2,3\cdots n\} \end{align} $$

substitute these into $$p_1 x_1 + p_2 x_2 + \cdots + p_n x_n = l$$, we get:

$$ \begin{align} \sum_{i=1}^{n} p_i \cdot \frac{a_i}{p_i} k &= l \\ \Rightarrow k &= \frac{l}{\sum_{i=1}^{n} a_i} \end{align} $$

Finally,

$$ \begin{align} x_i & = \frac{a_i}{p_i} \cdot k \\ & =\frac{a_il}{p_i \sum_{i=1}^{n} a_i} \;\;\;\;\; \text{for} \; i\in \{1,2,3\cdots n\} \end{align} $$