Download presentation
Presentation is loading. Please wait.
Published byMarjory Wilkinson Modified over 9 years ago
1
1 Chapter 7 NUMERICAL INTEGRATION
2
2 PRELIMINARIES We use numerical integration when the function f(x) may not be integrable in closed form or even in case of closed form integrable functions the integrand may be complicated or the function is known only at a finite number of points. Basic Idea The function f(x) is being approximated by a polynomial using interpolation which can be easily integrated.
3
3 Numerical Integration Geometrically represents the area formed by the curve y = f(x) and x – axis between the ordinates x = a and x = b. Let the interval [a, b] be subdivided into sub intervals each of length h. Then x i = x 0 + ih, i = 1, 2, …, n, x 0 = a and h = Let y i = f(x i ),i = 1, 2, …, n.
4
4 Integrating the Newton forward interpolation polynomial of degree < n, we get h NEWTON-COTES GENERAL INTEGRATION FORMULA
5
5 Special Case - I For n = 1: Trapezoidal Rule x0x0 h x1x1 p E Q y = f(x) y0y0 y1y1 M GN F
6
6 General Form of Trapezoidal rule = [ y 0 + y n + 2(y 0 +y 1 + L + y n-1 ) ]
7
7 Special Case - II For n = 2: Simpson’s 1/3 Rule Assume n to be an even integer. = [ (y 0 + y n ) + 4 (y 1 + y 3 + L + y n-1 ) + 2 (y 2 + y 4 + L + y n-2 )] [(sum of end ordinates) + 4 ( sum of odd ordinates) + 2 (sum of even ordinates) ] =
8
8 Special Case - III For n = 3 : Simpson’s 3/8 th Rule Assume n to be a multiple of 3. = [(y 0 + y n ) + 3 (y 1 + y 2 + y 4 + y 5 + L + y n-2 + y n-1 ) + 2 (y 3 + y 6 + L + y n-3 )]
9
9 Example Evaluate using (a) Trapazoidel rule (b) Simpson’s rule and (c) Simpson’s rule and compare the values. Divide the range into 6 sub intervals.
10
10 Solution Trapezoidal rule = 0.6949 Simpsons 1/3 rd rule = 0.6932 Simpsons 3/8 th rule = 0.6932 Exact Value = 0.6931
11
11 GAUSSIAN QUADRATURE In Gaussian quadrature sampling points and the weights have been optimized. In Newton-Cotes formulae we choose (n+1) equally spaced points x i in the interval of integration. These formulae gives exact values if the integrand is a polynomial of degree < n. Gauss showed that by choosing the (n+1) points suitably, the formula can be made exact when the integrand is a polynomial of degree < (2n+1).
12
12 Using the linear transformation, x = t + the integral can be transformed into
13
13 GAUSSIAN QUADRATURE FORMULA One Point = 2 f(0) Two Points = + Three Points = f(0) +
14
14 Example Evaluate by Gaussian quadrature formula with one point, two points and three points.
15
15 Solution Put x = dx = One point:0.6667 Two points:0.6923 Three points:0.693122 Exact value:0.693147
Similar presentations
© 2025 SlidePlayer.com. Inc.
All rights reserved.