| 
| Integrates a function (a polynomial), y,
numerically, by the trapezium rule (trapezoidal rule)
and others mentioned, with result, Z. 
(The data h∨n may be¹ altered by the program
to coherent and limited values.) The rules below are used for comparison,
and a graph of the progressing integral is made. The general formula used is  Z = k h
∑j cj
 y(xlow + j h), 
j = 0..n,  with h = (xupp
− xlow) ⁄n, 
and coefficients k and c given by:
 
The coefficients in square brackets, [...], are repeated as necessary.| Rule: | k | c | n |  | Trapezium rule | ½ | 1 [2] 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 |  Also suggested: xlow = 293.15,
xupp = 323.15, A = (7.629 3.431-4 5.809-6 -2.810-9),
for CP of water (cal/g_mol-K) of T (kelvin)
[Reid et al., 1977: 226, 631].
 ¹ The symbol ∨ is considered always as the
"inclusive or", and so should it also be in the common language [SEP, 2008],
"and/or" (used in Law) being a barbarism. Logical symbols for "exclusive or"
may be ∨ with a dot over or ↔ crossed by /.
 |  | 
| • 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, p 2-66 (2008). • Weisstein, Eric W., "Weddle's rule". From
MathWorld — A Wolfram Web Resource. • Mathews, John H.: Modules
for Numerical Analysis (California State Univ., Fullerton). • May, Daniel J. R.,
 "Trapezoidal rule" at Metric Maths
(Imperial College London).
Explore... (then launch the applet). • British Eng. "trapezium" (Cambridge Dictionaries Online);
Amer. Eng. "trapezoid" (Merriam-Webster Dictionary). So,
"trapezium rule" / "trapezoidal rule" / (Pt) "regra dos trapézios"
(Infopédia). • Sedgewick and Wayne: "Numeric integration",
from "Intro. to programming in Java: an interdisciplinary approach".
Computer Science, Princeton
Univ.. • "Rosetta Code", Fortran 90+: Euclide algorithm
recursive, iterative. • Burkardt, John, "algorithms",
Florida State Univ.. • SEP: disjunction
(Stanford Encyclopedia of Philosophy)
(accessed 2008-Oct-14). • Reid, Robert C.,
John M. Prausnitz and Thomas K.
Sherwood, 1977,
"The properties of gases and liquids", 3rd ed., McGraw-Hill,
New York, NY (USA), ISBN 0-07-051790-8 (1987, 4.th ed.). • 1910-08-28: Koopman, Tjalling Charles birthday. |