ogunmiloro

20 Reputation

0 Badges

0 years, 175 days

MaplePrimes Activity


These are questions asked by ogunmiloro


 

  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);

Error, missing operator or `;`

 

``


 

Download MltxPLOTS.mw


 

restart; _local(gamma); _local(I); _local(pi)

I

 

Warning, The imaginary unit, I, has been renamed _I

 

#
# 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,
             
          ]:

Error, `*` unexpected

 

#
# 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);

Error, `*` unexpected

 

#
# 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))];

Error, invalid input: eval received params, which is not valid for its 2nd argument, eqns

 

#
# 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));

Error, invalid input: eval received params, which is not valid for its 2nd argument, eqns

 

NULL

``


 

Download sensit_of_mal_toxo.mw


 

restart; _local(gamma); _local(I); _local(pi)

I

 

Warning, The imaginary unit, I, has been renamed _I

 

#
# Set up numerical values for all problem parameters
#
  params:=[       gamma=0.142,        tau=0.112,      mu[1]=0.4e-3,
                  beta[1]=0.081,  b[h]=10,  psi=0.011, phi=0.05
            epsilon=0.2e-2,     rho=0.5e-1, beta[2]=0.092, beta[o]=0.034
                    q=.5,      eta=0.213,   M[h]=100
              delta=0.021,       alpha=0.57e-1,   p=.2,   beta[k]=0.025
               omega=0.056,      mu[c]=0.0019,  (mu)^(2)[1]=0.091
          ]:

Error, missing operator or `;`

 

#
# Define main function
# R := sqrt((omega+mu[1]+eta)*mu[1]*mu[c]*psi*beta[o]*M[h]^2*(delta+mu[1]+eta+phi[1])*(`ε`+mu[1])*omega*beta[k]*   (1/((omega+mu[1]+eta)*(`ε`+mu[1])*mu^2)))
 

#
# Compute "all" derivatives and evaluate numerically.

NULL

NULL

NULL

NULL

NULL


 

Download maltoxo_sens_-_Copy.mw


 

Local*Gamma:

v[1](x, t) = v[1]*(-x*v[1]-x*`θv`[2]-v[1]-v[2]+1)

 

v[2](x, t) = gamma*v[2]*(lambda-v[1]-v[2]-eta*(x*v[1]+x*`θv`[2]))

(1)

NULL


 

Download DTM_TO_SOlve.mw

1 2 Page 1 of 2