Find the maximum of $(x_1\cdots x_n)^2$ subject to $x_1^2+\ldots +x_n^2=1$ Find the maximum of $(x_1\cdots x_n)^2$ subject to $x_1^2+\ldots +x_n^2=1$ und show that $$\left (\prod_{k=1}^na_k\right )^{\frac{1}{n}}\leq \frac{1}{n}\sum_{k=1}^na_k$$
For the first part I applied the method of Lagrange multipliers.
We have the function $f(x_1, \ldots , x_n)=(x_1\cdot \ldots \cdot x_n)^2$ and the constraint $g(x,y,z)=x_1^2+ \ldots + x_n^2-1=0$.
The Lagrange function is \begin{equation*}L(x_1, \ldots , x_n  ,\lambda )=f(x_1, \ldots , x_n)+\lambda g(x_1, \ldots , x_n)=(x_1\cdot \ldots \cdot x_n)^2+\lambda \left (x_1^2+ \ldots + x_n^2-1\right )=\left (\prod_{j=1}^nx_j\right )^2+\lambda \left (\sum_{j=1}^nx_j^2-1\right )\end{equation*}
We calculate the partial derivatives of $L$ :
\begin{align*}&\frac{\partial}{\partial{x_i}}(x_1, \ldots , x_n  ,\lambda )=2\left (\prod_{j=1}^nx_j\right )\cdot \left (\prod_{j=1, j\neq i}^nx_j\right ) +2\lambda x_i  \\ & \frac{\partial}{\partial{\lambda }}L(x_1, \ldots , x_n  ,\lambda )=\sum_{j=1}^nx_j^2-1 \end{align*} with $1\leq i\leq n$.
To get the extrema we set the partial derivatives equal to zero.
Then we get the following system:
\begin{align*}&2\left (\prod_{j=1}^nx_j\right )\cdot \left (\prod_{j=1, j\neq i}^nx_j\right ) +2\lambda x_i =0 \Rightarrow x_i\cdot \prod_{j=1, j\neq i}^nx_j^2 +\lambda x_i =0 \Rightarrow x_i\cdot \left (\prod_{j=1, j\neq i}^nx_j^2 +\lambda \right ) =0 \\ & \sum_{j=1}^nx_j^2-1=0  \end{align*}
How can we continue?

A bit late but I thought worth mentioning it.
Set $y_k = x_k^2$ for $k=1\ldots n$. So, to maximize is
$$\prod_{k=1}^n y_k \text{  subject to  } \sum_{k=1}^ny_k =1\text{  with  } y_1,\ldots ,y_n \geq 0$$
Since the product is $0$ if any of the $y_k$ is zero, we can assume $y_1,\ldots ,y_n > 0$.
Now, Jensen (or concavity of $\ln$) gives immediately
$$\sum_{k=1}^n \ln y_k \leq n \ln \sum_{k=1}^n \frac{y_k}n = \ln \frac 1{n^n}$$
Hence,
$$\prod_{k=1}^n x_k^2 = \prod_{k=1}^n y_k \leq \frac 1{n^n}$$
and equality is reached for $y_k = \frac 1n \Leftrightarrow x_k =\pm \frac 1{\sqrt n}$.
