GOODLUCK

15 Reputation

2 Badges

11 years, 181 days

MaplePrimes Activity


These are replies submitted by GOODLUCK

I've done it. Thank you all guys.You just make the problem easier and easier.I could say nothing but that your answers are perfect indeed!

Best wishes,

GOODLUCK 

@Carl Love 

Thank you ,Carl. I tried it. Maple just stopped with the following warning.

Error, (in numapprox:-minimax) function does not evaluate to real numeric

Is there any way to deal with it? Could you please kindly give me another hand? The following code is what I am trying to run. Many thanks indeed.

restart;
with(Statistics):
i=F;
C_i:=50;
PD_i:=(1-R_i_t)/LGD_i;
b_i:=(0.11852-0.05478*ln(PD_i))^2;
M_i:=2.5;
LGD_i:=0.75; 
B_i:=(1-1/(exp(C_i*PD_i)))/(1-1/exp(C_i));
R_i:=0.12*B_i+0.24*(1-B_i);
G_C:=3.09023230616741;
Quantile(Normal(0,1),PD_i);
G_PD:=%;t:=sqrt(1/(1-R_i))*G_PD+sqrt(R_i/(1-R_i))*G_C;
CumulativeDistributionFunction('Normal'(0,1),t);
N_t:=%;
k_i:=(LGD_i*N_t-PD_i*LGD_i)*((1+(M_i-2.5)*b_i)/(1-1.5*b_i));
omega_i:=12.5*k_i;
f:= omega_i->omega_i; plot(omega_i,R_i_t=0..1);
with(numapprox);
minimax(omega_i,R_i_t=0.2..1,3);

GOODLUCK

Oh, there turns out to be  such a big difference with or with tilde.I will evaluate the parameters before solving the system numerically. Hope I am lucky enough to work it out finally. No matter what, I will share my results with you then. See you!

Many thanks ,Preben. I learned more each time reading through your reply, and your consecutive response says you are patient in illuminating others for learning. By the way, I am using Maple 16, I guess yours are different, because it seems that  the code fvars:=freeze(vars)  other than the one in your example is ok in Maple 16 .

Thank you again. I will try to do what  you suggest, and hope to keep in touch if possible.

Thank you, Preben. Exactly, most of the variables in my system are distinguished by superscript. It is conventional practice in the social science modelling  which has been frustrating me for days to solve these nonlinear equations. Your comments and the command you display enlighten me indeed, I'll try it and check my file more carefully. Though your result shows no solution, maybe I could try fsolve command?  

 

Carl,thank you very much for your kind heart. I am sorry for the typewriting chaos in the original equations. Thougth those expressions you mentioned above are created as variables, I now make some change to make it clear and concise. After some simplifying work done by hand, now the system is reduced to contain 40 equations with parameters and 40 unknowns. Could you please help have a look at it (see the file posted below)? Is it possible to work it out ? I am grateful for your suggestions and comments.

nonlineareqns.mw

I have tried several times but always failed to upload the code file. I don't know what's wrong with the browser. Here is some of the equations for illustrating. Hope it is not meaningless. Thank you in advance. 

eqn4:=1/(beta[B]*(1+r^H))*(A/A)*(ctilde^B/ctilde^B)=nu^H/Pi+theta^H*(1-nu^H)^2*mutilde^H*M/Pi^2;

eqn6:=wtilde^B*n^B+ttilde^B+mutilde^B/(1+r^B)+mutilde^H/(1+r^H)=ctilde^B*A/M+ptilde^H*(htilde^B-(1-delta[h])*htilde^B*A/A)+nu^B*mutilde^B/(Pi*g)+nu^H*mutilde^H/(Pi*g)+(theta^B/2)*((1-nu^B)*mutilde^B/Pi)^2*(M/g)+(theta^H/2)*((1-nu^H)*mutilde^H/Pi)^2*(M/g);

eqn8:=(1/gamma-epsilonn[gamma])*ctilde^s+beta[s]*htilde^s*(A/A)*(ctilde^s/ctilde^s)*((2-delta[h])*ptilde^H*M/A-ptilde^H*M/A)=(M/A)*ptilde^H*htilde^s;

Where  variables such as htilde^B, ctilde^s,mutilde^H etc should be solved for. 

eqn4:=1/(beta[B]*(1+r^H))*(A/A)*(ctilde^B/ctilde^B)=nu^H/Pi+theta^H*(1-nu^H)^2*mutilde^H*M/Pi^2;

eqn6:=wtilde^B*n^B+ttilde^B+mutilde^B/(1+r^B)+mutilde^H/(1+r^H)=ctilde^B*A/M+ptilde^H*(htilde^B-(1-delta[h])*htilde^B*A/A)+nu^B*mutilde^B/(Pi*g)+nu^H*mutilde^H/(Pi*g)+(theta^B/2)*((1-nu^B)*mutilde^B/Pi)^2*(M/g)+(theta^H/2)*((1-nu^H)*mutilde^H/Pi)^2*(M/g);

eqn8:=(1/gamma-epsilonn[gamma])*ctilde^s+beta[s]*htilde^s*(A/A)*(ctilde^s/ctilde^s)*((2-delta[h])*ptilde^H*M/A-ptilde^H*M/A)=(M/A)*ptilde^H*htilde^s;

Where  variables such as htilde^B, ctilde^s,mutilde^H etc should be solved for.

Page 1 of 1