Let $S$ be a positive-definite $n \times n$ matrix and define $\|z\|_S := \sqrt{x^\top S x}$ for any $x \in \mathbb R^n$. Let $a$ be a fixed vector in $\mathbb R^n$ and $r \ge 0$, and consider the function $f:\mathbb R^n \to \mathbb R$ defined by $f(x) := \|x-a\|_S + r\|x\|_2$.
Question. Is there an analytic formula for the minimizer $x_{opt}$ of $f$ ?
Solution for special case where $S = \sigma^2 I_n$
Here, one has $f(x) = \sigma g(x)$, where $g(x) := \|x-a\|_2 + (r/\sigma) \|x\|_2$. Now, if $r \ge \sigma$, then for all $x \in \mathbb R^n$, it holds that $$ g(x) \ge \|x-a\|_2 + \|x\|_2 \ge \|a\|_2 = g(0). $$ Likewise, if $r \le \sigma$, then for all $x \in\mathbb R^n$ it holds that $$ g(x) \ge (r/\sigma) (\|x-a\|_2 + \|x\|_2) \ge (r/\sigma)\|a\|_2 = g(a). $$
We conclude that \begin{eqnarray} x_{opt} = \begin{cases} a,&\mbox{ if }r \le \sigma,\\ 0,&\mbox{ else.} \end{cases} \end{eqnarray}