©
Numerical integration
  Integrates a function numerically by the trapezium (trapezoidal) rule and others.
2024.Jul.03 12:37:16
xlow, xupp Lower and upper limits (range) of integration. •
m, A
Degree and coefficients of polynomial to be integrated, y = ∑i ai xi, i = 0..m. •
h or n Integration step (supplied as .001, 1.E-4, 1.-5, etc.) or number of steps. (Too small h → largest n.) •
npg 2 100 200 1000 "U" Number of points in the graph, user-given if "U". •
Show values ? Shows the coordinates of the graph. •
  Integrates a function (a polynomial), y, numerically, by the trapezium rule (trapezoidal rule) and others mentioned, with result, Z.  (The data hn 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 hj cj y(xlow + j h),  j = 0..n,  with h = (xuppxlow) ⁄n,  and coefficients k and c given by:
Rule: k c n
Trapezium rule½ 1 [2] 1Any
Simpson's rule 1⁄3 1 4 [2 4] 1Even
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.
  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 /.
References: Plate: Numint02828

• 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.

 
 
Valid HTML 4.01! IST http://web.tecnico.ulisboa.pt/~mcasquilho/compute/MIT_utaustin/Fx-NumInt.php
Created: 2002-08-28 — Last modified: 2008-10-16