function F = myfun2(x)

 
beta = 0.97;
eta = 2.5;
theta = 0.2;
psi_e = 0.8;
gamma_e = 0.9;
psi_d = 3;
gamma_d = 2;
alpha = 0.8;
mu_r = 0.08;
sigma_r = 0.30;
mu_lr = 0.02;
sigma_lr = 0.1;
rho = 0.7;
phi = 0.01;
xi = 0.08;
delta = 0.5;


M = x(1);
e = x(2);
a_r = x(3);
a_lr = x(4);
p = x(5);
pi = x(6);
m_c = x(7);
m_d = x(8);
r = x(9);
mu = x(10);


F=[M - (m_c^((eta - 1)/eta) + theta*m_d^((eta - 1)/eta))^(eta/(eta - 1));
   
(beta-1)*p*e + beta*pi + psi_e*e^(1-gamma_e)*pi^(2-gamma_e);

beta + psi_d*r*m_d*M^((1/eta)-gamma_d)*m_c^(-1/eta)  - 1;

beta*(1+r) + psi_e*theta*r*M^((1/eta) - gamma_d)*m_d^(1-(1/eta))  - 1;

pi - (mu_r/(1-rho))*(a_r)^alpha - (mu_lr/(1-rho))*(a_lr)^alpha + r*m_d;

a_r + a_lr - e - m_d;

-p - phi + beta*((alpha*mu_r)/(1-rho)*(a_r)^(alpha-1) - r) - mu*(p - xi) ;

-p - phi + beta*((alpha*mu_lr)/(1-rho)*(a_lr)^(alpha-1) - r) - mu*(p - xi*delta);

p + phi - beta*(1+r) - mu*p;

p*e - xi*(a_r + delta*a_lr)];


end



