5. Integration 2.Quadrature as Box Counting 3.Algorithm: Trapezoid Rule 4.Algorithm: Simpson’s Rule 5.Integration Error 6.Algorithm: Gaussian Quadrature.

Slides:



Advertisements
Similar presentations
Prof. Muhammad Saeed ( Differentiation and Integration )
Advertisements

6. 4 Integration with tables and computer algebra systems 6
Numerical Integration
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.
Computational Methods in Physics PHYS 3437
Mathematics1 Mathematics 1 Applied Informatics Štefan BEREŽNÝ.
Section 5.7 Numerical Integration. Approximations for integrals: Riemann Sums, Trapezoidal Rule, Simpson's Rule Riemann Sum: Trapezoidal Rule: Simpson’s.
Asymptotic error expansion Example 1: Numerical differentiation –Truncation error via Taylor expansion.
Numerical Integration of Functions
Engineering Analysis ENG 3420 Fall 2009 Dan C. Marinescu Office: HEC 439 B Office hours: Tu-Th 11:00-12:00.
Chapter 7 Numerical Differentiation and Integration
11. Numerical Differentiation and Integration 11
Today’s class Romberg integration Gauss quadrature Numerical Methods
Numerical Integration
Lecture 3: Integration. Integration of discrete functions
MANE 4240 & CIVL 4240 Introduction to Finite Elements Numerical Integration in 1D Prof. Suvranu De.
Chapter 7 Differentiation and Integration
Numerical Integration
2010/3/11 計算機在工程上的應用 Page 1 Gaussian quadrature Advisor: J. T. Chen Reporter: Jia-Wei Lee Date: Mar., 11, 2010.
Quadrature Greg Beckham. Quadrature Numerical Integration Goal is to obtain the integral with as few computations of the integrand as possible.
Copyright © 2006 The McGraw-Hill Companies, Inc. Permission required for reproduction or display. 1 Numerical Differentiation and Integration Part 6 Calculus.
19.5 Numeric Integration and Differentiation
Integration. Problem: An experiment has measured the number of particles entering a counter per unit time dN(t)/dt, as a function of time. The problem.
Chapter 4, Integration of Functions. Open and Closed Formulas x 1 =a x 2 x 3 x 4 x 5 =b Closed formula uses end points, e.g., Open formulas - use interior.
Lecture 28: Comparison of different numerical integrators 1.Adaptive Simpson’s and Trapezoid Rules 2. Romberg Integration 3. Adaptive Gaussian Quadrature.
Integrals 5.
1 Chapter 5 Numerical Integration. 2 A Review of the Definite Integral.
Numerical Integration
Automatic Integration
3. Numerical integration (Numerical quadrature) .
Lecture 19 - Numerical Integration CVEN 302 July 22, 2002.
Integration Integration: is the total value, or summation, of f(x) dx over the range from a to b:
Numerical Computation
1 Chapter 7 NUMERICAL INTEGRATION. 2 PRELIMINARIES We use numerical integration when the function f(x) may not be integrable in closed form or even in.
1 Numerical Analysis Lecture 12 Numerical Integration Dr. Nader Okasha.
Chapters 5 and 6: Numerical Integration
4.6 Numerical Integration Trapezoid and Simpson’s Rules.
4.6 Numerical Integration. The Trapezoidal Rule One method to approximate a definite integral is to use n trapezoids.
MA2213 Lecture 4 Numerical Integration. Introduction Definition is the limit of Riemann sums I(f)
Lecture 22 - Exam 2 Review CVEN 302 July 29, 2002.
Homework questions thus far??? Section 4.10? 5.1? 5.2?
Integration Copyright © Cengage Learning. All rights reserved.
6. Introduction to Spectral method. Finite difference method – approximate a function locally using lower order interpolating polynomials. Spectral method.
Copyright © The McGraw-Hill Companies, Inc. Permission required for reproduction or display. 1 Chapter 22.
Use of Newton-Cotes Formulas and eventual shortcomings Matlab code to increase number of segments with trapezoid, 1/3 and 3/8 rule.
Techniques for Numerical Integration
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.
Copyright © The McGraw-Hill Companies, Inc. Permission required for reproduction or display. 1 Part 5 Integration and Differentiation.
Chapters 5 and 6: Numerical Integration Code development trapezoid rule Simpson’s rule Gauss quadrature Laguerre quadrature Analysis changing the variable.
Rodrigues Formula :Laguerre Polynomials ( n! changes scale ) 3. Laguerre Functions Laguerre ODE C encircles x but no other singularities Schlaefli integral.
Quadrature – Concepts (numerical integration) Don Allen.
Copyright © The McGraw-Hill Companies, Inc. Permission required for reproduction or display. 1 Chapter 20 Numerical Integration of Functions.
Chapter 4, Integration of Functions
5.5 The Trapezoid Rule.
Lecture 19 – Numerical Integration
Chapter 22.
Chapter 7 Numerical Differentiation and Integration
NUMERICAL INTEGRATION
Copyright © Cengage Learning. All rights reserved.
Composite Numerical Integration
Numerical Integration:
NUMERICAL INTEGRATION
Copyright © Cengage Learning. All rights reserved.
SKTN 2393 Numerical Methods for Nuclear Engineers
Numerical Integration
Numerical Integration
Chapter 4, Integration of Functions
Elements of Numerical Integration
Presentation transcript:

5. Integration 2.Quadrature as Box Counting 3.Algorithm: Trapezoid Rule 4.Algorithm: Simpson’s Rule 5.Integration Error 6.Algorithm: Gaussian Quadrature 7.Empirical Error Estimate 8.Experimentation 9.Higher Order Rules

5.2. Quadrature as Box Counting Riemann: Numerical:w = weight Keeping N finite can still give exact results, e.g., polynomials. Aim: accurate result for small N. No universal “best” algorithm.

Tips Remove singularities first. By putting them at endpoints of sub-intervals By change of variable. Speed up or slow down (by change of variable or step size) in slowly or rapidly varying region.

Algorithms for Evenly Spaced Points Evenly spaced points : NameDegreewiwi Trapezoid1 Simpson’s2 3/83 Milne4

8.3.Algorithm: Trapezoid Rule   

5.4.Algorithm: Simpson’s Rule   

 N = odd 

5.5.Integration Error Expand f at middle of interval x  [  h, h ] : Error, Trapezoid : Error, Simpson : n data points in each interval n = 2 n = 4 Relative error :

n = 2,4 for t, s Round-off error is random :  m  machine precision ~ 10  7 ( single prec) ~ 10  15 ( double prec)  Min  tot : Set scale to Trapezoid :   Simpson :

Conclusions Simpson’s rule is better than trapezoid. It’s possible to get  tot   m. Best result is obtained for N ~ 1000 instead of .

5.6.Algorithm: Gaussian Quadrature where  is the n th degree member of a complete set of orthogonal polynomials, and { x k } are its roots. I = S if f is an 2n-1 degree polynomial. Proof : IntegralPolynomialweightLimits Legendre1 (  1, 1 ) Hermite exp(  x 2 )( ,  ) Laguerre exp(  x )( ,  ) Chebyshev I ( 1  x 2 )  1/2 (  1, 1 )

5.6.1.Mapping Integration Points An integralcan be transformed into by the linear transform Thus   

An integralcan be transformed into by the linear transform Thus  

Similarly, one get the following transforms IntervalWy [ a, b ] [ 0,  ] [ ,  ] [ b,  ] [ 0, b ]

5.7.Empirical Error Estimate (Ex.5.1)

Relative error,, as a function of N for the trapezoid, Simpson, & Gaussian methods, in the calculation of Answer

5.8.Experimentation Evaluate and What’s wrong ?

5.9.Higher Order Rules Let A(h) be the numerical evaluation of an integral with leading error  h 2, i.e.,   Romberg’s extrapolation see Burden, § 4.5