Convex approximation of an expression

I am trying to transform an expression given by

$$\operatorname{trace} \left( {\bf{X} } \right) + \left( \sum_{n=1}^N \mathcal{R}(x_n) \right)$$ into convex from where $$\mathbf{x}$$ is complex in nature, size (1,N).

• is that real part? What is the relation between $X$ and $x_n$? No one can help you id we don't' know what the expression is, including unstated relations between the symbols. Commented Nov 7, 2023 at 21:01
• @Rodrigo de Azevedo you shared a related answer to above question, can you reshare ? Commented Dec 6, 2023 at 9:19

1 Answer

No approximation is needed if you wish to minimize the expression. For maximization, see the material after "Edit".

Due to cyclic permutation invariance of trace, $$\text{trace}(X) = \text{trace}(xx^H) = \text{trace}(x^Hx) = x^Hx$$ the latter two of which will be accepted by CVX, CVXPY, CVXR, and similar convex optimization tools.

Presuming you want to minimize the expression, the CVX code is:

cvx_begin
variable x(N) complex
minimize(x'*x + sum(real(x)))
% add constraints
cvx_end


If you wish to maximize the expression, that would be a non-convex problem. Per your comment, you do wish to maximize, so I am adding the contents of my first answer, which I had deleted.

EDIT: OP wants to maximize, per comment. So here is what can be done in that case.

A convex SDP relaxation can be used which will provide an upper bound on the optimal objective value of the original maximization problem.

Specifically, $$X = xx^H$$ is relaxed to $$X \succeq xx^H$$.

Here is CVX code for this.

cvx_begin sdp
variable X(N,N) hermitian
variable x(N) complex
maximize(trace(X) + sum(real(x)))
[X x;x' 1] >= 0
% add other constraints
cvx_end


If the solution $$X$$ is rank one, the solution to the relaxed problem is optimal for the original problem. Otherwise, the optimal objective value of the relaxed problem only constitutes an upper bound for the optimal objective value of the original maximization problem.

• I am maximizing this expression. Commented Nov 8, 2023 at 9:01
• @ Muhammad I just edited my answer to add the convex SDP relaxation approach (which I had in my original answer, which I deleted) to handle maximization.. Commented Nov 8, 2023 at 10:47
• Using x by itself (as $x^Hx$( without X for the non-convex maximization problem; it is s non-convex; you can solve that, but not by convex optimization. if you do wish to use convex optimization, x by itself could be anything;l it is the relation to X which matters. and gives it any possible meaning. Commented Nov 19, 2023 at 17:48
• x'*x <= a/b + sum(real(x)) )or whatever that last term is really meant to be. Commented Dec 4, 2023 at 20:12
• $V$ is an expression built up out of variables. The relation between them is provided by the semidefinite constraint [X x;x' 1] >= 0. However, that is a relaxation of$X = xx^H$ and doesn't guarantee the solution will satisfy that equality, i.e., a rank one solution. Commented Dec 5, 2023 at 23:02