Sie sind auf Seite 1von 24

Simpson's Rule and

Runge-Kutta Integration
Written by
Prof. Carl T. Lira
Michigan State University
East Lansing, MI
lira@egr.msu.edu
Copyright 1999, Carl T. Lira
Please notify of any problems.

Simpson

Simpson's Rule Integration


first x =
last x =
number of intervals =
x

f(x)
1
20
1.02533
1.05067
1.076
1.10133
1.12667
1.152
1.17733
1.20267
1.228
1.25333
1.27867
1.304
1.32933
1.35467
1.38
1.40533
1.43067
1.456
1.48133
1.50667
1.532
1.55733
1.58267
1.608
1.63333
1.65867
1.684
1.70933
1.73467
1.76
1.78533
1.81067
1.836
1.86133
1.88667
1.912
1.93733
1.96267
1.988
2.01333
2.03867
2.064

1
0.0025
0.951196
0.905879
0.863725
0.824446
0.787788
0.75352
0.721441
0.691368
0.663137
0.6366
0.611625
0.588091
0.56589
0.544923
0.5251
0.506339
0.488566
0.471712
0.455716
0.44052
0.426071
0.412322
0.399228
0.386748
0.374844
0.363481
0.352627
0.342252
0.332329
0.322831
0.313734
0.305016
0.296657
0.288637
0.280937
0.273542
0.266435
0.259601
0.253027
0.2467
0.240607
0.234736

1
20
750 (must be even<751)
factor

Instructions
Enter the interval information in the top table.
Enter your new integrand formula in B8 using the integration variable
Click "Replicate Formula" button to copy
the formula to all other f(x) cells.

term
1
1
4
2
4
2
4
2
4
2
4
2
4
2
4
2
4
2
4
2
4
2
4
2
4
2
4
2
4
2
4
2
4
2
4
2
4
2
4
2
4
2
4
2

1
0.0025
3.804783
1.811758
3.4549
1.648893
3.15115
1.507041
2.885766
1.382737
2.652548
1.273201
2.4465
1.176183
2.263561
1.089846
2.100399
1.012678
1.954263
0.943425
1.822865
0.88104
1.704286
0.824645
1.596912
0.773496
1.499375
0.726962
1.410509
0.684505
1.329315
0.645661
1.254935
0.610033
1.186628
0.577274
1.12375
0.547084
1.06574
0.519203
1.012109
0.493399
0.962426
0.469473

Read Integral Value


Integral Value =

0.95

x interval size= 0.025333

Notes
Simpson's Rule is described in
B. Carnahan, H. Luther, J. Wilkes, "Applied Numerical Methods", Wiley
The method requires an odd number of evenly spaced points.
The column labelled "factor" is required and weighs the contribution of
each point to the integral.
To use for tabulated data istead of an analytical function,
enter the endpoint and interval information in rows 3-5, then
enter the intermediate point values in the f(x) column.
DO NOT USE the "Replicate Formula" button.
The integral value will automatically be displayed.

Page 2

Simpson

2.08933
2.11467
2.14
2.16533
2.19067
2.216
2.24133
2.26667
2.292
2.31733
2.34267
2.368
2.39333
2.41867
2.444
2.46933
2.49467
2.52
2.54533
2.57067
2.596
2.62133
2.64667
2.672
2.69733
2.72267
2.748
2.77333
2.79867
2.824
2.84933
2.87467
2.9
2.92533
2.95067
2.976
3.00133
3.02667
3.052
3.07733
3.10267
3.128
3.15333
3.17867
3.204
3.22933
3.25467
3.28
3.30533
3.33067
3.356

0.229079
0.223623
0.21836
0.21328
0.208376
0.203639
0.199061
0.194637
0.190358
0.186219
0.182213
0.178335
0.17458
0.170942
0.167416
0.163999
0.160685
0.15747
0.154351
0.151324
0.148385
0.145531
0.142758
0.140064
0.137446
0.1349
0.132424
0.130016
0.127673
0.125392
0.123172
0.121011
0.118906
0.116856
0.114858
0.11291
0.111012
0.109162
0.107357
0.105597
0.103879
0.102204
0.100568
0.098971
0.097413
0.09589
0.094403
0.092951
0.091531
0.090144
0.088788

4
2
4
2
4
2
4
2
4
2
4
2
4
2
4
2
4
2
4
2
4
2
4
2
4
2
4
2
4
2
4
2
4
2
4
2
4
2
4
2
4
2
4
2
4
2
4
2
4
2
4

0.916314
0.447246
0.873439
0.42656
0.833503
0.407278
0.796246
0.389273
0.761431
0.372437
0.728851
0.35667
0.698319
0.341883
0.669665
0.327998
0.642739
0.314941
0.617406
0.302648
0.593541
0.291062
0.571033
0.280128
0.549782
0.269799
0.529696
0.260031
0.51069
0.250784
0.49269
0.242022
0.475624
0.233711
0.45943
0.225821
0.44405
0.218324
0.429429
0.211194
0.415518
0.204407
0.402272
0.197943
0.38965
0.19178
0.377613
0.185901
0.366125
0.180288
0.355153

Page 3

Simpson

3.38133
3.40667
3.432
3.45733
3.48267
3.508
3.53333
3.55867
3.584
3.60933
3.63467
3.66
3.68533
3.71067
3.736
3.76133
3.78667
3.812
3.83733
3.86267
3.888
3.91333
3.93867
3.964
3.98933
4.01467
4.04
4.06533
4.09067
4.116
4.14133
4.16667
4.192
4.21733
4.24267
4.268
4.29333
4.31867
4.344
4.36933
4.39467
4.42
4.44533
4.47067
4.496
4.52133
4.54667
4.572
4.59733
4.62267
4.648

0.087463
0.086167
0.0849
0.08366
0.082447
0.081261
0.0801
0.078963
0.077851
0.076762
0.075696
0.074651
0.073629
0.072627
0.071645
0.070683
0.069741
0.068817
0.067911
0.067023
0.066153
0.065299
0.064462
0.06364
0.062835
0.062044
0.061269
0.060507
0.05976
0.059027
0.058307
0.0576
0.056906
0.056224
0.055555
0.054897
0.054251
0.053617
0.052993
0.052381
0.051778
0.051187
0.050605
0.050033
0.049471
0.048918
0.048374
0.04784
0.047314
0.046797
0.046288

2
4
2
4
2
4
2
4
2
4
2
4
2
4
2
4
2
4
2
4
2
4
2
4
2
4
2
4
2
4
2
4
2
4
2
4
2
4
2
4
2
4
2
4
2
4
2
4
2
4
2

0.174926
0.344668
0.169799
0.33464
0.164895
0.325043
0.160199
0.315853
0.155702
0.307048
0.151391
0.298606
0.147257
0.290507
0.14329
0.282733
0.139481
0.275267
0.135822
0.268093
0.132305
0.261196
0.128923
0.254561
0.125669
0.248177
0.122537
0.242029
0.11952
0.236107
0.116614
0.2304
0.113812
0.224897
0.11111
0.219589
0.108503
0.214467
0.105986
0.209522
0.103557
0.204746
0.10121
0.200131
0.098941
0.195671
0.096748
0.191358
0.094628
0.187187
0.092576

Page 4

Simpson

4.67333
4.69867
4.724
4.74933
4.77467
4.8
4.82533
4.85067
4.876
4.90133
4.92667
4.952
4.97733
5.00267
5.028
5.05333
5.07867
5.104
5.12933
5.15467
5.18
5.20533
5.23067
5.256
5.28133
5.30667
5.332
5.35733
5.38267
5.408
5.43333
5.45867
5.484
5.50933
5.53467
5.56
5.58533
5.61067
5.636
5.66133
5.68667
5.712
5.73733
5.76267
5.788
5.81333
5.83867
5.864
5.88933
5.91467
5.94

0.045787
0.045295
0.044811
0.044334
0.043865
0.043403
0.042948
0.042501
0.04206
0.041627
0.0412
0.040779
0.040365
0.039957
0.039556
0.03916
0.03877
0.038387
0.038008
0.037636
0.037268
0.036907
0.03655
0.036198
0.035852
0.03551
0.035174
0.034842
0.034515
0.034192
0.033874
0.03356
0.033251
0.032946
0.032645
0.032348
0.032055
0.031767
0.031482
0.031201
0.030923
0.03065
0.030379
0.030113
0.02985
0.02959
0.029334
0.029081
0.028832
0.028585
0.028342

4
2
4
2
4
2
4
2
4
2
4
2
4
2
4
2
4
2
4
2
4
2
4
2
4
2
4
2
4
2
4
2
4
2
4
2
4
2
4
2
4
2
4
2
4
2
4
2
4
2
4

0.18315
0.09059
0.179242
0.088668
0.175458
0.086806
0.171793
0.085002
0.168241
0.083253
0.164799
0.081558
0.161461
0.079915
0.158223
0.07832
0.155082
0.076773
0.152033
0.075271
0.149074
0.073813
0.1462
0.072397
0.143408
0.071021
0.140695
0.069684
0.138059
0.068384
0.135496
0.067121
0.133004
0.065892
0.13058
0.064696
0.128222
0.063533
0.125927
0.062401
0.123693
0.061299
0.121518
0.060226
0.1194
0.059181
0.117336
0.058162
0.115326
0.05717
0.113367

Page 5

Simpson

5.96533
5.99067
6.016
6.04133
6.06667
6.092
6.11733
6.14267
6.168
6.19333
6.21867
6.244
6.26933
6.29467
6.32
6.34533
6.37067
6.396
6.42133
6.44667
6.472
6.49733
6.52267
6.548
6.57333
6.59867
6.624
6.64933
6.67467
6.7
6.72533
6.75067
6.776
6.80133
6.82667
6.852
6.87733
6.90267
6.928
6.95333
6.97867
7.004
7.02933
7.05467
7.08
7.10533
7.13067
7.156
7.18133
7.20667
7.232

0.028102
0.027864
0.02763
0.027399
0.027171
0.026945
0.026722
0.026502
0.026285
0.026071
0.025859
0.025649
0.025442
0.025238
0.025036
0.024837
0.024639
0.024445
0.024252
0.024062
0.023874
0.023688
0.023504
0.023323
0.023143
0.022966
0.022791
0.022617
0.022446
0.022277
0.022109
0.021944
0.02178
0.021618
0.021458
0.021299
0.021143
0.020988
0.020835
0.020683
0.020533
0.020385
0.020238
0.020093
0.01995
0.019808
0.019667
0.019528
0.019391
0.019254
0.01912

2
4
2
4
2
4
2
4
2
4
2
4
2
4
2
4
2
4
2
4
2
4
2
4
2
4
2
4
2
4
2
4
2
4
2
4
2
4
2
4
2
4
2
4
2
4
2
4
2
4
2

0.056203
0.111458
0.05526
0.109596
0.054341
0.107781
0.053445
0.10601
0.05257
0.104282
0.051717
0.102597
0.050885
0.100952
0.050072
0.099346
0.049279
0.097778
0.048504
0.096248
0.047748
0.094752
0.047009
0.093292
0.046287
0.091864
0.045582
0.09047
0.044892
0.089107
0.044218
0.087774
0.04356
0.086471
0.042915
0.085197
0.042285
0.083951
0.041669
0.082732
0.041066
0.081539
0.040476
0.080372
0.039899
0.07923
0.039334
0.078112
0.038781
0.077018
0.03824

Page 6

Simpson

7.25733
7.28267
7.308
7.33333
7.35867
7.384
7.40933
7.43467
7.46
7.48533
7.51067
7.536
7.56133
7.58667
7.612
7.63733
7.66267
7.688
7.71333
7.73867
7.764
7.78933
7.81467
7.84
7.86533
7.89067
7.916
7.94133
7.96667
7.992
8.01733
8.04267
8.068
8.09333
8.11867
8.144
8.16933
8.19467
8.22
8.24533
8.27067
8.296
8.32133
8.34667
8.372
8.39733
8.42267
8.448
8.47333
8.49867
8.524

0.018987
0.018855
0.018724
0.018595
0.018467
0.018341
0.018216
0.018092
0.017969
0.017848
0.017727
0.017608
0.017491
0.017374
0.017258
0.017144
0.017031
0.016919
0.016808
0.016698
0.016589
0.016482
0.016375
0.016269
0.016165
0.016061
0.015958
0.015857
0.015756
0.015656
0.015558
0.01546
0.015363
0.015267
0.015172
0.015077
0.014984
0.014891
0.0148
0.014709
0.014619
0.01453
0.014442
0.014354
0.014267
0.014181
0.014096
0.014012
0.013928
0.013845
0.013763

4
2
4
2
4
2
4
2
4
2
4
2
4
2
4
2
4
2
4
2
4
2
4
2
4
2
4
2
4
2
4
2
4
2
4
2
4
2
4
2
4
2
4
2
4
2
4
2
4
2
4

0.075946
0.037709
0.074897
0.03719
0.073869
0.036681
0.072862
0.036183
0.071876
0.035695
0.070909
0.035217
0.069962
0.034748
0.069034
0.034288
0.068124
0.033838
0.067232
0.033396
0.066357
0.032963
0.0655
0.032539
0.064659
0.032122
0.063833
0.031713
0.063024
0.031313
0.06223
0.030919
0.061451
0.030533
0.060686
0.030155
0.059936
0.029783
0.059199
0.029418
0.058476
0.02906
0.057766
0.028708
0.057069
0.028363
0.056385
0.028023
0.055712
0.02769
0.055052

Page 7

Simpson

8.54933
8.57467
8.6
8.62533
8.65067
8.676
8.70133
8.72667
8.752
8.77733
8.80267
8.828
8.85333
8.87867
8.904
8.92933
8.95467
8.98
9.00533
9.03067
9.056
9.08133
9.10667
9.132
9.15733
9.18267
9.208
9.23333
9.25867
9.284
9.30933
9.33467
9.36
9.38533
9.41067
9.436
9.46133
9.48667
9.512
9.53733
9.56267
9.588
9.61333
9.63867
9.664
9.68933
9.71467
9.74
9.76533
9.79067
9.816

0.013682
0.013601
0.013521
0.013442
0.013363
0.013285
0.013208
0.013131
0.013055
0.01298
0.012905
0.012831
0.012758
0.012685
0.012613
0.012542
0.012471
0.012401
0.012331
0.012262
0.012193
0.012126
0.012058
0.011991
0.011925
0.011859
0.011794
0.01173
0.011665
0.011602
0.011539
0.011476
0.011414
0.011353
0.011292
0.011231
0.011171
0.011112
0.011052
0.010994
0.010936
0.010878
0.010821
0.010764
0.010707
0.010652
0.010596
0.010541
0.010486
0.010432
0.010378

2
4
2
4
2
4
2
4
2
4
2
4
2
4
2
4
2
4
2
4
2
4
2
4
2
4
2
4
2
4
2
4
2
4
2
4
2
4
2
4
2
4
2
4
2
4
2
4
2
4
2

0.027363
0.054403
0.027042
0.053766
0.026726
0.05314
0.026415
0.052525
0.026111
0.05192
0.025811
0.051326
0.025516
0.050742
0.025227
0.050167
0.024942
0.049603
0.024662
0.049048
0.024387
0.048502
0.024116
0.047965
0.02385
0.047438
0.023588
0.046918
0.023331
0.046408
0.023078
0.045905
0.022829
0.045411
0.022583
0.044925
0.022342
0.044446
0.022105
0.043975
0.021871
0.043511
0.021641
0.043055
0.021415
0.042606
0.021192
0.042164
0.020973
0.041729
0.020757

Page 8

Simpson

9.84133
9.86667
9.892
9.91733
9.94267
9.968
9.99333
10.0187
10.044
10.0693
10.0947
10.12
10.1453
10.1707
10.196
10.2213
10.2467
10.272
10.2973
10.3227
10.348
10.3733
10.3987
10.424
10.4493
10.4747
10.5
10.5253
10.5507
10.576
10.6013
10.6267
10.652
10.6773
10.7027
10.728
10.7533
10.7787
10.804
10.8293
10.8547
10.88
10.9053
10.9307
10.956
10.9813
11.0067
11.032
11.0573
11.0827
11.108

0.010325
0.010272
0.01022
0.010167
0.010116
0.010064
0.010013
0.009963
0.009913
0.009863
0.009813
0.009764
0.009716
0.009667
0.009619
0.009572
0.009524
0.009477
0.009431
0.009385
0.009339
0.009293
0.009248
0.009203
0.009158
0.009114
0.00907
0.009027
0.008983
0.00894
0.008898
0.008855
0.008813
0.008772
0.00873
0.008689
0.008648
0.008607
0.008567
0.008527
0.008487
0.008448
0.008409
0.00837
0.008331
0.008293
0.008254
0.008217
0.008179
0.008142
0.008105

4
2
4
2
4
2
4
2
4
2
4
2
4
2
4
2
4
2
4
2
4
2
4
2
4
2
4
2
4
2
4
2
4
2
4
2
4
2
4
2
4
2
4
2
4
2
4
2
4
2
4

0.0413
0.020544
0.040878
0.020335
0.040463
0.020129
0.040053
0.019926
0.03965
0.019726
0.039253
0.019529
0.038862
0.019334
0.038477
0.019143
0.038097
0.018955
0.037723
0.018769
0.037355
0.018586
0.036992
0.018406
0.036634
0.018228
0.036281
0.018053
0.035934
0.017881
0.035591
0.017711
0.035253
0.017543
0.03492
0.017378
0.034592
0.017215
0.034268
0.017054
0.033949
0.016896
0.033634
0.016739
0.033324
0.016585
0.033018
0.016433
0.032716
0.016283
0.032418

Page 9

Simpson

11.1333
11.1587
11.184
11.2093
11.2347
11.26
11.2853
11.3107
11.336
11.3613
11.3867
11.412
11.4373
11.4627
11.488
11.5133
11.5387
11.564
11.5893
11.6147
11.64
11.6653
11.6907
11.716
11.7413
11.7667
11.792
11.8173
11.8427
11.868
11.8933
11.9187
11.944
11.9693
11.9947
12.02
12.0453
12.0707
12.096
12.1213
12.1467
12.172
12.1973
12.2227
12.248
12.2733
12.2987
12.324
12.3493
12.3747
12.4

0.008068
0.008031
0.007995
0.007959
0.007923
0.007887
0.007852
0.007817
0.007782
0.007747
0.007713
0.007679
0.007645
0.007611
0.007577
0.007544
0.007511
0.007478
0.007445
0.007413
0.007381
0.007349
0.007317
0.007285
0.007254
0.007223
0.007192
0.007161
0.00713
0.0071
0.00707
0.00704
0.00701
0.00698
0.006951
0.006921
0.006892
0.006863
0.006835
0.006806
0.006778
0.00675
0.006722
0.006694
0.006666
0.006639
0.006611
0.006584
0.006557
0.00653
0.006504

2
4
2
4
2
4
2
4
2
4
2
4
2
4
2
4
2
4
2
4
2
4
2
4
2
4
2
4
2
4
2
4
2
4
2
4
2
4
2
4
2
4
2
4
2
4
2
4
2
4
2

0.016135
0.032124
0.01599
0.031835
0.015846
0.031549
0.015704
0.031267
0.015564
0.030989
0.015425
0.030714
0.015289
0.030443
0.015154
0.030176
0.015022
0.029912
0.014891
0.029651
0.014761
0.029394
0.014634
0.029141
0.014508
0.02889
0.014383
0.028643
0.01426
0.028399
0.014139
0.028158
0.014019
0.02792
0.013901
0.027685
0.013785
0.027453
0.013669
0.027224
0.013556
0.026998
0.013443
0.026775
0.013332
0.026554
0.013223
0.026336
0.013114
0.026121
0.013007

Page 10

Simpson

12.4253
12.4507
12.476
12.5013
12.5267
12.552
12.5773
12.6027
12.628
12.6533
12.6787
12.704
12.7293
12.7547
12.78
12.8053
12.8307
12.856
12.8813
12.9067
12.932
12.9573
12.9827
13.008
13.0333
13.0587
13.084
13.1093
13.1347
13.16
13.1853
13.2107
13.236
13.2613
13.2867
13.312
13.3373
13.3627
13.388
13.4133
13.4387
13.464
13.4893
13.5147
13.54
13.5653
13.5907
13.616
13.6413
13.6667
13.692

0.006477
0.006451
0.006425
0.006399
0.006373
0.006347
0.006322
0.006296
0.006271
0.006246
0.006221
0.006196
0.006171
0.006147
0.006123
0.006098
0.006074
0.00605
0.006027
0.006003
0.00598
0.005956
0.005933
0.00591
0.005887
0.005864
0.005841
0.005819
0.005796
0.005774
0.005752
0.00573
0.005708
0.005686
0.005665
0.005643
0.005622
0.0056
0.005579
0.005558
0.005537
0.005516
0.005496
0.005475
0.005455
0.005434
0.005414
0.005394
0.005374
0.005354
0.005334

4
2
4
2
4
2
4
2
4
2
4
2
4
2
4
2
4
2
4
2
4
2
4
2
4
2
4
2
4
2
4
2
4
2
4
2
4
2
4
2
4
2
4
2
4
2
4
2
4
2
4

0.025909
0.012902
0.025699
0.012797
0.025491
0.012694
0.025286
0.012592
0.025084
0.012492
0.024884
0.012392
0.024686
0.012294
0.024491
0.012197
0.024297
0.012101
0.024107
0.012006
0.023918
0.011912
0.023732
0.01182
0.023548
0.011728
0.023366
0.011638
0.023186
0.011548
0.023008
0.01146
0.022832
0.011372
0.022658
0.011286
0.022487
0.011201
0.022317
0.011116
0.022149
0.011033
0.021983
0.01095
0.021818
0.010868
0.021656
0.010788
0.021495
0.010708
0.021337

Page 11

Simpson

13.7173
13.7427
13.768
13.7933
13.8187
13.844
13.8693
13.8947
13.92
13.9453
13.9707
13.996
14.0213
14.0467
14.072
14.0973
14.1227
14.148
14.1733
14.1987
14.224
14.2493
14.2747
14.3
14.3253
14.3507
14.376
14.4013
14.4267
14.452
14.4773
14.5027
14.528
14.5533
14.5787
14.604
14.6293
14.6547
14.68
14.7053
14.7307
14.756
14.7813
14.8067
14.832
14.8573
14.8827
14.908
14.9333
14.9587
14.984

0.005314
0.005295
0.005275
0.005256
0.005237
0.005218
0.005199
0.00518
0.005161
0.005142
0.005123
0.005105
0.005087
0.005068
0.00505
0.005032
0.005014
0.004996
0.004978
0.00496
0.004943
0.004925
0.004908
0.00489
0.004873
0.004856
0.004839
0.004822
0.004805
0.004788
0.004771
0.004754
0.004738
0.004721
0.004705
0.004689
0.004673
0.004656
0.00464
0.004624
0.004608
0.004593
0.004577
0.004561
0.004546
0.00453
0.004515
0.004499
0.004484
0.004469
0.004454

2
4
2
4
2
4
2
4
2
4
2
4
2
4
2
4
2
4
2
4
2
4
2
4
2
4
2
4
2
4
2
4
2
4
2
4
2
4
2
4
2
4
2
4
2
4
2
4
2
4
2

0.010629
0.02118
0.010551
0.021024
0.010474
0.020871
0.010397
0.020719
0.010322
0.020568
0.010247
0.02042
0.010173
0.020273
0.0101
0.020127
0.010028
0.019983
0.009956
0.019841
0.009885
0.0197
0.009815
0.019561
0.009746
0.019423
0.009677
0.019287
0.009609
0.019152
0.009542
0.019018
0.009476
0.018886
0.00941
0.018755
0.009345
0.018626
0.009281
0.018497
0.009217
0.018371
0.009154
0.018245
0.009091
0.018121
0.00903
0.017998
0.008968
0.017876
0.008908

Page 12

Simpson

15.0093
15.0347
15.06
15.0853
15.1107
15.136
15.1613
15.1867
15.212
15.2373
15.2627
15.288
15.3133
15.3387
15.364
15.3893
15.4147
15.44
15.4653
15.4907
15.516
15.5413
15.5667
15.592
15.6173
15.6427
15.668
15.6933
15.7187
15.744
15.7693
15.7947
15.82
15.8453
15.8707
15.896
15.9213
15.9467
15.972
15.9973
16.0227
16.048
16.0733
16.0987
16.124
16.1493
16.1747
16.2
16.2253
16.2507
16.276

0.004439
0.004424
0.004409
0.004394
0.00438
0.004365
0.00435
0.004336
0.004321
0.004307
0.004293
0.004279
0.004264
0.00425
0.004236
0.004222
0.004209
0.004195
0.004181
0.004167
0.004154
0.00414
0.004127
0.004113
0.0041
0.004087
0.004074
0.00406
0.004047
0.004034
0.004021
0.004008
0.003996
0.003983
0.00397
0.003958
0.003945
0.003932
0.00392
0.003908
0.003895
0.003883
0.003871
0.003859
0.003846
0.003834
0.003822
0.00381
0.003799
0.003787
0.003775

4
2
4
2
4
2
4
2
4
2
4
2
4
2
4
2
4
2
4
2
4
2
4
2
4
2
4
2
4
2
4
2
4
2
4
2
4
2
4
2
4
2
4
2
4
2
4
2
4
2
4

0.017756
0.008848
0.017636
0.008789
0.017518
0.00873
0.017401
0.008672
0.017286
0.008614
0.017171
0.008557
0.017058
0.008501
0.016945
0.008445
0.016834
0.008389
0.016724
0.008335
0.016615
0.00828
0.016507
0.008227
0.0164
0.008174
0.016294
0.008121
0.016189
0.008069
0.016085
0.008017
0.015983
0.007966
0.015881
0.007915
0.01578
0.007865
0.01568
0.007815
0.015581
0.007766
0.015483
0.007717
0.015386
0.007669
0.015289
0.007621
0.015194
0.007573
0.0151

Page 13

Simpson

16.3013
16.3267
16.352
16.3773
16.4027
16.428
16.4533
16.4787
16.504
16.5293
16.5547
16.58
16.6053
16.6307
16.656
16.6813
16.7067
16.732
16.7573
16.7827
16.808
16.8333
16.8587
16.884
16.9093
16.9347
16.96
16.9853
17.0107
17.036
17.0613
17.0867
17.112
17.1373
17.1627
17.188
17.2133
17.2387
17.264
17.2893
17.3147
17.34
17.3653
17.3907
17.416
17.4413
17.4667
17.492
17.5173
17.5427
17.568

0.003763
0.003751
0.00374
0.003728
0.003717
0.003705
0.003694
0.003683
0.003671
0.00366
0.003649
0.003638
0.003627
0.003616
0.003605
0.003594
0.003583
0.003572
0.003561
0.00355
0.00354
0.003529
0.003518
0.003508
0.003497
0.003487
0.003477
0.003466
0.003456
0.003446
0.003435
0.003425
0.003415
0.003405
0.003395
0.003385
0.003375
0.003365
0.003355
0.003345
0.003336
0.003326
0.003316
0.003306
0.003297
0.003287
0.003278
0.003268
0.003259
0.003249
0.00324

2
4
2
4
2
4
2
4
2
4
2
4
2
4
2
4
2
4
2
4
2
4
2
4
2
4
2
4
2
4
2
4
2
4
2
4
2
4
2
4
2
4
2
4
2
4
2
4
2
4
2

0.007526
0.015006
0.00748
0.014913
0.007434
0.014821
0.007388
0.01473
0.007343
0.01464
0.007298
0.014551
0.007253
0.014462
0.007209
0.014375
0.007166
0.014288
0.007122
0.014202
0.007079
0.014116
0.007037
0.014032
0.006995
0.013948
0.006953
0.013865
0.006912
0.013782
0.006871
0.013701
0.00683
0.01362
0.00679
0.01354
0.00675
0.01346
0.00671
0.013381
0.006671
0.013303
0.006632
0.013226
0.006594
0.013149
0.006556
0.013073
0.006518
0.012998
0.00648

Page 14

Simpson

17.5933
17.6187
17.644
17.6693
17.6947
17.72
17.7453
17.7707
17.796
17.8213
17.8467
17.872
17.8973
17.9227
17.948
17.9733
17.9987
18.024
18.0493
18.0747
18.1
18.1253
18.1507
18.176
18.2013
18.2267
18.252
18.2773
18.3027
18.328
18.3533
18.3787
18.404
18.4293
18.4547
18.48
18.5053
18.5307
18.556
18.5813
18.6067
18.632
18.6573
18.6827
18.708
18.7333
18.7587
18.784
18.8093
18.8347
18.86

0.003231
0.003221
0.003212
0.003203
0.003194
0.003185
0.003176
0.003167
0.003158
0.003149
0.00314
0.003131
0.003122
0.003113
0.003104
0.003096
0.003087
0.003078
0.00307
0.003061
0.003052
0.003044
0.003035
0.003027
0.003019
0.00301
0.003002
0.002993
0.002985
0.002977
0.002969
0.002961
0.002952
0.002944
0.002936
0.002928
0.00292
0.002912
0.002904
0.002896
0.002888
0.002881
0.002873
0.002865
0.002857
0.00285
0.002842
0.002834
0.002827
0.002819
0.002811

4
2
4
2
4
2
4
2
4
2
4
2
4
2
4
2
4
2
4
2
4
2
4
2
4
2
4
2
4
2
4
2
4
2
4
2
4
2
4
2
4
2
4
2
4
2
4
2
4
2
4

0.012923
0.006443
0.012849
0.006406
0.012775
0.006369
0.012703
0.006333
0.01263
0.006297
0.012559
0.006262
0.012488
0.006226
0.012417
0.006191
0.012348
0.006156
0.012278
0.006122
0.01221
0.006088
0.012142
0.006054
0.012074
0.00602
0.012007
0.005987
0.011941
0.005954
0.011875
0.005921
0.01181
0.005889
0.011745
0.005856
0.011681
0.005824
0.011617
0.005793
0.011554
0.005761
0.011491
0.00573
0.011429
0.005699
0.011367
0.005668
0.011306
0.005638
0.011245

Page 15

Simpson

18.8853
18.9107
18.936
18.9613
18.9867
19.012
19.0373
19.0627
19.088
19.1133
19.1387
19.164
19.1893
19.2147
19.24
19.2653
19.2907
19.316
19.3413
19.3667
19.392
19.4173
19.4427
19.468
19.4933
19.5187
19.544
19.5693
19.5947
19.62
19.6453
19.6707
19.696
19.7213
19.7467
19.772
19.7973
19.8227
19.848
19.8733
19.8987
19.924
19.9493
19.9747

0.002804
0.002796
0.002789
0.002781
0.002774
0.002767
0.002759
0.002752
0.002745
0.002737
0.00273
0.002723
0.002716
0.002709
0.002701
0.002694
0.002687
0.00268
0.002673
0.002666
0.002659
0.002652
0.002645
0.002639
0.002632
0.002625
0.002618
0.002611
0.002604
0.002598
0.002591
0.002584
0.002578
0.002571
0.002565
0.002558
0.002551
0.002545
0.002538
0.002532
0.002526
0.002519
0.002513
0.002506

2
4
2
4
2
4
2
4
2
4
2
4
2
4
2
4
2
4
2
4
2
4
2
4
2
4
2
4
2
4
2
4
2
4
2
4
2
4
2
4
2
4
2
4

0.005608
0.011185
0.005578
0.011126
0.005548
0.011066
0.005518
0.011008
0.005489
0.010949
0.00546
0.010891
0.005431
0.010834
0.005403
0.010777
0.005374
0.010721
0.005346
0.010665
0.005318
0.010609
0.005291
0.010554
0.005263
0.010499
0.005236
0.010445
0.005209
0.010391
0.005182
0.010338
0.005156
0.010285
0.005129
0.010232
0.005103
0.01018
0.005077
0.010128
0.005051
0.010076
0.005025
0.010025

Page 16

Simpson

the top table.


la in B8 using the integration variable x.

s, "Applied Numerical Methods", Wiley, New York, 1969.


mber of evenly spaced points.
quired and weighs the contribution of

of an analytical function,
formation in rows 3-5, then
es in the f(x) column.
mula" button.
ally be displayed.

Page 17

Runge Kutta Integration


The spreadsheet RungeKutta applies 4th order Runge-Kutta Integration for up to 5 simultaneous equations.
The dependent variables are y1, y2, y3, y4, y5, the independent variable is t.
Adapted using notation and methods described in
B. Carnahan, H. Luther, J. Wilkes, "Applied Numerical Methods", Wiley, New York, 1969.
The equations are of the form:

As distributed the following set of equations is programmed

dy1/dt = f1(t,y1, y2, y3, y4, y5)

dy1/dt = -k1*y2*sqr(y1) - k2*y3*sqr(y1)

dy2/dt = f2(t,y1, y2, y3, y4, y5)

dy2/dt = -k1*y2*sqr(y1)

dy3/dt = f3(t,y1, y2, y3, y4, y5)

dy3/dt = k1*y2*sqr(y1) - k2*y3*sqr(y1)

dy4/dt = f4(t,y1, y2, y3, y4, y5)

where k1 = 55.5, k2 = 30.2

dy5/dt = f5(t,y1, y2, y3, y4, y5)


To change the equations, the subroutine
FuncList is edited.
Tools..MacroVisual Basic Editor.
If you do not see the subroutine FuncList,
select FuncList in the rightmost dropdown box .
Edit the formulas.
In the Visual Basic Window, choose File..Close.
Move to the Sheet RungeKutta, and use the Buttons.

As distributed, the Sub FuncList looks like this:


Sub FuncList(t, y1, y2, y3, y4, y5, f)
' Equations are of the form:
' dy1/dt = f(1); dy2/dt = f(2); dy3/dt = f(3)
' dy4/dt = f(4); dy5/dt = f(5)
' where f(1) - f(5) are functions of y1 - y5.
' Additional statements can be added to define constants if desired.
' Edit the following statements. Set f(1) to f(5) equal to zero
' if unused -- do not delete them.
k1 = 55.2
k2 = 30.2
r1 = -k1 * y2 * y1 ^ 0.5
r2 = -k2 * y3 * y1 ^ 0.5
f(1) = r1 + r2
f(2) = r1
f(3) = -r1 + r2
f(4) = 0
f(5) = 0
End Sub

neous equations.

equations is programmed

ooks like this:

dded to define constants if desired.


et f(1) to f(5) equal to zero

4th Order Runga-Kutta Integration for up to 5 simultaneous equations


See the "Instructions" worksheet before using. DO NOT ADD OR DELETE ROWS above Row10.
Use the "Clear Old Calcs" button to remove the old table. Insert new initial values in row 10.
Only the first 1000 rows are cleared and plotted automatically. Edit the plot range & ClearOldCalcs macro for N>1000.
Num of Steps < 1000
100
Last t
0.5
t Step Size (calc'd)
0.005
t

y1
0
0.005
0.01
0.015
0.02
0.025
0.03
0.035
0.04
0.045
0.05
0.055
0.06
0.065
0.07
0.075
0.08
0.085
0.09
0.095
0.1
0.105
0.11
0.115
0.12
0.125
0.13
0.135
0.14
0.145
0.15
0.155
0.16
0.165
0.17
0.175
0.18
0.185
0.19
0.195
0.2
0.205
0.21

0.021
0.020586
0.020183
0.019791
0.01941
0.01904
0.018679
0.018328
0.017986
0.017653
0.017329
0.017013
0.016705
0.016406
0.016114
0.015829
0.015551
0.015281
0.015017
0.01476
0.014508
0.014264
0.014024
0.013791
0.013563
0.013341
0.013124
0.012912
0.012705
0.012502
0.012304
0.012111
0.011922
0.011738
0.011557
0.011381
0.011208
0.011039
0.010874
0.010712
0.010554
0.0104
0.010248

y2
0.0105
0.01009
0.0097
0.009329
0.008976
0.008639
0.008317
0.008011
0.007718
0.007439
0.007173
0.006918
0.006674
0.006441
0.006219
0.006006
0.005801
0.005606
0.005419
0.005239
0.005067
0.004902
0.004744
0.004592
0.004446
0.004306
0.004172
0.004042
0.003918
0.003798
0.003683
0.003573
0.003466
0.003364
0.003265
0.00317
0.003078
0.00299
0.002905
0.002823
0.002744
0.002667
0.002593

y3
0
0.000405
0.000782
0.001133
0.001459
0.001762
0.002044
0.002306
0.002549
0.002774
0.002984
0.003177
0.003357
0.003523
0.003676
0.003818
0.003949
0.004069
0.004179
0.004281
0.004374
0.004459
0.004536
0.004607
0.004671
0.004729
0.004781
0.004827
0.004869
0.004905
0.004937
0.004965
0.00499
0.00501
0.005027
0.005041
0.005051
0.005059
0.005064
0.005067
0.005067
0.005065
0.005061

y4

y5
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0

0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0

0.215
0.22
0.225
0.23
0.235
0.24
0.245
0.25
0.255
0.26
0.265
0.27
0.275
0.28
0.285
0.29
0.295
0.3
0.305
0.31
0.315
0.32
0.325
0.33
0.335
0.34
0.345
0.35
0.355
0.36
0.365
0.37
0.375
0.38
0.385
0.39
0.395
0.4
0.405
0.41
0.415
0.42
0.425
0.43
0.435
0.44
0.445
0.45
0.455
0.46
0.465
0.47

0.0101
0.009955
0.009813
0.009674
0.009537
0.009404
0.009273
0.009145
0.009019
0.008896
0.008775
0.008657
0.008541
0.008428
0.008316
0.008207
0.0081
0.007994
0.007891
0.00779
0.007691
0.007593
0.007497
0.007404
0.007311
0.007221
0.007132
0.007045
0.006959
0.006875
0.006792
0.006711
0.006631
0.006552
0.006475
0.0064
0.006325
0.006252
0.00618
0.006109
0.00604
0.005971
0.005904
0.005838
0.005773
0.005709
0.005646
0.005584
0.005523
0.005463
0.005404
0.005346

0.002522
0.002453
0.002387
0.002323
0.002261
0.002201
0.002143
0.002087
0.002033
0.00198
0.00193
0.001881
0.001833
0.001787
0.001743
0.001699
0.001658
0.001617
0.001578
0.00154
0.001503
0.001467
0.001432
0.001398
0.001366
0.001334
0.001303
0.001273
0.001244
0.001216
0.001188
0.001162
0.001136
0.001111
0.001086
0.001062
0.001039
0.001017
0.000995
0.000974
0.000953
0.000933
0.000913
0.000894
0.000875
0.000857
0.00084
0.000822
0.000806
0.000789
0.000774
0.000758

0.005055
0.005048
0.005039
0.005028
0.005015
0.005002
0.004987
0.004971
0.004953
0.004935
0.004916
0.004896
0.004875
0.004853
0.004831
0.004808
0.004784
0.00476
0.004736
0.004711
0.004685
0.004659
0.004633
0.004607
0.00458
0.004553
0.004526
0.004498
0.004471
0.004443
0.004415
0.004387
0.004359
0.004331
0.004303
0.004275
0.004246
0.004218
0.00419
0.004162
0.004134
0.004106
0.004078
0.00405
0.004022
0.003994
0.003967
0.003939
0.003912
0.003884
0.003857
0.00383

0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0

0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0

0.475
0.48
0.485
0.49
0.495
0.5

0.005289
0.005233
0.005178
0.005123
0.005069
0.005017

0.000743
0.000728
0.000714
0.0007
0.000686
0.000673

0.003803
0.003776
0.00375
0.003723
0.003697
0.003671

0
0
0
0
0
0

0
0
0
0
0
0

macro for N>1000.

0.025
y1
y2

0.02

y3
y4
y5

y1 - y5

0.015

0.01

0.005

0
0

0.1

0.2

0.3
t

0.4

0.5

0.6

Das könnte Ihnen auch gefallen