# a problem using Lagrange multipliers

Prove that $\frac{{n!}} {{n^{\frac{n} {2}} }}$ is the max of the function $f\left( x \right) = \prod\limits_{i = 1}^n {x_i }$ under the restriction $g\left( x \right) = \sum\limits_{i = 1}^n {\frac{{x_i ^2 }} {{i^2 }} - 1 = 0}$.

Well Using LaGrange multiplier I have the system $\nabla f = \lambda \nabla g$ then for each $k$ we have that $\prod\limits_{i \ne k} {x_i } = \frac{{2\lambda x_k }} {{k^2 }}$ Thus $\prod\limits_{i = 1}^n {x_i } = \frac{{2\lambda x_k ^2 }} {{k^2 }}$

Considering the following Sum, we conclude that:$$n\left( {\prod\limits_{i = 1}^n {x_i } } \right) = \sum\limits_{k = 1}^n {\left( {\prod\limits_{i = 1}^n {x_i } } \right)} = \sum\limits_{k = 1}^n {\frac{{2\lambda x_k ^2 }} {{k^2 }}} = \lambda$$ I don't know how to continue :S

-
Put $x_i^2=\frac{i^2}{2\lambda}\prod_{j}x_j$ in the constraint; you should obtain $1=\sum_{i=1}^n \frac{x^2_i}{i^2}=\sum_{i=1}^n \frac{\prod_{j}x_j}{2\lambda},$ i.e. $\lambda=\frac{n}{2}\prod_{j}x_j$. Put the value of the Lagrange multiplier back in $x_i^2$ and try to compute the max of $f$. – Avitus Jul 9 '13 at 8:28
I add some details and move the discussion to an answer – Avitus Jul 9 '13 at 8:34

Put $x_i^2=\frac{i^2}{2\lambda}\prod_{j}x_j$ in the constraint; you should obtain $1=\sum_{i=1}^n \frac{x^2_i}{i^2}=\sum_{i=1}^n \frac{\prod_{j}x_j}{2\lambda},$ i.e. $$\lambda=\frac{n}{2}\prod_{j}x_j.$$

Substitute the value of the Lagrange multiplier $\lambda$ back in $x_i^2$ getting

$$x^2_i=\frac{i^2}{n},$$

for all $i=1,\dots,n$. Selecting the positive root to deduce the $x_i$'s, the maximum of $f$ is computed at

$$x=(\frac{1}{\sqrt{n}},\dots,\frac{n}{\sqrt{n}})$$

and is equal to

$$f(x)=\frac{1}{\sqrt{n}}\cdots\frac{n}{\sqrt{n}}=\frac{1\cdots n}{(\sqrt{n})^n}=\frac{n!}{n^{\frac{n}{2}}}.$$

-

Unless this is specifically an exercise in Lagrange multipliers, it is much simpler to apply the am/gm inequality. This also has the advantage of immediately yielding that this is an absolute maximum. This is sometimes a problem with Lagrange multipliers, even to show we have a relative maximum.

-