This spreadsheet has a general program for numerical integration by Simpson's 3-point rule. The
user inputs the upper bounds, the lower bounds and number of intervals. A greater interval number
increases the accuracy. The spreadsheet also has an example calculated with just a spreadsheet
calculation to demonstrate what the program is doing. The general formula for Simpsons rule is:
UB
n
∫ f ( x )⋅dx=∑i=2,4,6 . .. (h/3)⋅( x i−2+ 4⋅x i−1+x i )
LB
Where,
This sheet uses a general purpose macro for Simpsons Rule 3-pt. Integration
Input
Example: f(x) = X2+2X-0.15
lower bounds = 0.00 input values in the yellow-shaded cells
Upper bounds = 2.4
number of increments= 12
h= 0.2 calculated step size
Calculation
The "change function" button takes you to the location in the macro to change the function.
Close window when complete. The "integrate function" button actives the integration program.
Results
This sheet shows a demonstration example calculated out using only the spreadsheet
100
0
1 2
90.5 90.5 90.5 90.5 90.5 90.5 90.5
A-A 8.6675 0.098 -5.7995 -4.335 -0.0995 4.8105 8.571
B-B 7.705 -1.199 -6.932 -8.483 -5.0615 0.007 7.5905
C-C 6.9895 -1.9785 -7.24 -9.4485 -6.514 -1.205 6.079
D-D 11.4915 2.359 -3.8535 -6.9965 -6.156 -1.6535 5.29
-7.2965
100
EGL A-A
80
60 B-B C-C
40
D-D E-E
20
D
D-
0
B -B
1 2 L
3 4 5 EG
6 7