```
cvx_begin
variables x_1 y_1
phi_0 = (T2*inv_pos((1-x_1-(x_1.*T2))))
phi_1 = T2*inv_pos(1-y_1-(y_1.*T2))
phi_2 = T2*inv_pos(1-y_1-(y_1.*T2))
T = ((R_1.*((a*inv_pos((b.*phi_0)+(a)))+(c*inv_pos((d.*phi_1)+c))))+(R_2.*((a*inv_pos((b.*phi_0)+a))+(f*inv_pos((g.*phi_2)+f)))))
maximize(T)
subject to
x_1+x_2 == 1
y_1+y_2 == 1
0 < x_1 <= 0.47
0 < y_1 <= 0.47
cvx_end
```

%%%%%%%%%%%%%%%%%%%%%%%%%

It gives this error. Can anyone help?

Error using cvx/pow_cvx (line 144)

Disciplined convex programming error:

Illegal operation: pow_p( {convex}, {-1} )

Error in cvx/inv_pos (line 5)

y = pow_cvx( x, -1, ‘pow_p’ );

Error in my_test1 (line 76)

T =

((R_1.*((a*inv_pos((b.*phi_0)+(a)))+(c*inv_pos((d.*phi_1)+c))))+(R_2.*((a*inv_pos((b.*phi_0)+a))+(f*inv_pos((g.*phi_2)+f)))))

help inv_pos

inv_pos Reciprocal of a positive quantity.

inv_pos(X) returns 1./X if X is positive, and +Inf otherwise.

X must be real.

```
For matrices and N-D arrays, the function is applied to each element.
Disciplined convex programming information:
inv_pos is convex and nonincreasing; therefore, when used in CVX
specifications, its argument must be concave (or affine).
```

The argument of `inv_pos`

must be concave, but your argument is convex, because it is the output of another `inv_pos`

.

Have you proven this problem is convex?

Yes. I have proven that. Since it is a maximization problem, I have tried and proved that it is concave.

" The argument of `inv_pos`

must be concave, but your argument is convex, because it is the output of another `inv_pos`

" What can I do for this?

Show us your convexity proof.

Did it manually. Proved by using the Hessian matrix and by taking its determinant, the determinant is less than zero for the considered range of x_1 and y_1.

Show us. We don’t even know the values of the constants.

Even if your objective function is concave, if it is concave on the constraint set, but not concave over the entirety of its natural domain, you have little prospect of reformulating it in a way which CVX will accept.

Can you please provide your email id?

Everything on this forum is done with posts on the forum. You can scan and post an image of handwritten calculations if you want.

Becaue this is a 2 variable problem,. concavity requires both diagonal elements of the Hessian to be nonpositive and its determinant to be nonnegative.

I haven’t checked on the signs of the diagonal elements. Than you for your reply.