I have this problem $$ \min_{a,b} (b-p)^2 + |a-r|^2 \\ \mathrm{s.t.} ~~ 0 \leq b \leq |a|^2/s $$
where $ b \in \mathbb{R} $, $ a \in \mathbb{C} $. Further, $ p \in \mathbb{R}, r \in \mathbb{C}, s > 0 $ are constants.
I have found its dual, which is $$ \max_{v \geq 0} g(v) = v (C_1 v^3 + C_2 v^2 + C_3 v + C_4) $$
where $ C_1 = -s $, $ C_2 = 2s^2 + 4sp $, $ C_3 = 4s|r|^2 - 8s^2p $, $ C_4 = 4s^3p - 4s^2|r|^2 $. Note that $ C_1 < 0 $ and $ C_2 > 0 $. I am having trouble to interpret the roots that I find (is this the right way to solve it in a close-form manner?). What is the optimal $ v^* $ that solves the primal problem? I also found that $ v \neq s $.
Additional information: When going from the primal to the dual problem, I found that $$ b = -v/2+p \\ a = sr/(s-v) $$ where $ v $ is the dual variable . From the relations above $ v \neq s $. However, when I compute the roots of $ g(v) $ I always obtain a root $ v = s $. This confuses me a bit. In addition:
I don't know the "dual problem" concept you are asking about, but I can solve it directly.
First, if $p \le 0$, then obviously the solution is $b = 0, a = r$, and if $0 < p \le \frac{|r|^2}s$, the solution is $b = p, a = r$. So for the remainder we can assume that $p > \frac{|r|^2}s$.
Second, $\left|\frac {|r|a}{r} - |r|\right| = |a - r|$. Since $a$ varies over all of $\Bbb C$ we can replace $\frac {|r|a}{r}$ with $a'$, and if $a'$ is the solution for $|r|$, then $a = \frac{ra'}{|r|}$ is the solution for $r$, and since $|a| = |a'|, b$ is unaffected. Thus it suffices to solve the problem for positive real-valued $r$. The process is the same as complex $r$, but it makes the notation cleaner. In the following, I'll assume $r > 0$.
Third, if we fix $|a - r| = \rho < p - \frac{r^2}s$, then the minimum value occurs when $b$ is as close to $p$ as possible. I.e., when $b = \frac{|a|^2}s$. So, among all $a$ with $|a - r| = \rho$, the minimum will occur for the one with maximum $|a|$, since this allows $b$ to get closest to $p$. That maximum value of $|a|$ is when $0,r,a$ all lie on the same line, which gives $a = tr$ for some real $t\ge 1$. So we can dispense with the complex numbers altogether.
Now the original problem becomes finding $$\min_{b,t}~(b-p)^2 + (t-1)^2r^2, \quad 0 \le b \le t^2\frac {r^2}s, t \ge 1$$ The location of the minimum is not changed if you multiply the expression by the positive number $\frac 1{r^2}$. So letting $q = \frac pr, u = \frac br$, the problem changes into $$\min_{t,u}~(u-q)^2 + (t - 1)^2, \quad 0 \le u \le t^2\frac rs, t \ge 1$$ with $q > \frac rs$. And again for fixed $t$ this expression beomes smaller as $u$ increases (assuming $u < q$), so we can just let it take on the maximum value allowed, changing the problem to $$\min_{t\ge 1}~ (t^2\frac rs - q)^2 + (t - 1)^2$$ Which is now a single variable polynomial problem. Setting the derivative to $0$ gives $$2\frac {r^2}{s^2}t^3 + 2\left(1-\frac rsq\right)t - 1 = 0$$ Since the original quartic opens upward, the two outside roots of the derivative will be local minima, while the middle root is a local maximum. Once you've determined which local minima $t$ is lower, the solution to the original problem is $$a = tr, b = t^2\frac {|r|^2}s$$