# Solving an optimization problem with non linear objective function and LMI constraints. ( Application: outer approximation of union of ellipsoids)

The optimization problem I need to solve is provided in the following link:
https://math.stackexchange.com/q/4637659/1149147

I tried to solve this for p = 2 using cvx MATLAB with the code below:
cvx_begin sdp quiet
variable A0(3,3) symmetric
variable b0(3)
variable tau1 nonnegative
variable tau2 nonnegative
minimize(log(det_inv(A0)))
subject to
[A0 b0 0;b0’ -1 b0’;0 b0 -A0] - tau1*[A1 b1 0; b1’ c1 0;0 0 0] <= 0;
[A0 b0 0;b0’ -1 b0’;0 b0 -A0] - tau2*[A2 b2 0; b2’ c2 0;0 0 0] <= 0;
cvx_end

But it is showing the following error:

CVX Warning:
Models involving “log” or other functions in the log, exp, and entropy
family are solved using an experimental successive approximation method.
This method is slower and less reliable than the method CVX employs for
other models. Please see the section of the user’s guide entitled
The successive approximation method
for more details about the approach, and for instructions on how to
suppress this warning message in the future.

Error
Error using cvx/log
Disciplined convex programming error
Illegal operation: log( { convex} ).

`maximize(log_det(A0))`

Also see http://web.cvxr.com/cvx/examples/cvxbook/Ch08_geometric_probs/html/min_vol_elp_finite_set.html . Apparently, `log_det` was added to CVX subsequent to creation of that example.

`minimize(det_inv(A0))`
or
`maximize(det_rootn(A0))`
would also work

Since log(det(A0(-1))) = -log(det(A0)), I changed the code as follows and it is working.

CODE:
cvx_begin sdp quiet
variable A0(3,3) symmetric
variable b0(3)
variable tau1 nonnegative
variable tau2 nonnegative
minimize(-log_det(A0))
subject to
A0 >= 0;
tau1 >= 0;
tau2 >= 0;
[A0 b0 zeros(3,3);b0’ -1 b0’;zeros(3,3) b0 -A0] - …
tau1*[A1 b1 zeros(3,3); b1’ c1 zeros(1,3);zeros(3,3) …
zeros(3,1) zeros(3,3)] <= 0;
[A0 b0 zeros(3,3);b0’ -1 b0’;zeros(3,3) b0 -A0] - …
tau2*[A2 b2 zeros(3,3); b2’ c2 zeros(1,3);zeros(3,3) …
zeros(3,1) zeros(3,3)] <= 0;
cvx_end