Professional Documents
Culture Documents
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
Where,
LB =
UB =
X=
n=
h=
i=
0.00
2.4
12
0.2
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.
Change Function
Integrate Function
Results
area under curve =
10.008
by VBA program
Example Sheet
This sheet shows a demonstration example calculated out using only the spreadsheet
x
0
1
2
3
4
5
6
7
8
9
10
11
12
f(x)
0
0.2
0.4
0.6
0.8
1
1.2
1.4
1.6
1.8
2
2.2
2.4
Trapazoidal
Rule
-0.15
0.29
0.81
1.41
2.09
2.85
3.69
4.61
5.61
6.69
7.85
9.09
10.41
area=
compares to an analytic solution of:
0.014
0.11
0.222
0.35
0.494
0.654
0.83
1.022
1.23
1.454
1.694
1.95
10.0240
Simpson Simpson
3 pt.
4 pt
0.121333
0.342
0.569333
1.145333
1.494
1.849333
3.078
2.681333
3.641333
5.094
10.0080
10.0080
10.0080