2Integration Indefinite Integrals Definite Integrals Indefinite Integrals of a function are functions that differ from each other by a constant.Definite IntegralsDefinite Integrals are numbers.
3Why Numerical Integration? Very often, the function f(x) to differentiate or the integrand to integrate is too complex to derive exact analytical solutions.In most cases in engineering, the function f(x) is only available in a tabulated form with values known only at discrete points.Numerical Solution
4Numerical Integration The general form of numerical integration of a function f (x) over some interval [a, b] is a weighted sum of the function values at a finite number (n) of sample points (nodes), referred to as ‘quadrature’:
5One interpretation of the definite integral is Integral = area under the curvef(x)ab
6Newton-Cotes Integration Common numerical integration schemeBased on the strategy of replacing a complicated function or tabulated data with some approximating function that is easy to integratePn(x) is an nth orderpolynomial
7Trapezoidal RuleCorresponds to the case where the polynomial is a first orderF(b)hF(a)
8From the trapezoidal rule we can obtain for the total area of (n-1) intervals where there are n equally spaced base points.
14Remark 1: in this example instead of re-computation of some function values when h is changed to h/2 we observe that
15Simpson’s RulesSimpson’s 1/3 rule can be obtained by passing a parabolic interpolant through three adjacent nodes.The area under the parabola is
161 4 2 f(x1), f(xn) f(x2), f(x4), f(x6),.. f(x3), f(x5), f(x7),.. To obtain the total area of (n-1) even intervals we apply the following general Simpson’s 1/3 ruleNote:f(x1), f(xn)1f(x2), f(x4), f(x6),..4f(x3), f(x5), f(x7),..2
17Remark 2: Simpson’s 1/3 rule requires the number of intervals to be even. If this condition is not satisfied, we can integrate over the first (or last) three intervals with Simpson’s 3/8 rule which can be obtained by passing a cubic interpolant through four adjacent nodes, and defined byThe error in the Simpson’s rule is
18Simpson’s 3/8 ruleSimpson’s 1/3 ruleBecause the number of panels is odd, we compute the integral over the first three intervals by Simpson’s 3/8 rule, and use the 1/3 rule for the last two intervals: