I have the following minimization problem in $x \in \mathbb{R}^n$
$$\begin{array}{ll} \text{minimize} & \|x\|_2 - c^T x\\ \text{subject to} & Ax = b\end{array}$$
where $A \in \mathbb{R}^{m \times n}$ is right-invertible, $b \in \mathbb{R}^m$ and $c \in \mathbb{R}^n$.
I tried to solve this using Lagrange multipliers, but am unable to find a closed form solution for $x$, because the derivative of $\|x\|_2$ with respect to $x$, which is $\frac{x}{\|x\|_2}$, contains $\sqrt{x^Tx}$ in the denominator.
Any help would be appreciated.
Using the derivatives of the Lagrange function $\mathcal{L}(x,\lambda) =\|x\|-c^Tx-\lambda^T(Ax-b),$ we get $$ \frac{x}{\|x\|} - c - A^T \lambda = 0 $$ Note that $\lambda\in\mathbb{R}^m.$ This results in $x = (c+A^T\lambda)\,\|x\|.$ We insert this $x$ in $Ax=b$ and we get $A(c+A^T\lambda)\,\|x\| = b$ or $$ AA^T\lambda = \frac{b}{\|x\|} - Ac $$ or $$ \lambda = \left(AA^T\right)^{-1}\left(\frac{b}{\|x\|} - Ac\right) $$ We put this $\lambda$ into $x = (c+A^T\lambda)\,\|x\|$ and we get $$ x = \left(c+A^T\left(AA^T\right)^{-1}\left(\frac{b}{\|x\|} - Ac\right)\right)\,\|x\| $$ or $$ x = \left(I-A^T\left(AA^T\right)^{-1}A\right) c \|x\| + A^T\left(AA^T\right)^{-1} b $$ We define $v$ as the projection of $c$ on the kernel of $A,$ which is $v = (I-A^T (AA^T)^{-1}A)c,$ and we define $x_0 =A^T\left(AA^T\right)^{-1} b,$ such that we get $$ x= v \|x\| + x_0 $$ We now have $$ \|x\|^2 = x^Tx = (v \|x\| + x_0)^T(v \|x\| + x_0) $$ It can easily been shown than $x_0^Tv = 0.$ Therefore, $$ (v^Tv-1)\|x\|^2 + x_0^Tx_0 = 0 $$ This is a quadratic equation for $\|x\|.$ We can solve this for $\|x\|$ and plug this $\|x\|$ into $x= v \|x\| + x_0.$
I have only addressed the possibility to get a closed form for $x,$ but not the question if this $x$ is actually a valid solution of the problem. The resulting $x$ fulfills the necessary condition for solutions at differentiable points of the Lagrange function, but it does not necessarily fulfill the sufficient conditions. If we can only get complex solutions, this means that the problem is not bounded. Note also that the Lagrange function is not differentiable at $x=0$, which means that this point must be addressed separately.