120 Reputation

3 years, 338 days

Maple 18

 >
 >

Maple 18

 >
 >

Maple

 >
 >
 >
 >
 >
 >
 >

 >
 >
 >
 >
 >
 >
 >

 >
 >
 >
 >
 >
 >
 >

I encountered syntax error of a differen...

Maple

 > restart:
 > # # Define gamma as local (don't like doing this!) #   local gamma:local pi: # # Replaced 'indexed' parameters with 'inert subscript' # parameters - otherwise one gets a problem defining # both the unindexed 'phi' and the indexed phi[c] #   M__h := 100: beta__o := 0.034: beta__j := .025: mu__1 := 0.0004:   epsilon := .7902: alpha := 0.11: psi := 0.000136: phi := 0.05:   omega := .7: eta := .134: delta := .245: f := 0.21:   M__v := 1000: beta__k := 0.09:   mu__v := .0005: M__c := .636:   beta__g := 0.15: mu__c := 0.0019: pi :=0.01231: theta := 0.12: mu__e := 0.005 # # D() is Maple's differential operator replated D(T) # with DD(T) in the following to avoid confusion #   ODE1 := diff(B(T), T) = M__h-beta__o*B(T)-beta__j*B(T)-mu__1*B(T)+epsilon*G(T)+alpha*F(T):   ODE2 := diff(C(T), T) = beta__o*B(T)*J(T)-beta__j*C(T)-(psi+mu__1+phi)*C(T):   ODE3 := diff(DD(T), T) = beta__j*B(T)*L(T)- beta_o*E(T)-(omega+mu__1+eta)*DD(T):   ODE4 := diff(E(T), T) = beta_o*E(T)-beta__j*C(T)-(delta+mu__1+eta+phi)*E(T):   ODE5 := diff(F(T), T) = psi*C(T)-(alpha+mu__1)*F(T)+f*delta*E(T):   ODE6 := diff(G(T), T) = omega*DD(T)-(epsilon+mu__1)*G(T)+(1-f)*delta*E(T):   ODE7 := diff(H(T), T) = M__v-beta__k*H(T)-mu__v*H(T):   ODE8 := diff(J(T), T) = beta__k*H(T)-mu__v*J(T):   ODE9 := diff(K(T), T) = M__c-beta__g*K(T)-mu__c*K(T):   ODE10:= diff(L(T), T) = beta__g*K(T)-mu__c*L(T):   ODE11:= diff(M(T), T) = pi*(DD(T)+ theta*E(T))-mu__e*M(T):   B0 := 100: C0 := 90: D0 := 45: E0 := 38:   F0 := 10: G0 := 45: H0 := 50: J0 := 70: K0 :=20: L0:= 65: M0 :=22: # # Solve system #   ans := dsolve( { ODE1, ODE2, ODE3, ODE4, ODE5, ODE6, ODE7, ODE8,                    B(0) = B0, C(0) = C0, DD(0) = D0, E(0) = E0,                    F(0) = F0, G(0) = G0, H(0) = H0, J(0) = J0, K(0) = K0, L(0) = L0, M(0) = M0,                  },                  numeric                ); # # Plot solutions for a few of the dependent variablss # just to show everything is working (more-or-less!) #   plots:-odeplot( ans, [T, B(T)], T=0..5);   plots:-odeplot( ans, [T, C(T)], T=0..5);   plots:-odeplot( ans, [T, DD(T)], T=0..5);   plots:-odeplot( ans, [T, E(T)], T=0..5);   plots:-odeplot( ans, [T, F(T)], T=0..5);   plots:-odeplot( ans, [T, G(T)], T=0..5);   plots:-odeplot( ans, [T, H(T)], T=0..5);   plots:-odeplot( ans, [T, J(T)], T=0..5);   plots:-odeplot( ans, [T, K(T)], T=0..5);   plots:-odeplot( ans, [T, L(T)], T=0..5);   plots:-odeplot( ans, [T, M(T)], T=0..5);
 >

Please i ecountered an error in computi...

Maple

 >
 > # # Set up numerical values for all problem parameters #   params:=[       psi=0.142,        mu[1]=0.112,      phi=0.4e-3,                  mu[v]=0.002, beta[o]=0.081,  M[h]=10,             omega=0.2e-2,     eta=0.5e-1, mu[e]=0.092,                 pi=0.598e-2,    beta[*]=.5,      eta=0.213,                         ]:
 > # # Define main function #   R:= sqrt((psi+mu[1]+phi)*(mu[1])^(2)*mu[v]*psi*beta[o]*(M[h])^(2)*(omega+mu[1]+eta)*mu[e]*pi*beta[*]/(psi+mu[1]+phi)*(omega+mu[1]+eta)*mu[v]*mu[e]*(mu[1])^2);
 > # # Compute "all" derivatives and evaluate numerically. # # For the purposes of this calculation "all" # derivatives, means the derivatives with respect to # every variable returned by indets(R, name) # # Output a list of two element lists where each of # the latter is # # [ varName, #   eval( diff( R, varName), params ) # ] #  [ seq( [j, eval( diff( R, j), params )],j in indets(R, name))];
 > # # Compute all "sensitivities" (where the sensitivity # is as defined in Rouben Rostamian response to the # OP's earlier post) and evaluate numerically. # # For the purposes of this calculation "all" sensitivities # means the sensitivity with respect to every variable # returned by indets(R, name) # # Output a list of two element lists where each of # the latter is # # [ varName, #   eval( varName*diff( R, varName)/R, params ) # ] #   seq( [j, eval( j*diff( R, j)/R, params )],j in indets(R, name));
 >
 >