FindRoot with CDF inside

• To: mathgroup at smc.vnet.net
• Subject: [mg71722] FindRoot with CDF inside
• From: Lixin Huang <eflixin at yahoo.com>
• Date: Mon, 27 Nov 2006 04:04:59 -0500 (EST)

```Can somebody help me have a look at the program below? Why
can't I solve the equaitons? Thanks a lot.

job[vh_, vl_, p_, theta_, sigma_, x_, y_, k_, w_] :== Module[{}, Clear[zxl, z0l, zxh, z0h, buy, sell];
Ev == p*vh + (1 - p)*vl;
ps == p*theta + (1 - p)*(1 - theta);
ph == p*theta*vh/ps + (1 - p)*(1 - theta)*vl/ps;
pl == p*(1 - theta)*vh/(1 - ps) + (1 - p)*theta*vl/(1 - ps);
displus== NormalDistribution[0, sigma];
disx== NormalDistribution[-x, sigma];
disy== NormalDistribution[-y, sigma];
disminus== NormalDistribution[-x-y, sigma];
price[z_] :== (ps* PDF[displus, z]*ph + (1 - ps)*PDF[disminus,z]*pl)/(ps*PDF[displus, z] + (1 - ps)*PDF[disminus, z]);
pricex[z_] :== (ps*PDF[displus, z]*ph + (1 - ps)*PDF[disy, z]*pl)/(ps*PDF[displus, z] + (1 - ps)*PDF[disy, z]);
d == 2*sigma^2*(Log[(1 - theta)/theta]/x);
sol == FindRoot[{p*theta*(1-CDF[displus, zxl+d])+(1 - p)*(1 - theta)*(1-CDF[displus, zxl]) ==== p*theta*CDF[disx, z0l+d] +
(1 - p)*(1 - theta)*CDF[disx, z0l] + k/w,
p*(1 - theta)*CDF[disminus, z0l+d] + (1 - p)*theta*CDF[disx, z0l]==== p*(1 - theta)*(1-CDF[disy, zxl+d])+
(1 - p)*theta*(1-CDF[disy, zxl]) + k/w}, {zxl, 2}, {z0l, -2}];
zxl == zxl /. sol;
z0l == z0l /. sol;
zxh == zxl + d;
z0h == z0l + d;
Return[{zxl, zxh, z0l, z0h}]];

vh==10; vl==2; p==0.6;theta==0.7;sigma==1;x==1;y==1;k==0.01;w==1;
job[vh,vl,p,theta,sigma,x,y,k,w,epsilon]

FindRoot::nlnum: The function value {-0.01`-0.42` CDF[NormalDistribution[-1
.`,
1.],-3.6946]-=861=87+0.42 (1. -1. CDF[=8618=87[0.,1.],=8619=87])+0.12 (1. - 1. CDF[
NormalDistribution[0.,1.],2.]),=861=87} is not a list of numbers with dimensions {2} at {zxl,z0l} == {2.,-2.}. More...

______________________________________________________________________________

```

• Prev by Date: RE: Using subscripts in function-parameter names
• Next by Date: Re: SetPrecision vs N