I want to solve: [![enter image description here](https://i.stack.imgur.com/CJVkp.jpg)](https://i.stack.imgur.com/CJVkp.jpg)

I use following MATLAB code, but it does not work. 

Can someone please guide me? 

```
function f=objfun

f=-f;

function [c1,c2,c3]=constraint(x)
a1=1.1; a2=1.1; a3=1.1;
c1=f-log(a1)-log(x(1)/(x(1)+1)); 
c2=f-log(a2)-log(x(2)/(x(2)+1))-log(1-x(1)); 
c3=f-log(a3)-log(1-x(1))-log(1-x(2));

x0=[0.01;0.01]; 
[x,fval]=fmincon('objfun',x0,[],[],[],[],[0;0],[1;1],'constraint')

```