|
Numerical
integration
Integrates numerically a function by the trapezoidal,
Simpson's and Weddle's rules. |
|
|
xlow |
|
Lower limit of integration. |
xupp |
|
Upper limit of integration. |
h |
|
Integration interval or increment (supplied as .001, 1.E-3,
1.-3, etc.). |
(The data may be altered by the program
to limited, reasonable values.)
Calculates approximations, I, to the integral of the
following the test function
y = x^4 + a(3) x^3 +
a(2) x^2 + a(1) x
with a(3) = −[a(1) + a(2)].
The trapezoidal, Simpson's and Weddle's rules are used
for comparison. The formulas are:
I = k h Σ
ci y(a + i h)
The summation is for i = 0..n, with
h = (b − a)⁄n.
The coefficients k and c (main intent of this plate)
for each method are:
Method: |
k | c |
n |
Trapezoidal rule | 1 |
½ [1] ½ | Any |
Simpson's rule | 1⁄3 |
1 4 [2 4] 1 | Even |
Weddle's rule | 3⁄10 |
1 5 1 6 1 5 [2 5 1 6 1 5] 1 |
Multiple of 6 |
The coefficients in square brackets, [...], are repeated as necessary. |
|
| References: |
Plate: Numint02829 |
• Perry, R. H., and D. W. Green, 1984 (1934),
"Perry's Chemical Engineers' Handbook", 6th ed., McGraw-Hill,
New York, NY (USA), ISBN 0-07-049479-7 (2008). |