# Maximization of complex quadratic function with quadratic and cubic equality constraints

I am trying to solve $$\max_{g_0,...,g_{M-1}} \left|\sum_{m=0}^{M-1} g_m\right|^2\ \text{s.t.}\ \sum_{m=0}^{M-1} |g_m|^2=M,\ \sum_{m=0}^{M-1} g_m |g_m|^2=0.$$ where $$g_m$$ can be complex. The problem does not seem easy to solve for me.

Intuitively, I would conjecture that an optimal $$g_m$$ should be purely real up to a constant phasor ($$g_me^{\jmath \phi}$$ achieves the same cost function as $$g_m$$ and also meets the constraints if $$g_m$$ does). If this phasor is set to one, the problem is converted to an all real problem $$\max_{g_0,...,g_{M-1}} \left(\sum_{m=0}^{M-1} g_m\right)^2\ \text{s.t.}\ \sum_{m=0}^{M-1} g_m^2=M,\ \sum_{m=0}^{M-1} g_m^3=0.$$ I can find the globally optimal solution of this problem using the Lagrangian, setting its derivative to zero, and finding the global optimum among the different critical points. The optimal solution is then "simply" to set all $$g_m$$ to the same value except for one with an opposite sign to meet the second constraint. For instance, using first element as the opposite one \begin{align*} g_m&=\frac{\sqrt{M}}{\sqrt{M-1+(M-1)^{2/3}}}\begin{cases} - \left(M-1\right)^{1/3}\ &\text{if}\ m=0\\ 1\ &\text{otherwise} \end{cases}. \end{align*}

Of course all of that relies on the conjecture, which I find hard to prove... Any idea? Thank you for your help!

• You may let $g_m = a_m + \mathrm{i} b_m$ to get a problem of real variables. Commented Sep 4, 2021 at 10:56
• Hi River Li, thanks for the input. I have tried but the problem is still not so simple. This can be rewritten in terms of real and imaginary parts as \begin{align*} &\max_{g_0,...,g_{N-1}} \left(\sum_{n=0}^{N-1} g_{R,n}\right)^2+\left(\sum_{n=0}^{N-1} g_{I,n}\right)^2\\ & \text{s.t.}\ \sum_{n=0}^{N-1} g_{R,n}^2+ \sum_{n=0}^{N-1}g_{I,n}^2=N,\ \sum_{n=0}^{N-1} g_{R,n} (g_{R,n}^2+g_{I,n}^2)=0,\ \sum_{n=0}^{N-1} g_{I,n} (g_{R,n}^2+g_{I,n}^2)=0. \end{align*} Setting the derivatives of the Lagrangian to zero gives two quadratic equations, which can be seen as the intersection of two conics. Commented Sep 6, 2021 at 7:47
• I did some simulation. It seems $M-1$ of $g_m$'s are equal, at maximum. Commented Sep 8, 2021 at 11:06
• Hi, indeed! This is also the result of the conjecture (see above). All are equal but one with opposite sign (phase rotation of pi). The question is then how to prove it... Commented Sep 8, 2021 at 13:25

## 1 Answer

You should be able to prove that this is a locally optimal solution. Let any $$g_k$$ be equal to $$g e^{i\theta}$$, and compute the derivative of the target function w.r.t. $$\theta$$ at the point where all $$g_m$$ are real, and you should find that it is proportional to $$\sin \theta$$.

• Hi, thanks for the answer! I am not sure to fully understand. Why would you put $g_k$ equal to $ge^{j\theta}$. So you would remove the index $k$ dependence, right? Moreover, when you talk about the target function, you mean just the cost function without the constraints? Commented Sep 3, 2021 at 12:52
• This wasn't about removing the $k$ dependence but instead taking a single value of $k$ and letting $g_k = ge^{i\theta}$ be the polar form of the complex number, where of course $\theta=0$ if the value is real. Yes, by target function I meant cost function. Commented Sep 16, 2021 at 13:09