Contact
CoCalc Logo Icon
StoreFeaturesDocsShareSupport News AboutSign UpSign In
| Download

All published worksheets from http://sagenb.org

Views: 168738
Image: ubuntu2004
S0 = 9000 I0 = 1000 R0 = 0 t = 1/24 b = 1/11 c = 6.8 a = b*c n = I0+R0+S0 S=[S0] I=[I0] R=[R0] for i in range (0,25): S.append(S[i]+(-a*(S[i]/n)*I[i])*t) I.append(I[i]+(a*(S[i]/n)*I[i])-b*I[i]*t) R.append(R[i]+b*I[i]) print S print I print R
[9000, 8976.81818181818, 8940.91935834585, 8885.45784476822, 8800.08508527260, 8669.40964391009, 8471.12976319321, 8174.28547219672, 7738.92697273596, 7120.03842248137, 6280.39726313285, 5216.59285519637, 3993.27190721323, 2758.38877417102, 1698.04262345281, 936.469865736900, 473.965608061167, 227.218653563338, 105.910603696488, 48.7867447774459, 22.4005572978590, 10.2946252056361, 4.74447120486468, 2.19463974194922, 1.01929149670540, 0.475399476800122] [1000, 1552.57575757576, 2408.26655213290, 3730.22065620769, 5765.03726040480, 8879.41059075513, 13604.4935969347, 20677.2244081346, 31047.5055754651, 45783.2265937896, 65761.1931052987, 91043.4034673450, 120058.244842170, 149240.673956236, 174123.675990305, 191741.862796736, 202115.670046117, 207272.007294800, 209398.279251851, 209976.076565711, 209813.981138836, 209309.773580493, 208650.137225071, 207920.991751298, 207161.620594974, 206389.970895138] [0, 1000/11, 232.052341597796, 450.985664518969, 790.096633265122, 1314.19092966556, 2121.41007427966, 3358.18221945554, 5237.92989292233, 8060.43039978279, 12222.5419083091, 18200.8321906090, 26477.5052330949, 37391.8911278376, 50959.2251238591, 66788.6502138868, 84219.7286499537, 102593.880472328, 121436.790226401, 140472.997431114, 159561.731664361, 178635.729949710, 197663.891184300, 216632.085477488, 235533.993818515, 254366.868418058]
list_plot(S)
list_plot(I)
list_plot(R)
S0 = 9000 I0 = 1000 R0 = 0 t = 1/24 b = 1/2 c = 6.8 a = b*c n = I0+R0+S0 S=[S0] I=[I0] R=[R0] for i in range (0,25): S.append(S[i]+(-a*(S[i]/n)*I[i])*t) I.append(I[i]+(a*(S[i]/n)*I[i])-b*I[i]*t) R.append(R[i]+b*I[i]) print S print I print R
[9000, 8872.50000000000, 8364.80199479167, 6452.21733489225, 811.933833868502, -1440.08378632707, 3573.63763060816, -2517.09477403958, 6896.06586992728, 3714.85760673877, -1981.16301764200, 4830.09728196690, -244.196651941172, 428.303985621812, -628.710354621880, 1116.51225856186, -1255.70844573816, 2369.47363139282, -1408.07077317327, 2598.46243563272, -1101.50263279629, 1819.93455889994, -1098.66820106526, 1716.77934402210, -947.594733247985, 1350.81086095731] [1000, 4039.16666666667, 16139.7694861111, 61705.5561260698, 195786.827731347, 245756.358371637, 120307.120232449, 263978.299605819, 32562.8962421598, 108233.500886972, 242683.131270299, 74156.9855115542, 194395.102727190, 174205.189452196, 195944.258837790, 149976.744062260, 203785.525464163, 112535.623832516, 200852.197378925, 100510.979588854, 187216.162489715, 113201.333170470, 180889.438301917, 109550.167255197, 171212.849958529, 112484.181323466] [0, 500, 2519.58333333333, 10589.4680763889, 41442.2461394238, 139335.660005097, 262213.839190916, 322367.399307140, 454356.549110050, 470637.997231130, 524754.747674616, 646096.313309766, 683174.806065543, 780372.357429138, 867474.952155236, 965447.081574131, 1.04043545360526e6, 1.14232821633734e6, 1.19859602825360e6, 1.29902212694306e6, 1.34927761673749e6, 1.44288569798235e6, 1.49948636456758e6, 1.58993108371854e6, 1.64470616734614e6, 1.73031259232540e6]
list_plot(S)
list_plot(I)
list_plot(R)
S0 = 81000000 I0 = 1000 R0 = 0 t = 1 b = 1/5 c = 11.3 a = b*c n = I0+R0+S0 S=[S0] I=[I0] R=[R0] for i in range (0,40): S.append(S[i]+(-a*(S[i]/n)*I[i])*t) I.append(I[i]+(a*(S[i]/n)*I[i])-b*I[i]*t) R.append(R[i]+b*I[i])
list_plot(R)