I'm reading the paper Portfolio optimization with linear and fixed transaction costs (link). In section 2.3 they solve for the following. \begin{aligned} \text{minimize} \quad & f(x)=x_i \\ \text{subject to} \quad & g(x)=(w+x)^T\Sigma (w+x)-\sigma^2 \end{aligned}
They perform the lagrangian to get the values of $x_i$. First they compute the gardients: $\nabla_x f = \lambda e_i \quad \nabla_xg=2\Sigma(w+x)$ as indicated on the paper. I believe they leave $\lambda$ in the first equation because they use that part as the second term of the lagrange multiplier. However, what is not clear to me how they go to the result of $x_i$.
$$ x_i = \sigma \sqrt{(\Sigma^{-1})_{ii}}-w_i $$
For the lagrange multiplier we should have $\mathcal {L}(x,\lambda )=f(x)-\lambda g(x)$, I believe they just changed to $\mathcal {L}(x,\lambda )=g(x)-\lambda f(x)$ because for some reason it should be the same (correct me if I'm wrong please). Then $\nabla _{x,\lambda }{\mathcal {L}}(x,\lambda )=0$, the gradient with respect to $\lambda$ does actually nothing and the gradient w.r.t. $x$ gives us $\lambda e_i-2\Sigma(w+x)=0$, thus they have 2 unknowns ($x$ and $\lambda$) and 1 equation only:
\begin{aligned} \lambda e_i-2\Sigma(w+x)=0 \end{aligned}
I've tried other things, but with no success, and I'm pretty sure that I'm missing something simple.
Assuming $\Sigma$ invertible, from
$$ \mathcal{L}(x,\lambda) = x_i -\lambda g(x) $$
we have
$$ \nabla_x \mathcal{L} = e_i-2\lambda\Sigma(w+x)=0 $$
and then
$$ w+x=\frac{1}{2\lambda}\Sigma^{-1} e_i $$
now substituting into $g(x)=0$ we have
$$ \frac{1}{4\lambda^2}\left(e_i^T\Sigma^{-1}e_i\right) = \sigma^2 $$
and then
$$ 2\lambda = \frac{1}{\sigma}\sqrt{\left(e_i^T\Sigma^{-1}e_i\right)} $$
hence
$$ w+x = \frac{\sigma}{\sqrt{\left(e_i^T\Sigma^{-1}e_i\right)}}\Sigma^{-1} e_i $$
NOTE
Here $\left(e_i^T\Sigma^{-1}e_i\right) = \left(\Sigma^{-1}\right)_{i,i}$