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

Lecture 28

The document discusses numerical differentiation and integration methods, specifically focusing on Simpson's 1/3 and 3/8 rules, as well as Boole's rule for estimating integrals. It includes problems that apply these methods to a specific polynomial function and provides examples of integration with unequal segments. Additionally, it touches on multiple integrals and their applications in engineering, particularly in thermodynamic processes.
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PPT, PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
3 views

Lecture 28

The document discusses numerical differentiation and integration methods, specifically focusing on Simpson's 1/3 and 3/8 rules, as well as Boole's rule for estimating integrals. It includes problems that apply these methods to a specific polynomial function and provides examples of integration with unequal segments. Additionally, it touches on multiple integrals and their applications in engineering, particularly in thermodynamic processes.
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PPT, PDF, TXT or read online on Scribd
You are on page 1/ 26

Numerical Differentiation and

Integration

Numerical Methods of Chemical Engineers


CHE F242

Copyright © 2006 The McGraw-Hill Companies, Inc. Permission required for reproduction or display.
Simpson’s 3/8 Rule
Simpson’s 1/3 and 3/8 rules can be
Fit a 3rd order Lagrange interpolating applied in combination to handle
polynomial to four points and integrate multiple applications with odd
number of intervals

b b
I f ( x)dx f 3 ( x)dx
a a

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

f ( x0 )  3 f ( x1 )  3 f ( x2 )  f ( x3 )
I (b  a )
8

Copyright © 2006 The McGraw-Hill Companies, Inc. Permission required for reproduction or display.
Simpson’s 3/8 Rule
Simpson’s 1/3 and 3/8 rules can be
Fit a 3rd order Lagrange interpolating applied in combination to handle
polynomial to four points and integrate multiple applications with odd
number of intervals

b b
I f ( x)dx f 3 ( x)dx
a a

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

f ( x0 )  3 f ( x1 )  3 f ( x2 )  f ( x3 )
I (b  a )
8

Copyright © 2006 The McGraw-Hill Companies, Inc. Permission required for reproduction or display.
Problem
Use Simpson’s 3/8th Rule to estimate the integral of
f(x) = 0.2 +25x – 200x2 + 675x3 – 900x4 + 400x5
Integrate f(x) from a=0 to b=0.8. Estimate the true and absolute error. The exact integral is
1.640533.

Copyright © 2006 The McGraw-Hill Companies, Inc. Permission required for reproduction or display.
Problem
Use Simpson’s 3/8th Rule to estimate the integral of
f(x) = 0.2 +25x – 200x2 + 675x3 – 900x4 + 400x5
Integrate f(x) from a=0 to b=0.8. Estimate the true and absolute error. The exact integral is
1.640533.

Copyright © 2006 The McGraw-Hill Companies, Inc. Permission required for reproduction or display.
Problem
Use five segments to estimate the integral of
f(x) = 0.2 +25x – 200x2 + 675x3 – 900x4 + 400x5
Integrate f(x) from a=0 to b=0.8. Estimate the true and absolute error. The exact integral is
1.640533.

Copyright © 2006 The McGraw-Hill Companies, Inc. Permission required for reproduction or display.
Problem
Use five segments to estimate the integral of
f(x) = 0.2 +25x – 200x2 + 675x3 – 900x4 + 400x5
Integrate f(x) from a=0 to b=0.8. Estimate the true and absolute error. The exact integral is
1.640533.

Copyright © 2006 The McGraw-Hill Companies, Inc. Permission required for reproduction or display.
Problem
Use five segments to estimate the integral of
f(x) = 0.2 +25x – 200x2 + 675x3 – 900x4 + 400x5
Integrate f(x) from a=0 to b=0.8. Estimate the true and absolute error. The exact integral is
1.640533.

Copyright © 2006 The McGraw-Hill Companies, Inc. Permission required for reproduction or display.
Problem
Solve the following function for five segments:
f(x) = 0.2 +25x – 200x2 + 675x3 – 900x4 + 400x5
Integrate f(x) from a=0 to b=0.8. Estimate the true and absolute error. The exact integral is
1.640533.

Copyright © 2006 The McGraw-Hill Companies, Inc. Permission required for reproduction or display.
Newton-Cotes Integration Formulas

Copyright © 2006 The McGraw-Hill Companies, Inc. Permission required for reproduction or display.
Newton-Cotes Closed Integration Formulas

Segments Points Name Formula Truncation


(n) Error

1 2 Trapezoidal (b-a) * (f(x0)+ f(x1))/2 -(1/12)(b-a)3f”(ξ)

2 3 Simpson’s (b-a) * (f(x0)+ 4f(x1)+f(x2))/6 -(1/2880)(b-a)5f(4)(ξ)


1/3
3 4 Simpson’s (b-a) * (f(x0)+ 3f(x1)+ 3f(x2)+ f(x3))/8 -(1/6480)(b-a)5f(4)(ξ)
3/8
4 5 Boole’s (b-a) * (7f(x0) + 32f(x1) + 12f(x2) + 32f(x3) + proportional with (b-a)7
7f(x4))/90

Same order,
but Simpson’s 3/8 is more accurate

In engineering practice, higher order (greater than 4-point) formulas are rarely used

Copyright © 2006 The McGraw-Hill Companies, Inc. Permission required for reproduction or display.
Boole’s Rule

Copyright © 2006 The McGraw-Hill Companies, Inc. Permission required for reproduction or display.
Boole’s Rule

Copyright © 2006 The McGraw-Hill Companies, Inc. Permission required for reproduction or display.
Boole’s Rule

Copyright © 2006 The McGraw-Hill Companies, Inc. Permission required for reproduction or display.
Composite Boole’s Rule

Copyright © 2006 The McGraw-Hill Companies, Inc. Permission required for reproduction or display.
Composite Boole’s Rule

Copyright © 2006 The McGraw-Hill Companies, Inc. Permission required for reproduction or display.
Problem on Boole’s Rule

Copyright © 2006 The McGraw-Hill Companies, Inc. Permission required for reproduction or display.
Problem on Boole’s Rule

Copyright © 2006 The McGraw-Hill Companies, Inc. Permission required for reproduction or display.
Integration with Unequal Segments
Using Trapezoidal Rule
f ( x0 )  f ( x1 ) f ( x1 )  f ( x2 ) f ( xn  1 )  f ( xn )
I h1  h2    hn
2 2 2
x f(x) x f(x)
Example 21.7 0.0 0.2 0.44 2.842

0.12 1.309 0.54 3.507


Data for 0.22 1.305 0.64 3.181
f(x)= 0.2+25x-200x2+675x3-900x4+400x5 0.32 1.743 0.70 2.363
True solution = 1.6405 0.36 2.074 0.80 0.232

0.40 2.456

Copyright © 2006 The McGraw-Hill Companies, Inc. Permission required for reproduction or display.
Integration with Unequal Segments
Using Trapezoidal Rule
f ( x0 )  f ( x1 ) f ( x1 )  f ( x2 ) f ( xn  1 )  f ( xn )
I h1  h2    hn
2 2 2
x f(x) x f(x)
Example 21.7 0.0 0.2 0.44 2.842

0.12 1.309 0.54 3.507


Data for 0.22 1.305 0.64 3.181
f(x)= 0.2+25x-200x2+675x3-900x4+400x5 0.32 1.743 0.70 2.363
True solution = 1.6405 0.36 2.074 0.80 0.232

0.40 2.456

1.309  0.2 1.305  1.309 0.363  3.181 0.232  2.363


I 0.12  0.10    0.06  0.10
2 2 2 2
0.0905  0.1307    0.12975 1.594
which represents a relative error of = 2.8%
Copyright © 2006 The McGraw-Hill Companies, Inc. Permission required for reproduction or display.
Inclusion of Simpson’s Rules with uneven data

x f(x) h (xi+1-xi)

0.0 0.2 Trapezoidal


0.12 1.309 0.12 Rule
0.22 1.305 0.10 Simpson’s
0.32 1.743 0.10 1/3 rule
0.12 0.10
0.36 2.074 0.04 Simpson’s I (0.2  1.309)  [1.309  (4 *1.305)  1.743]
2 3
0.40 2.456 0.04 3/8 rule 3
 * 0.04[1.743  (3 * 2.074)  (3 * 2.456)  2.842]
2.842 8
0.44 0.04
0.10 0.06
3.507 [2.842  (4 * 3.507)  3.181]  (3.181  2.363)
0.54 0.10 Simpson’s 3 2
0.64 3.181 0.10 1/3 rule 0.10
 (2.363  0.232)
2
0.70 2.363 0.06 Trapezoidal 0.09054  0.27483  0.27263  0.66837  0.16632
0.80 0.232 0.10 Rule  0.12975
1.60244
Copyright © 2006 The McGraw-Hill Companies, Inc. Permission required for reproduction or display.
Multiple Integral
• Multiple integrals are widely used in engineering. For
example, a general equation to compute the average of a
two-dimensional function can be written as

f (0,2)  2 f (1,2)  f (2,2)


I 1, 2 h1
2
f (0,1)  2 f (1,1)  f (2,1)
I 1,1 h1
h2 2
f (0,0)  2 f (1,0)  f (2,0)
I 1, 0 h1
2
I 1, 0  2 I 1,1  I 1, 2
I h 2
h1 2
Copyright © 2006 The McGraw-Hill Companies, Inc. Permission required for reproduction or display.
Multiple Integral

Copyright © 2006 The McGraw-Hill Companies, Inc. Permission required for reproduction or display.
Multiple Integral

Copyright © 2006 The McGraw-Hill Companies, Inc. Permission required for reproduction or display.
Problem
The work produced by a constant temperature, pressure
volume thermodynamic process can be computed as
V2 11

W pdV
V1 0.5

where W is work, p is pressure, and V is volume.


Using a combination of the trapezoidal rule, Simpson’s rule,
use the following data to compute the work in kJ:

Pressure (kPa) 336 294.4 266.4 260.8 260.5 249.6 193.6 165.6

Volume (m3) 0.5 2 3 4 6 8 10 11

Copyright © 2006 The McGraw-Hill Companies, Inc. Permission required for reproduction or display.
Copyright © 2006 The McGraw-Hill Companies, Inc. Permission required for reproduction or display.

You might also like