0
$\begingroup$

The following code seem to produce an output that appears to be independent of the parameter "fg". It is possible that the way the code is written might be causing it, but how can one fix this problem. I am after an output that depends on the parameter "fg". Currently, the output seem to be sensitive to all other parameters (a,b,c,d). Any clues on how to fix this.

   Clear[w, z, x, y, t, a, b, c, d, ope2h, fg]
    a = 0.5; 
    b = 0.001; 
    c = 0.7; 
    d = 0.5; 
    fg = 0.01


    ope2h = NDSolve[{Derivative[1][w][t] == 
        1/4 + x[t]/a - w[t]*(1/a + 1/b) + y[t]*fg, 
       Derivative[1][x][t] == 1/2 + w[t]/a - x[t]*(1/a + 1) + z[t]*fg, 
           Derivative[1][y][t] == w[t]/b - y[t]/c - y[t]*fg, 
       Derivative[1][z][t] == x[t] - z[t]/d - z[t]*fg, 
       w[0] == x[0] == y[0] == z[0] == 0}, {w, x, y, z}, {t, 15}]


    Plot[{Evaluate[y[t] /. ope2h], Evaluate[z[t] /. ope2h], 
      Evaluate[w[t] /. ope2h], Evaluate[x[t] /. ope2h]}, {t, 0, 15}, 
     PlotRange -> {0, 0.65}]
$\endgroup$
2
$\begingroup$

It's not independent. The following is the same as your code, just edited for taking fg as a parameter

Clear[w, z, x, y, t, a, b, c, d, ope2h, fg]
a = 0.5;
b = 0.001;
c = 0.7;
d = 0.5;
ope2h = ParametricNDSolve[{
   w'[t] == 1/4 + x[t]/a - w[t]*(1/a + 1/b) + y[t] fg, 
   x'[t] == 1/2 + w[t]/a - x[t]*(1/a + 1) + z[t] fg, 
   y'[t] == w[t]/b - y[t]/c - y[t] fg,
   z'[t] == x[t] - z[t]/d - z[t] fg,
   w[0] == x[0] == y[0] == z[0] == 0}, {w, x, y, z}, {t, 15}, fg]


Manipulate[
 Plot[Through[(Through[({w, x, y, z} /. ope2h)[fg]])[t]], {t, 0, 15}, 
      PlotRange -> {0, 0.65}], {fg, 0.01, 10}]

Mathematica graphics

$\endgroup$

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.