I want to use CVX to solve the problem in the first picture. Where x and y are variables and the others are constants. But CVX got it wrong. Please help me find the problem, thank you very much!
The code as follows:
`clc
clear all;
L=1;
a1=0.5;
a2=1;
b1=0.5;
b2=0.5;
cvx_begin
cvx_quiet(true)
cvx_solver mosek
variables x y ;
% minimize a1*(-x^2+3*x+2*y^2+3*y+3.5)/(x+1)-a2*y/(x^2-2*x+y^2-8*y+20);
minimize (pow_pos(L,2)*pow_pos(1-x,2)*(3+y)+4*L*(1-x)*(1+y)+4*y+x*(1-y))*inv_pos(2*(1-y)*(1-x)*(1+L*(1-x)));
subject to
x*a1+a2<=0;
y*b1+b2<=0;
x>=0;
x<=1;
y>=0;
y<=1;
cvx_end`
When L>0, 0<x<1, 0<y<1, the result of the second partial derivative of the objective function for x, y is greater than zero, and the absolute value of the Hessian matrix is also greater than zero. So the objective function is convex.
You have yet to convince me. Even if your claim is true, if the function is only convex over 0 <= x,y <= 1 rather than over its entire natural domain of -\infty \le x,y \le \infty, it is unlikely there would be a DCP compliant formulation of it.
I now think it might well be convex, so I have removed the non-convex topic designation. However, I still think it unlikely there is a DCP formulation. If it is convex over the feasible region, all stationary points should be global minima, so that is good news for using a local nonlinear optimizer.