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?
Obviously, $x_i \ne 0$. Multiply each of your first $n$ equations by $x_i$ and add them up: $$ n\prod_{j=1}^nx_j^2+\lambda\sum_{i=1}^nx_i^2 = 0, $$ $$ n\prod_{j=1}^nx_j^2+\lambda= 0. $$ It follows that $$ \lambda = -n\prod_{j=1}^nx_j^2, \quad \quad x_i = \pm \frac{1}{\sqrt{n}}. $$