I don’t understand what the actual optimization problem you’re trying to formulate is. Perhaps you can show us your attempted CVX code. Presuming u>=0, how about minimize(sum(inv_pos(u))) , subject to linear constraints in u, if you really have only linear constraints in u?
The problem is with the statements u_i=inv_pos(x_i). If you use assignment, then CVX is correct in disallowing {convex}-{convex}. If you use equality constraints u_i==inv_pos(x_i), then CVX is correct to disallow it {affine}=={convex}. Either way, this problem is not convex.
Here is my cvx code and the lamda is a vector have the same dimension with r and it should be less than r component wise.
cvx_begin quiet
variable r(n)
expression u(n)
for i = 1:n
u(i) = inv_pos(r(i), -1) + inv_pos(r(i)-lamda(i), -1);
end
minimize sum(u)
subject to
sum® <= 1;
r >= 0;
for j = 1:n
for k = 1:n
u(j) - 3*u(k) == 0;
end
end
cvx_end