Optimization failure - can it be only because of infeasibility? please go through this small program

a1 = 7227; a0 = 1.011e07; p = a1^2-2*a0^2; K = 10;

    variables r0 r2 r4 r6 r8;
    x = [r0 0 -r2; 0 r2 0; -r2 0 r4];
    minimize( -log_det(x))
    subject to
        a0^4*r0+2*p*a0^2*r2+(p^2+2*a0^2)*r4+2*p*r6+r8 <= K;

Guys…it shows the optimization failed…is it because there is no feasible solution or can it be of any other problem? can you check it?

If cvx_status is Failed, it is because the solver was unable to make any determination to its prescribed accuracy. It does not mean it thinks the problem is infeasible. Try another solver.

But I’ll tell you the likely problem: it is the large value of a_0. CVX simply can’t handle a wide dynamic range. In fact, you’re squaring it in your model, which makes things even worse. Keep in mind that double-precision arithmetic has a precision of only about 10^{-16}, and a_0^2\approx 10^{14}! Try rescaling your problem.

Also: please use det_rootn instead of log_det. You should never use log in CVX when you can avoid it.

To appreciate the difficulties with such a large dynamic range for a solver with accuracy of roughly 1e-16, try to truncate all coefficients to about 8 digits (the solver has squaring operations internally). Then many of your coefficients become 0, which is not what you had in mind.

thanks a lot for replying…i changed to det_rootn and scaled down the values…it worked…the reason i hesitated at first to scale down was that the denominator is s^2+a1s+a0 and i was very particular about the coefficient of s^2 to be 1…thanks again for the valuable suggestions…