# Problem with exp function

I wanna to solve the following question:

cvx_begin

``````variable x1

variable x2

variable lambda

minimize (lambda)

subject to

1-pow_p(2.718281828,-0.7*0.00005*10000*pow_p(x1,-0.3))-0.4*lambda<=0

1-pow_p(2.718281828,-0.8*0.00007*10000*pow_p(x2,-0.2))-0.4*lambda<=0

x1+x2-300<=0

x1>=0

x2>=0

lambda>=0

lambda-1<=0
``````

cvx_end

But the solution for this is x1=126.72, x2=110.84, lambda=9.87*e^-11

which contradict with first and second constraint or

1-pow_p(2.718281828,-0.70.0000510000pow_p(x1,-0.3))-0.4lambda<=0

1-pow_p(2.718281828,-0.80.0000710000pow_p(x2,-0.2))-0.4lambda<=0

So the solution is wrong.

I want to know what is wrong with my code.

I’m frankly surprised CVX is even accepting this. I don’t think it should be. The inner `pow_p` term is concave, so the outer `pow_p` terms are log-concave, which are very restricted.

I don’t think this problem is convex; but even if it were, it’s violating the DCP rules. Did you try `exp` only to find that it gave you an error? If so there is a bug in `pow_p` somewhere. But regardless, CVX will not be able to solve this.