With $\vec{x}=(x_1,\ldots,x_n)$, find all the min and max of $\prod_{i=1}^{n} x_{i}^i$ given that $||\vec{x}||=1$ Now clearly this is Lagrange multiplier. So one might take $\prod_{i=1}^{n} x_{i}^i-\lambda(\sum_{i=1}^{n}x^2_i -1)$. But the problem is when I take the derivative I get an algebraic mess. Clearly the solution is $(1,0,0...0)$ max and $(-1,0,0,...0)$ min. but for example $-e_2$ is also a max.
Can someone show me how to get the rigorous solution?
Here, $||\vec{x}||=\sqrt{x_1^2+x_2^2+\ldots+x_n^2}$.
Per request by the OP, this is a solution using the AM-GM Inequality. I shall optimize $$f(x):=\prod_{i=1}^n\,x_i^i\,,$$ where $x=(x_1,x_2,\ldots,x_n)\in\mathbb{R}^n$ satisfies $$x_1^2+x_2^2+\ldots+x_n^2=1\,.$$ By the AM-GM Inequality, $$\begin{align} 1&=\sum_{i=1}^n\,x_i^2=\sum_{i=1}^n\,i\,\left(\frac{x_i^2}{i}\right) \\&\geq \left(\sum_{i=1}^n\,i\right)\left(\prod_{i=1}^n\,\left(\frac{x_i^2}{i}\right)^i\right)^{\frac{1}{\sum\limits_{i=1}^n\,i}} =\frac{n(n+1)}{2}\,\frac{\left|\prod\limits_{i=1}^n\,x_i^i\right|^{\frac{4}{n(n+1)}}}{\left(\prod\limits_{i=1}^n\,i^i\right)^{\frac{2}{n(n+1)}}}\,. \end{align}$$ This shows that $$\left|\prod_{o=1}^n\,x_i^i\right|\leq \sqrt{\left(\frac{2}{n(n+1)}\right)^{\frac{n(n+1)}{2}}\,\prod_{i=1}^n\,i^i}\,.$$ The equality holds if and only if $$|x_i|=\sqrt{\frac{2i}{n(n+1)}}\text{ for }i=1,2,\ldots,n.\tag{*}$$ By considering the signs, we conclude that the minimum value of $f(x)$ is $$-\sqrt{\left(\frac{2}{n(n+1)}\right)^{\frac{n(n+1)}{2}}\,\prod_{i=1}^n\,i^i}\,,$$ which happens iff $x_1,x_2,\ldots,x_n$ satisfy (*), and an odd number of them are negative; the maximum value of $f(x)$ is $$+\sqrt{\left(\frac{2}{n(n+1)}\right)^{\frac{n(n+1)}{2}}\,\prod_{i=1}^n\,i^i}\,,$$ which happens iff $x_1,x_2,\ldots,x_n$ satisfy (*), and an even number of them are negative. For each positive integer $n$, there are precisely $2^{n-1}$ minimizing points, and $2^{n-1}$ maximizing points.