PolymathPlus Report
📉   Differential Equations 2022-04-01 12:46 

# Example 24 - Stiff ODE System
# Biological Reactors
# Verified Final Values: B=6.71667, S=0
# Ref.:Prob. 6.1 in Problem Solving in Chemical...

# Solution algorithm is explicitly set to stiff
#@ DEQ_SOLUTION_METHOD_INDEX = 3

d(S)/d(t) = -k * y * B * S / (Km + S)
d(B)/d(t) = k * B * S / (Km + S)
k = 0.3
y = .75
Km = 1.e-6
t(0) = 0
S(0) = 5
B(0) = 0.05
t(f) =20


Calculated values

  Variable Initial value Minimal value Maximal value Final value
1 B 0.05 0.05 6.7166667 6.7166667
2 k 0.3 0.3 0.3 0.3
3 Km 1.0E-06 1.0E-06 1.0E-06 1.0E-06
4 S 5 -1.6616E-25 5 -1.1672E-32
5 t 0 0 20 20
6 y 0.75 0.75 0.75 0.75

Integration chart

 -1 0 1 2 3 4 5 6 7 8 9 0 4 8 12 16 20 t S B

Formatted equations

  d S ( ) d t ( ) = k y B S + K m S
  d B ( ) d t ( ) = k B S + K m S
  k = 0 . 3
  y = . 7 5
  K m = 1 . e - 6

Differential equations

1 d(S)/d(t) = -k * y * B * S / (Km + S)
2 d(B)/d(t) = k * B * S / (Km + S)

Explicit equations

1 k = 0.3
2 y = .75
3 Km = 1.e-6

General

Total number of equations 5
Number of differential equations 2
Number of explicit equations 3
Reporting digits 10
Elapsed time 0.01 sec
Solution method stiff
Independent variable accuracy. eps 1E-05
First stepsize guess. h1 0.02
Minimum allowed stepsize. hmin 2E-07
Good steps 171
Bad steps 16
Calculated Intermediate data points 50

Calculated data points

    t S B k y Km
1 0 5 0.05 0.3 0.75 1.0E-06
2 0.87721017 4.988711 0.06505194 0.3 0.75 1.0E-06
3 1.3325653 4.9815695 0.07457405 0.3 0.75 1.0E-06
4 1.7730313 4.9736683 0.08510897 0.3 0.75 1.0E-06
5 2.199543 4.9649552 0.09672636 0.3 0.75 1.0E-06
6 2.4078353 4.9602774 0.1029634 0.3 0.75 1.0E-06
7 2.8149898 4.9502447 0.11634035 0.3 0.75 1.0E-06
8 3.2101825 4.9392617 0.13098434 0.3 0.75 1.0E-06
9 3.7820143 4.9208771 0.15549713 0.3 0.75 1.0E-06
10 4.1501545 4.9072589 0.17365479 0.3 0.75 1.0E-06
11 4.5084789 4.8924781 0.1933625 0.3 0.75 1.0E-06
12 4.8574949 4.8764702 0.21470639 0.3 0.75 1.0E-06
13 5.3645834 4.8500118 0.24998426 0.3 0.75 1.0E-06
14 5.6923081 4.8306418 0.27581087 0.3 0.75 1.0E-06
15 6.0122234 4.8098048 0.3035936 0.3 0.75 1.0E-06
16 6.47824 4.7756393 0.34914765 0.3 0.75 1.0E-06
17 6.9286161 4.7377569 0.39965742 0.3 0.75 1.0E-06
18 7.2206816 4.7103086 0.43625519 0.3 0.75 1.0E-06
19 7.6471927 4.665647 0.49580399 0.3 0.75 1.0E-06
20 8.0605577 4.6165525 0.56126331 0.3 0.75 1.0E-06
21 8.4615604 4.5627403 0.63301298 0.3 0.75 1.0E-06
22 8.8509169 4.5039164 0.71144482 0.3 0.75 1.0E-06
23 9.2292825 4.4397782 0.79696241 0.3 0.75 1.0E-06
24 9.7177066 4.3454538 0.9227282 0.3 0.75 1.0E-06
25 10.072685 4.2676881 1.0264159 0.3 0.75 1.0E-06
26 10.418501 4.1835343 1.1386209 0.3 0.75 1.0E-06
27 10.866126 4.0608012 1.3022651 0.3 0.75 1.0E-06
28 11.299273 3.9252697 1.4829737 0.3 0.75 1.0E-06
29 11.615181 3.8147046 1.6303939 0.3 0.75 1.0E-06
30 12.025122 3.6546843 1.8437543 0.3 0.75 1.0E-06
31 12.422883 3.4794266 2.0774312 0.3 0.75 1.0E-06
32 12.809165 3.2879917 2.3326777 0.3 0.75 1.0E-06
33 13.276851 3.0244714 2.6840381 0.3 0.75 1.0E-06
34 13.639577 2.7930553 2.9925929 0.3 0.75 1.0E-06
35 14.07958 2.4763428 3.4148762 0.3 0.75 1.0E-06
36 14.421453 2.1997232 3.7837024 0.3 0.75 1.0E-06
37 14.836864 1.8230893 4.2858809 0.3 0.75 1.0E-06
38 15.23976 1.4101119 4.8365175 0.3 0.75 1.0E-06
39 15.630868 0.9585268 5.4386309 0.3 0.75 1.0E-06
40 16.010811 0.466062 6.0952507 0.3 0.75 1.0E-06
41 16.414481 -1.6616E-25 6.7166667 0.3 0.75 1.0E-06
42 16.942352 -6.8537E-28 6.7166667 0.3 0.75 1.0E-06
43 17.246315 -2.2859E-28 6.7166667 0.3 0.75 1.0E-06
44 17.886315 -2.5427E-29 6.7166667 0.3 0.75 1.0E-06
45 18.206315 -8.4805E-30 6.7166667 0.3 0.75 1.0E-06
46 18.526315 -2.8284E-30 6.7166667 0.3 0.75 1.0E-06
47 18.846315 -9.4335E-31 6.7166667 0.3 0.75 1.0E-06
48 19.486315 -1.0494E-31 6.7166667 0.3 0.75 1.0E-06
49 19.806315 -3.4998E-32 6.7166667 0.3 0.75 1.0E-06
50 20 -1.1672E-32 6.7166667 0.3 0.75 1.0E-06