ogunmiloro

15 Reputation

0 Badges

0 years, 106 days

MaplePrimes Activity


These are questions asked by ogunmiloro


 

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


 

with*PDE(tools):

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

 

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

(1)

``


 

Download DTM_TO_SOlve.mw

restart; _local(gamma); _local(GAMMA); _local(Pi); _local(pi); _local(I); _local(D);
                               I
Warning, The imaginary unit, I, has been renamed _I
b := .45; mu[t] := 1.112; delta := .181; rho := 0.2e-1; beta[k] := .123; sigma := 0.9e-1; alpha := 0.312e-1; gamma := 0.14e-2; phi := .24; xi := .134; A[h] := .576; k[1] := 0.1e-2; beta[c] := 0.1e-1; mu[c] := 0.19e-2; eta := .557; z := .636; phi[c] := 0.57e-1;
                              0.45
                             1.112
                             0.181
                              0.02
                             0.123
                              0.09
                             0.0312
                             0.0014
                              0.24
                             0.134
                             0.576
                             0.001
                              0.01
                             0.0019
                             0.557
                             0.636
                             0.057
ODE1 := diff(B(T), T) = rho*b-mu[t]*B(T)-delta*B(T);
                  d                            
                 --- B(T) = 0.0090 - 1.293 B(T)
                  dT                           
ODE2 := diff(C(T), T) = delta*B(T)-mu[t]*C(T)+1-rho*b-beta[k]*C(T)*H(T)+sigma*C(T);
  d                                                           
 --- C(T) = 0.181 B(T) - 1.022 C(T) + 0.9910 - 0.123 C(T) H(T)
  dT                                                          
ODE3 := diff(D(T), T) = beta[k]*C(T)*H(T)-(mu[t]+alpha+gamma)*C(T)-phi*C(T);
       d                                                 
      --- D(T) = 0.123 C(T) H(T) - 1.1446 C(T) - phi C(T)
       dT                                                
ODE4 := diff(E(T), T) = alpha*D(T)-xi*E(T)-mu[t]*E(T);
               d                                 
              --- E(T) = 0.0312 D(T) - 1.246 E(T)
               dT                                
ODE5 := diff(F(T), T) = phi*D(T)+xi*E(T)-mu[t]*F(T)-sigma*C(T);
    d                                                       
   --- F(T) = phi D(T) + 0.134 E(T) - 1.112 F(T) - 0.09 C(T)
    dT                                                      
ODE6 := diff(G(T), T) = (1-k[1])*A[h]-beta[c]*G(T)*H(T)-mu[c]*H(T)-eta*J(T);
 d                                                             
--- G(T) = 0.575424 - 0.01 G(T) H(T) - 0.0019 H(T) - 0.557 J(T)
 dT                                                            
ODE7 := diff(H(T), T) = k[1]*A[h]+beta[c]*G(T)*H(T)-mu[c]*H(T)-z*H(T);
        d                                                
       --- H(T) = 0.000576 + 0.01 G(T) H(T) - 0.6379 H(T)
        dT                                               
ODE8 := diff(J(T), T) = z*H(T)-(phi[c]+eta)*J(T);
                d                                
               --- J(T) = 0.636 H(T) - 0.614 J(T)
                dT                               
ans := dsolve({ODE1, ODE2, ODE3, ODE4, ODE5, ODE6, ODE7, ODE8, B(0) = B0, C(0) = C0, D(0) = D0, E(0) = E0, F(0) = F0, G(0) = G0, H(0) = H0, J(0) = J0}, numeric, output = listprocedure);
Warning, The use of global variables in numerical ODE problems is deprecated, and will be removed in a future release. Use the 'parameters' argument instead (see ?dsolve,numeric,parameters)
    [T = proc(T)  ...  end;, B(T) = proc(T)  ...  end;,

      C(T) = proc(T)  ...  end;, D(T) = proc(T)  ...  end;,

      E(T) = proc(T)  ...  end;, F(T) = proc(T)  ...  end;,

      G(T) = proc(T)  ...  end;, H(T) = proc(T)  ...  end;,

      J(T) = proc(T)  ...  end;]
B0 := 100; C0 := 90; D0 := 45; E0 := 38; F0 := 100; G0 := 45; H0 := 50; J0 := 20;
                              100
                               90
                               45
                               38
                              100
                               45
                               50
                               20
ans := dsolve([ODE1, ODE2, ODE3, ODE4, ODE5, ODE6, ODE7, ODE8, B(0) = B0, C(0) = C0, D(0) = D0, E(0) = E0, F(0) = F0, G(0) = G0, H(0) = H0, J(0) = J0], numeric, output = listprocedure);
Error, (in f) unable to store 'HFloat(450.486)-HFloat(90.0)*phi' when datatype=float[8]

 

Page 1 of 1