User:Editeur24/sandbox2

Let $$p$$ denote the price of output and $$w_i, i = 1, \ldots, n$$ denote the prices of $$n$$ inputs. Let $$x_i$$ be the amount of input $$i$$ used in production and $$y$$ be the output as determined by the production function, so $$y = f(x_1, \ldots x_n). $$

Profit as a function of the prices is derived by maximizing profit as a function of the prices and the quantity choices:
 * $$\pi (p, w_1, \ldots, w_n) = \max_{x_1, \ldots, x_n} p\cdot f(x_1, \ldots, x_n) - \sum_{i=1}^n w_i \cdot x_i  $$

Hotelling's Lemma says that if the profit function is differentiable and positive quantities of all inputs are used at the optimum, the profit-maximizing choices are:
 * $$y^*(p, w_1, \ldots, w_n) = \frac {\partial \pi (p, w_1, \ldots, w_n)}{\partial p} $$


 * $$x_i^*(p, w_1, \ldots, w_n) = -\frac {\partial \pi (p, w_1, \ldots, w_n)}{\partial w_i} $$

Proof of Hotelling's lemma
The lemma uses the same reasoning as the envelope theorem.

The function for maximum profit can be written as
 * $$\pi (p,w_1, \ldots, w_n, x_1^*, \ldots, x_n^*) = p\cdot f(x_1^*, \ldots, x_n^*) - \sum_{i=1}^n w_i \cdot x_i^*, $$

where $$x_1^*, \ldots, x_n^*$$ are the maximizing inputs corresponding to the optimal output $$y^*=f(x_1^*, \ldots, x_n^*)$$. Because the inputs are maximizing profit, the first order conditions hold:

Taking the derivative of profit with respect to $$p$$ at the optimal values of the inputs yields
 * $$\frac{d\pi}{d p} = \sum_{j=1}^n \frac{\partial \pi}{\partial x_j}\bigg|_{x_j=x_j^*} \frac{\partial x_j}{\partial p} + \frac{\partial \pi}{\partial p} = \frac{\partial \pi}{\partial p} = f(x_1^*, \ldots, x_n^*) = y^*(p,w_1, \ldots, w_n),$$

where $$ \frac{\partial \pi}{\partial x_j}\bigg|_{x_j=x_j^*}=0$$ for every input $$j $$ because of ($$). Similarly, taking the derivative with respect to input price $$w_i$$ yields
 * $$\frac{d\pi}{d w_i} = \sum_{j=1}^n \frac{\partial \pi}{\partial x_j}\bigg|_{x_j=x_j^*}   \frac{\partial x_j}{\partial w_j}  + \frac{\partial \pi}{\partial w_i} = \frac{\partial \pi}{\partial w_i} = -x_i^*$$

QED