I'm trying to minimize the function $f(x) = \sum_{i=1}^{n}(\log(|x_i|))^2$ in the closed unit ball $B(0, 1) \subset \mathbb R^n$, where the function is defined to be $\infty$ if $x_i = 0$.
What I did
First notice that the function is symmetric with respect to sign, so to make things easier we can just work with non negative $x_i$'s and remove the absolute value. Thus we want to minimize $f(x) = \sum_{i=1}^{n}(\log(x_i))^2$ given constraints $x_i \geq 0$, $\sum_{i=1}^{n}x_i^2 \leq 1$.
Lets first look for a local minimum: $\nabla f(x) = \begin{pmatrix}\frac{2\log(x_1)}{x_1} \\ \vdots \\ \frac{2\log(x_n)}{x_n}\end{pmatrix} = 0$ implies $x_1 = x_2 = \dots = x_n = 1$ which is outside our domain - so no local minimum.
If any $x_i = 0$ then we definitely don't have a minimum since the function was defined to be $\infty$ there. Thus our minimum must be when $x_i > 0$ and $\sum_{i=1}^{n}x_i^2 = 1$
Using Lagrange multipliers, we get that we need to solve the system:
$\begin{cases}\frac{\log(x_i)}{x_i} = \lambda x_i \\ \sum_{i=1}^{n}x_i^2 = 1\end{cases}$
How do I solve this system? Obviously $x_1 = x_2 = \dots = x_n$ is a possible solution but maybe there are more...
Hint.
$$ L(x,\lambda) = \sum_{k=1}^n(\log x_k)^2+\lambda\left(1-\sum_{k=1}^n x_k^2\right) $$
so the stationary points are the solutions for
$$ \frac{\log x_k}{x_k}-\lambda x_k = 0\\ 1-\sum_{k=1}^n x_k^2=0 $$
but
$$ \lambda = \frac{\log x_k}{x_k^2}\Rightarrow x_1=x_2=\cdots=x_n = x^* $$
then
$$ 1+n (x^*)^2 = 0\Rightarrow x^* = \sqrt{\frac 1n} $$
NOTE
Considering the equation
$$ \frac{\log x}{x^2} = \frac 12 \frac{\log x^2}{x^2} = -\mu\Rightarrow \log x^2=-2\mu x^2 $$
which gives the solution
$$ x = \pm \sqrt{\frac{W(2\mu)}{2\mu}} $$
Here $W(\cdot)$ is the Lambert function. Then
$$ 1-n \frac{W(2\mu)}{2\mu} = 0\Rightarrow \mu =\frac 12 n\log n $$
and
$$ x^* = e^{-\frac 12 W(n\log n)} = \sqrt{\frac 1n} $$