


function F=kappa_w_trigari(xd, x, a, gammaz, beta, rho, chi, s, bb, pw)

F=[-xd(1)*x+pw*a-xd(2)+beta*(xd(1)/2)*x^2+beta*rho*xd(1)*x;
   
   -xd(3)+bb*(pw*a+(beta/gammaz)*(xd(1)/2)*x^2);
    
   -xd(2)+chi*(a+beta*(xd(1)/2)*x^2+beta*xd(1)*s*x)+(1-chi)*xd(3)];