Contact
CoCalc Logo Icon
StoreFeaturesDocsShareSupport News AboutSign UpSign In
| Download

All published worksheets from http://sagenb.org

Views: 168738
Image: ubuntu2004
S0 = 10000 I0 = 1000 R0 = 19000 b = 1/11 c = 6.8 a = b*c n = I0+R0+S0 S=[S0] I=[I0] R=[R0] for i in range (0,50): S.append(S[i]+(-a*(S[i]/n)*I[i])) I.append(I[i]+(a*(S[i]/n)*I[i])-b*I[i]) R.append(R[i]+b*I[i]) print S print I print R
[10000, 9793.93939393939, 9568.88563875671, 9324.61723149398, 9061.28908700643, 8779.49227539982, 8480.30018531227, 8165.29399293897, 7836.56087438859, 7496.66012062421, 7148.55521895157, 6795.51379317122, 6440.98149161010, 6088.43970912327, 5741.25961846345, 5402.56575068653, 5075.12107553511, 4761.24244141464, 4462.75100421424, 4180.95778368618, 3916.68057666766, 3670.28571943597, 3441.74686429642, 3230.71292012213, 3036.57827628046, 2858.54996626757, 2695.70814024505, 2547.05781146935, 2411.57114790104, 2288.22053225876, 2176.00322361576, 2073.95877716211, 1981.18048817233, 1896.82209192602, 1820.10083232231, 1750.29785252092, 1686.75669134893, 1628.88050799961, 1576.12851459858, 1528.01197548261, 1484.09003378093, 1443.96554829533, 1407.28106396681, 1373.71499434937, 1342.97806157065, 1314.81001565975, 1288.97663868103, 1265.26702804888, 1243.49114630175, 1223.47762038730, 1205.07177131925] [1000, 1115.15151515152, 1238.82785986588, 1370.47555259535, 1509.21501048332, 1653.81045750054, 1802.65614236076, 1953.78450361036, 2104.90084910525, 2253.44698022370, 2396.69306551237, 2531.85330351887, 2656.21712294191, 2767.28462152493, 2862.89338295521, 2941.32421591802, 3001.37578053144, 3042.40207096723, 3064.31150171607, 3067.53094936084, 3052.94170643747, 3021.79640853848, 2975.62649926544, 2916.14894350651, 2845.17913793850, 2764.55479904789, 2676.07346152060, 2581.44438470352, 2482.25428602605, 2379.94542112051, 2275.80405511619, 2170.95722383200, 2066.37576520069, 1962.88181915604, 1861.15927701829, 1761.76595890893, 1665.14657836192, 1571.64580004197, 1481.52090253010, 1394.95372323424, 1312.06169009644, 1232.90784011873, 1157.50979352737, 1085.84770009686, 1017.87120559405, 953.505505541857, 892.656563834953, 835.215577754837, 781.062770615163, 730.070590110051, 682.106385531736] [19000, 210000/11, 19192.2865013774, 19304.9072159107, 19429.4959025103, 19566.6972670996, 19717.0436723270, 19880.9215034507, 20058.5382765062, 20249.8928991521, 20454.7517155361, 20672.6329033099, 20902.8013854480, 21144.2756693518, 21395.8469985814, 21656.1100333955, 21923.5031439335, 22196.3554876181, 22472.9374940697, 22751.5112669530, 23030.3777168949, 23307.9178720256, 23582.6266364382, 23853.1381363714, 24118.2425857811, 24376.8952346846, 24628.2183982344, 24871.4978038271, 25106.1745660729, 25331.8340466207, 25548.1927212681, 25755.0839990059, 25952.4437466270, 26140.2960889180, 26318.7398906594, 26487.9361885702, 26648.0967302892, 26799.4736919584, 26942.3505828713, 27077.0343012832, 27203.8482761226, 27323.1266115860, 27435.2091425058, 27540.4373055538, 27639.1507328353, 27731.6844787984, 27818.3667974840, 27899.5173941963, 27975.4460830831, 28046.4517895027, 28112.8218431490]
list_plot (S)
list_plot (I)
list_plot (R)