# Extrema of Multivariable Function

Find the extreme value of the following function $$\ u(x_1,...,x_n) = x_1 x_2^2 \cdots x_n^n(1-x_1-2x_2-\cdots-nx_n),$$ for $\ x_i>0$.

Through partial differentiation, I am getting

$$\ x_i= \frac{1-x_1-\cdots-(i-1)x_{i-1}-(i+1)x_{i+1}-\cdots-nx_n}{i},$$

which is very ugly, and I can't plug these values back in to find the extremum. I'm guessing there is a slicker way but can't find any.

• How are you getting that result through partial differentiation? You might wanna check your math - try differentiating with respect to $x_1$ and $x_2$, for example. – Pedro M. Dec 22 '17 at 22:39

## 3 Answers

Your partial differentiation is wrong, it should give

$$0 = 1-x_1-\cdots-(i-1)x_{i-1}- (i+1)x_i - (i+1)x_{i+1}-\cdots-nx_n$$

Subtract any two of these equations to obtain

$$0 = x_i - x_{j}$$

Hence $x_i = c$ with some constant $c$. Plug into the sum equation to get

$$\frac{1}{c} = 1 + \sum_{i=1}^n i = 1 + \frac12 n(n+1)$$

so $x_i = \frac{1}{1 + \frac12 n(n+1)}$

Taking the derivative with respect to $x_j$ you find $$0 = \frac{\partial u}{\partial x_j} = \left( \frac{j}{x_j} -\sum_{k=1}^n k\left[\frac{jx_k}{x_j}+\delta_{jk}\right]\right)\prod_{i=1}^n x_i^i\Longrightarrow 1-x_j = \sum_{k=1}^n kx_k$$ Since the right hand side is the same for all $j$, you find immediately that $x_1=x_2=\cdots=x_n$. The rest should be easy. Your partial differentiation, by the way, is slightly off.

Notice that

$\ u(x_1,...,x_n) = x_1 x_2^2 \cdots x_n^n(1-x_1-2x_2-\cdots-nx_n)$ which is smaller or equal to:

$x_1 x_2^2 \cdots x_n^n(1-\frac{n(n+1)}{2}(x_{1}x_{2}^2 \cdots x_{n}^n)^{\frac{2}{n(n+1)}})$, by the AM-GM inequality. Equality holds for $x_{1}=x_{2}=\cdots=x_{n}$

Now let $X=x_1 x_2^2 \cdots x_n^n$ and $B=\frac{n(n+1)}{2}$, and take $F(X)=X(1-BX^\frac{1}{B})$.

This function is maximal for $X=(\frac{1}{1+B})^B$, so we get: $x_{1}=x_{2}=\cdots=x_{n}=\frac{1}{1+\frac{1}{2}n(n+1)}$