0% found this document useful (0 votes)
212 views

Newton-Cotes Integration Formula: Harjadi Gunawan

1. The document discusses numerical integration methods called Newton-Cotes formulas, which approximate integrals using polynomial interpolation. 2. The Newton-Cotes formulas include the trapezoidal rule (linear), Simpson's 1/3 rule (quadratic), and Simpson's 3/8 rule (cubic). They replace the integrated function with a polynomial that is easy to integrate over each interval. 3. The accuracy can be improved by dividing the interval into multiple segments and applying the formulas to each, then summing the results. This reduces the truncation error compared to using a single segment.

Uploaded by

Kukuh Kurniadi
Copyright
© © All Rights Reserved
Available Formats
Download as PPTX, PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
212 views

Newton-Cotes Integration Formula: Harjadi Gunawan

1. The document discusses numerical integration methods called Newton-Cotes formulas, which approximate integrals using polynomial interpolation. 2. The Newton-Cotes formulas include the trapezoidal rule (linear), Simpson's 1/3 rule (quadratic), and Simpson's 3/8 rule (cubic). They replace the integrated function with a polynomial that is easy to integrate over each interval. 3. The accuracy can be improved by dividing the interval into multiple segments and applying the formulas to each, then summing the results. This reduces the truncation error compared to using a single segment.

Uploaded by

Kukuh Kurniadi
Copyright
© © All Rights Reserved
Available Formats
Download as PPTX, PDF, TXT or read online on Scribd
You are on page 1/ 31

Newton-Cotes Integration Formula

Harjadi Gunawan
What is Integration?
• Integrate means “to bring together”, as parts,
into a whole; to indicate total amount.
b
I   f ( x ).dx
a

• The above stands for integral of function f(x)


with respect to the independent variable x
between the limits x = a to x = b.
What is Integration?
• Graphically integration is simply to find the
area under a certain curve between the 2
integration limits.

b
I   f ( x ).dx  A
a
Newton-Cotes integration Formulas
Introduction
• The Newton-Cotes formulas are the most common
numerical integration methods.
• They are based on the strategy of replacing a
complicated function with an approximating function
that is easy to integrate.
b b
I   f ( x)dx   f n ( x)dx
a a

f n ( x)  a0  a1 x    an 1 x n 1  an x n
 fn (x) can be linear
 fn (x) can be quadratic
 fn (x) can also be cubic or other
higher-order polynomials
 Polynomial can be piecewise over the
data
Numerical Integration
 Newton-Cotes Closed Formulae -- Use
both end points
 Trapezoidal Rule : Linear
 Simpson’s 1/3-Rule : Quadratic
 Simpson’s 3/8-Rule : Cubic
 Newton-Cotes Open Formulae -- Use only
interior points
 midpoint rule
 Higher-order methods
Closed and Open Formulae

(a) End points are known (b) Extrapolation


1. Trapezoidal Rule
The trapezoidal rule uses a polynomial of the first degree to
replace the function to be integrated.

f (a)  f (b)
I  (b  a)
2
Error of the Trapezoidal Rule
When we employ the integral under a straight line
segment to approximate the integral under a curve,
error may be:

1
Et   
f ( )(b  a ) 3

12

Where  lies somewhere in the interval from a to b.


Trapezoidal Rule
Example 21.1
Multiple Trapezoidal Rule
• One way to improve the accuracy of the
trapezoidal rule is to divide the integration
interval from a to b into a number of segments
and apply the method to each segment.

• The areas of individual segments can then be


added to yield the integral for the entire
interval.
Multiple Trapezoidal Rule
Multiple Trapezoidal Rule
ba
h a  x0 b  xn
n
x1 x2 xn

I  f ( x)dx   f ( x)dx     f ( x)dx


x0 x1 xn1

Substitute into the integrals for f(x) by f1(x) in


each segment and integrate:
f ( x0 )  f ( x1 ) f ( x1 )  f ( x2 ) f ( xn 1 )  f ( xn )
I h h  h
2 2 2
h n 1

I   f ( x0 )  2 f ( xi )  f ( xn )
2 i 1 
h n 1

I   f ( x0 )  2 f ( xi )  f ( xn ) 
2 i 1 
Multiple Trapezoidal Rule
An error for multiple-application trapezoidal
rule can be obtained by summing the
individual errors for each segment:
 f (i)  nf 
(b  a) 3
Ea   2
f 
12n
b
Where
 (x).dx
( n)
f
( n)
f  a

ba
Simpson’s Rules

More accurate estimate of an integral is obtained


if a high-order polynomial is used to connect the
points. The formulas that result from taking the
integrals under such polynomials are called
Simpson’s Rules.
Simpson’s Rules
• Simpson’s 1/3 Rule
Results when a second-order interpolating
polynomial is used.

• Simpson’s 3/8 Rule


Results when a third-order (cubic) interpolating
polynomial is used.
Simpson’s Rules

Simpson’s 1/3 Rule Simpson’s 3/8 Rule


Simpson’s 1/3 Rule
b b
I   f ( x)dx   f 2 ( x)dx
a a

a  x0 b  x2
x2
 ( x  x1 )( x  x2 ) ( x  x0 )( x  x2 ) ( x  x0 )( x  x1 ) 
I   f ( x0 )  f ( x1 )  f ( x2 )dx
x0 
( x0  x1 )( x0  x2 ) ( x1  x0 )( x1  x2 ) ( x2  x0 )( x2  x1 ) 

h ba
I  f ( x0 )  4 f ( x1 )  f ( x2 ) h
3 2

Simpson’s 1/3 Rule


Simpson’s 1/3 Rule
• Single segment application of Simpson’s 1/3 rule has a
truncation error of:
(b  a )5 ( 4)
Et   f ( ) a  b
2880
(b  a )5 ( 4)
Ea   f ( x)
2880
• Simpson’s 1/3 rule is more accurate than trapezoidal rule.
The Multiple-Application Simpson’s
1/3 Rule
• Just as the trapezoidal rule, Simpson’s rule can
be improved by dividing the integration interval
into a number of segments of equal width.

f ( xo )  4 f ( x1 )  f ( x2 ) f ( x2 )  4 f ( x3 )  f ( x4 )
I  2h  2h
6 6
f ( xn  2 )  4 f ( xn  1 )  f ( xn ) ba
..........  2h with h 
6 n
 n 1 n2 
 f ( xo )  f ( xn )  4  f ( xi )  2  f ( x j ) 
 (b  a )  
i 1, 3, 5 j  2 , 4 ,6

3n
(b  a) 5 ( 4 )
Ea   4
f
180n
The Multiple-Application Simpson’s 1/3 Rule
Simpson’s 3/8 Rule
If there are 2 extra points between the integration
limits a and b, then a 3rd degree polynomial can be
used instead of the parabola to replace the function to
be integrated:
b b
I   f ( x)dx   f 3 ( x)dx
a a

3h (b  a )
I   f ( x0 )  3 f ( x1 )  3 f ( x2 )  f ( x3 ) , h 
8 3
(b  a)5 ( 4 )
Et   f ( ) Simpson’s 3/8 Rule
6480
Newton Cotes Integration-Example
Find the integral of:
f(x) = 0.2 +25 x – 200 x 2 + 675 x 3 – 900 x 4 + 400 x 5
Between the limits 0 to 0.8, f(0) = 0.2, f(0.8) = 0.232,
Iexact=1.640533
1. The trapezoidal rule (ans. 0.1728)
f (a )  f (b) 0.2  0.232
I  (b  a)  I  (0.8  0)  0.1728
2 2
Et  1.640533  0.1728  1.467733   t  89.5%
f '' ( x)  400  4050x  10,800x 2  8000x 3
0.8

f ''
( x) 

0
(400  4050x  10,800x 2  8000x 3 ) dx
 60
0.8  0
1
Ea   (60)(0.8) 3  2.56
12
Newton Cotes Integration-Example
2. Multiple trapezoidal rule (n=4) (ans. 1.4848)
f(0)=0.2, f(0.2)=1.288, f(0.4)=2.456, f(0.6)=3.464 ,f(0.8)=0.232

(b  a ) (0.8  0)
h   0.2
4 4

h n 1

I   f ( x0 )  2 f ( xi )  f ( xn )
2 i 1 
0.2
  0.2  2(1.288  2.456  3.464)  0.232  1.4848
2
0.83
Ea   2
(60)  0.16
12(4)
Newton Cotes Integration-Example
3. The Simpson 1/3 rule (ans. 1.367467)
f(0) = 0.2, f(0.4) = 0.2.456, f(0.8) = 0.232
b  a 0.8  0
h   0.4
2 2
h
I   f ( x0 )  4 f ( x1 )  f ( x2 )
3
0.4
  0.2  4  2.456  0.232  1.367467
3
Et  1.640533  1.367467  0.2730667   t  16.6%
f ( 4) ( x)  2400

(b  a ) 5 ( 4) (0.8  0) 5
Ea   f  (2400)  0.2730667
2880 2880
Newton Cotes Integration-Example
4. Multiple application of Simpson 1/3 rule (n=4)
(ans. 1.623467).
f(0)=0.2, f(0.2)=1.288, f(0.4)=2.456, f(0.6)=3.464 ,f(0.8)=0.232
(b  a ) (0.8  0)
h   0.2
4 4
h n 1 n2

I   f ( x0 )  4  f ( xi )  2  f ( xi )  f ( xn )
3 i 1, 3, 5 i  2 , 4 .6 
0.2
  0.2  4(1.288  3.464)  2(2.456)  0.232  1.623467
3
Et  1.640533  1.623467  0.017067   t  1.04%
(b  a )5 ( 4 ) 0.85
Ea   4
f ( )   4
(2400)  0.017067
180n 180(4)
Newton Cotes Integration-Example
5. The Simpson 3/8 rule (ans. 1.519170)
f(0)=0.2, f(0.2667)=1.432724, f(0.5333)=3.487177, f(0.8)=0.232
(b  a ) (0.8  0)
h   0.2667
3 3
3h
I  I   f ( x0 )  3 f ( x1 )  3 f ( x2 )  f ( x3 )
8
0 .8
  0.2  3 1.432724  3  3.487177  0.232  1.519170
8
Et  1.640533  1.51917  0.121363   t  7.4%

(b  a)5 ( 4) 0.85
Ea   f ( )   (2400)  0.1213630
6480 6480

You might also like