Numerical Analysis Lecture 42.

Slides:



Advertisements
Similar presentations
Numerical Integration
Advertisements

ES 240: Scientific and Engineering Computation. Chapter 17: Numerical IntegrationIntegration  Definition –Total area within a region –In mathematical.
1 Chapter 5 Numerical Integration. 2 A Review of the Definite Integral.
Chapter 7 Numerical Differentiation and Integration
Today’s class Romberg integration Gauss quadrature Numerical Methods
Newton-Cotes Integration Formula
Lecture 3: Integration. Integration of discrete functions
MANE 4240 & CIVL 4240 Introduction to Finite Elements Numerical Integration in 1D Prof. Suvranu De.
Quadrature Greg Beckham. Quadrature Numerical Integration Goal is to obtain the integral with as few computations of the integrand as possible.
© 2010 Pearson Education Inc.Goldstein/Schneider/Lay/Asmar, CALCULUS AND ITS APPLICATIONS, 12e– Slide 1 of 58 Chapter 9 Techniques of Integration.
19.5 Numeric Integration and Differentiation
Simpson’s 1/3 rd Rule of Integration. What is Integration? Integration The process of measuring the area under a.
The Islamic University of Gaza Faculty of Engineering Civil Engineering Department Numerical Analysis ECIV 3306 Chapter 21 Newton-Cotes Integration Formula.
Integrals 5.
1 Chapter 5 Numerical Integration. 2 A Review of the Definite Integral.
3. Numerical integration (Numerical quadrature) .
1 Numerical Analysis Lecture 12 Numerical Integration Dr. Nader Okasha.
1 Simpson’s 1/3 rd Rule of Integration. 2 What is Integration? Integration The process of measuring the area under a curve. Where: f(x) is the integrand.
CSE 330 : Numerical Methods
9/14/ Trapezoidal Rule of Integration Major: All Engineering Majors Authors: Autar Kaw, Charlie Barker
1 Trapezoidal Rule of Integration. What is Integration Integration: The process of measuring the area under a function.
Integration Copyright © Cengage Learning. All rights reserved.
5.1.  When we use the midpoint rule or trapezoid rule we can actually calculate the maximum error in the calculation to get an idea how much we are off.
Copyright © The McGraw-Hill Companies, Inc. Permission required for reproduction or display. 1 Chapter 22.
Trapezoidal Rule of Integration
12/1/ Trapezoidal Rule of Integration Civil Engineering Majors Authors: Autar Kaw, Charlie Barker
Chap. 11 Numerical Differentiation and Integration
CSE 330 : Numerical Methods Lecture 15: Numerical Integration - Trapezoidal Rule Dr. S. M. Lutful Kabir Visiting Professor, BRAC University & Professor.
6. Numerical Integration 6.1 Definition of numerical integration. 6.2 Reasons to use numerical integration. 6.3 Formulas of numerical Integration. 6.4.
1/7  4.6 Adaptive Quadrature Methods Chapter 4 Numerical Differentiation and Integration -- Adaptive Quadrature Methods   /2  /4  /8 Predict the.
The purpose of Chapter 5 is to develop the basic principles of numerical integration Usefule Words integrate, integral 积分(的), integration 积分(法), quadrature.
3/12/ Trapezoidal Rule of Integration Computer Engineering Majors Authors: Autar Kaw, Charlie Barker
3/20/ Trapezoidal Rule of Integration Chemical Engineering Majors Authors: Autar Kaw, Charlie Barker
Trapezoidal Rule of Integration
Air Force Admin College, Coimbatore
In the special case c = 0, T (x) is also called the Maclaurin Series: THEOREM 1 Taylor Series Expansion If f (x) is represented by a power series.
NUMERICAL DIFFERENTIATION Forward Difference Formula
Part 6 - Chapter 21.
Chapter 7 Numerical Differentiation and Integration
Approximate Integration
1. 2 What is Integration? Integration The process of measuring the area under a curve. Where: f(x) is the integrand a= lower limit of integration b=
Copyright © Cengage Learning. All rights reserved.
Chapter 22.
F(x) = x2 x > 3 Find the range of f(x) f(x) > 9.
TECHNIQUES OF INTEGRATION
Chapter 7 Numerical Differentiation and Integration
Trapezoidal Rule of Integration
Trapezoidal Rule of Integration
Copyright © Cengage Learning. All rights reserved.
Composite Numerical Integration
Elements of Numerical Integration
Elements of Numerical Integration
Copyright © Cengage Learning. All rights reserved.
Simpson’s 1/3rd Rule of Integration
Numerical Computation and Optimization
Simpson’s 1/3rd Rule of Integration
Pengintegralan Numerik (lanjutan) Pertemuan 10
Simpson’s 1/3rd Rule of Integration
Romberg Rule of Integration
SKTN 2393 Numerical Methods for Nuclear Engineers
Simpson’s 1/3rd Rule of Integration
Numerical Integration
Romberg Rule of Integration
Numerical Computation and Optimization
Objectives Approximate a definite integral using the Trapezoidal Rule.
Numerical Computation and Optimization
Romberg Rule of Integration
Numerical Integration
Air Force Admin College, Coimbatore
Elements of Numerical Integration
Presentation transcript:

Numerical Analysis Lecture 42

Examples of Numerical Differentiation

The simplest formula for differentiation is

Let f(x)= In x and x0 = 1.8. Then the quotient Example Let f(x)= In x and x0 = 1.8. Then the quotient is used to approximate

Let us see the results for h = 0.1, 0.01, and 0.001. with error where Let us see the results for h = 0.1, 0.01, and 0.001.

h f(1.8 + h) 0.1 0.64185389 0.5406722 0.0154321 0.01 0.59332685 0.5540180 0.0015432 0.001 0.58834207 0.5554013 0.0001543

and the error bounds are a appropriate. Since The exact value of is and the error bounds are a appropriate.

The following two three point formulas become especially useful if the nodes are equally spaced, that is, when x1 = x0 + h and x2 = x0 + 2h,

where lies between x0 and x0 + 2h, and

where lies between (x0 – h) and (x0 + h).

Given in Table below are values for f (x) = xex. 1.8 10.889365 1.9 12.703199 2.0 14.778112 2.1 17.148957 2.2 19.855030

Since Approximating using the various three-and five-point formulas produces the following results.

Three point formulas:

Using three point formulas we get

Five point formula Using the five point formula with h = 0.1 (the only formula applicable):

The errors in the formulas are approximately and respectively. Clearly, the five-point formula gives the superior result.

Consider approximating Consider approximating for f (x) = sin x, using the values in table [ the true value is cos (0.900) = 0.62161.] x sin x 0.800 0.71736 0.901 0.78395 0.850 0.75128 0.902 0.78457 0.880 0.77074 0.905 0.78643 0.890 0.77707 0.910 0.78950 0.895 0.78021 0.920 0.79560 0.898 0.78208 0.950 0.81342 0.899 0.78270 1.000 0.84147

Using the formula with different values of h gives the approximations in table given below:

h Approximation to Error 0.001 0.62500 0.00339 0.002 0.62250 0.00089 0.005 0.62200 0.00039 0.010 0.62150 -0.00011 0.020 0.050 0.62140 -0.00021 0.100 0.62055 -0.00106

Numerical Integration Examples of Numerical Integration

EXAMPLE The Trapezoidal rule for a function f on the interval [0, 2] is while Simpson’s rule for f on [0, 2] is

That is

f (x) x2 x4 1/(x + 1) sin x ex Exact value 2.667 6.400 1.099 2.958 1.416 6.389 Trapezoidal 4.000 16.000 1.333 3.326 0.909 8.389 Simpson’s 6.667 1.111 2.964 1.425 6.421

Use close and open formulas listed below to approximate

Some of the common closed Newton-Cotes formulas with their error terms are as follows: n = 1: Trapezoidal rule where

n = 2: Simpson’s rule n = 3: Simpson’s rule

n = 4: where n = 0: Midpoint rule

n 1 2 3 4 Closed formulas 0.27768018 0.29293264 0.29291070 0.29289318 Error 0.01521303 0.00003942 0.00001748 0.00000004 Open formulas 0.29798754 0.29285866 0.29286923 0.00509432 0.00003456 0.00002399

Composite Numerical Integration EXAMPLE 1 Consider approximating with an absolute error less than 0.00002, using the Composite Simpson’s rule. The Composite Simpson’s rule gives

Since the absolute error is required to be less than 0.00002, the inequality

is used to determine n and h is used to determine n and h. Computing these calculations gives n greater than or equal to 18. If n = 20, then the formula becomes

To be assured of this degree of accuracy using the Composite Trapezoidal rule requires that or that Since this is many more calculations than are needed for the Composite Simpson’s rule, it is clear that it

would be undesirable to use the Composite Trapezoidal rule on this problem. For comparison purposes, the Composite Trapezoidal rule with n = 20 and gives

The exact answer is 2; so Simpson’s rule with n = 20 gave an answer well within the required error bound, whereas the Trapezoidal rule with n = 20 clearly did not.

An Example of Industrial applications: A company advertises that every roll of toilet paper has at least 250 sheets. The probability that there are 250 or more sheets in the toilet paper is given by

Approximating the above integral as a)use single segment Trapezoidal rule to find the probability that there are 250 or more sheets. b)Find the true error, Et for part (a). C)Find the absolute relative true error for part (a).

, where

b) The exact value of the above integral cannot be found b) The exact value of the above integral cannot be found. We assume the value obtained by adaptive numerical integration using Maple as the exact value for calculating the true error and relative true error. so the true error is

The absolute relative true error, , would then be

Improper Integrals EXAMPLE To approximate the values of the improper integral we will use the Composite Simpson’s rule with h = 0.25. Since the fourth Taylor polynomial for ex about x = 0 is

We have

Table below lists the approximate values of G(x) 0.00 0.25 0.0000170 0.50 0.0004013 0.75 0.0026026 1.00 0.0099485

Applying the Composite Simpson’s rule to G using these data gives Hence

This result is accurate within the accuracy of the Composite Simpson’s rule approximation for the function G. Since on [0, 1], the error is bounded by

EXAMPLE To approximate the value of the improper integral we make the change of variable t = x-1 to obtain The fourth Taylor polynomial, P4(t), for sin t about 0 is

So we have Applying the Composite Simpson’s rule with n = 8 to the remaining integral gives which is accurate to within

Numerical Analysis Lecture 42