Asymptotic error expansion Example 1: Numerical differentiation –Truncation error via Taylor expansion.

Slides:



Advertisements
Similar presentations
Numerical Integration
Advertisements

Algebraic, transcendental (i.e., involving trigonometric and exponential functions), ordinary differential equations, or partial differential equations...
1 Chapter 5 Numerical Integration. 2 A Review of the Definite Integral.
Computational Methods in Physics PHYS 3437
Chapter 3. Interpolation and Extrapolation Hui Pan, Yunfei Duan.
MATH 685/ CSI 700/ OR 682 Lecture Notes
Numerical Integration of Functions
NUMERICAL DIFFERENTIATION AND INTEGRATION
Chapter 7 Numerical Differentiation and Integration
Today’s class Romberg integration Gauss quadrature Numerical Methods
Lecture 18 - Numerical Differentiation
Numerical Integration
CE33500 – Computational Methods in Civil Engineering Differentiation Provided by : Shahab Afshari
MATH 685/ CSI 700/ OR 682 Lecture Notes
Introduction to Scientific Computing ICE / ICE 508 Prof. Hyuckjae Lee KAIST- ICC
MA5233: Computational Mathematics
Lecture 2: Numerical Differentiation. Derivative as a gradient
Numerical Integration
CISE-301: Numerical Methods Topic 1: Introduction to Numerical Methods and Taylor Series Lectures 1-4: KFUPM.
Copyright © 2006 The McGraw-Hill Companies, Inc. Permission required for reproduction or display. 1 Numerical Differentiation and Integration Part 6 Calculus.
Autar Kaw Humberto Isaza
Computational Methods in Physics PHYS 3437 Dr Rob Thacker Dept of Astronomy & Physics (MM-301C)
19.5 Numeric Integration and Differentiation
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.
Chapter 4 Numerical Differentiation and Integration 1/16 Given x 0, approximate f ’(x 0 ). h xfhxf xf h )()( lim)('    x0x0 x1x1 h x1x1 x0x0.
1 Chapter 5 Numerical Integration. 2 A Review of the Definite Integral.
Automatic Integration
3. Numerical integration (Numerical quadrature) .
Lecture 19 - Numerical Integration CVEN 302 July 22, 2002.
Numerical Computations in Linear Algebra. Mathematically posed problems that are to be solved, or whose solution is to be confirmed on a digital computer.
Chapter 17 Boundary Value Problems. Standard Form of Two-Point Boundary Value Problem In total, there are n 1 +n 2 =N boundary conditions.
CISE-301: Numerical Methods Topic 1: Introduction to Numerical Methods and Taylor Series Lectures 1-4: KFUPM CISE301_Topic1.
Simpson Rule For Integration.
MATH 685/CSI 700 Lecture Notes Lecture 1. Intro to Scientific Computing.
CISE301_Topic11 CISE-301: Numerical Methods Topic 1: Introduction to Numerical Methods and Taylor Series Lectures 1-4:
EE 3561_Unit_1(c)Al-Dhaifallah EE 3561 : - Computational Methods in Electrical Engineering Unit 1: Introduction to Computational Methods and Taylor.
Lecture 22 - Exam 2 Review CVEN 302 July 29, 2002.
Extrapolation Models for Convergence Acceleration and Function ’ s Extension David Levin Tel-Aviv University MAIA Erice 2013.
CMPS 1371 Introduction to Computing for Engineers MATRICES.
Integration of 3-body encounter. Figure taken from
Copyright © 2006 The McGraw-Hill Companies, Inc. Permission required for reproduction or display. 1 ~ Numerical Differentiation and Integration ~ Integration.
6. Introduction to Spectral method. Finite difference method – approximate a function locally using lower order interpolating polynomials. Spectral method.
Scientific Computing General Least Squares. Polynomial Least Squares Polynomial Least Squares: We assume that the class of functions is the class of all.
Copyright © The McGraw-Hill Companies, Inc. Permission required for reproduction or display. 1 Chapter 22.
5. Integration 2.Quadrature as Box Counting 3.Algorithm: Trapezoid Rule 4.Algorithm: Simpson’s Rule 5.Integration Error 6.Algorithm: Gaussian Quadrature.
Lecture 16 - Approximation Methods CVEN 302 July 15, 2002.
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.
Ordinary Differential Equations
ECE 530 – Analysis Techniques for Large-Scale Electrical Systems Prof. Hao Zhu Dept. of Electrical and Computer Engineering University of Illinois at Urbana-Champaign.
Numerical Analysis CC413 Propagation of Errors. 2 In numerical methods, the calculations are not made with exact numbers. How do these inaccuracies propagate.
Quadrature – Concepts (numerical integration) Don Allen.
NUMERICAL ANALYSIS I. Introduction Numerical analysis is concerned with the process by which mathematical problems are solved by the operations.
Copyright © The McGraw-Hill Companies, Inc. Permission required for reproduction or display. 1 Chapter 20 Numerical Integration of Functions.
Chapter 4, Integration of Functions
Chapter 22.
Class Notes 18: Numerical Methods (1/2)
Chapter 23.
Numerical differentiation
Numerical Integration:
MATH-321 In One Slide MATH-321 & MATLAB Command.
5.3 Higher-Order Taylor Methods
Numerical Analysis Lecture 2.
Chapter 2 A Survey of Simple Methods and Tools
CISE-301: Numerical Methods Topic 1: Introduction to Numerical Methods and Taylor Series Lectures 1-4: KFUPM CISE301_Topic1.
Numerical Integration
Presentation transcript:

Asymptotic error expansion Example 1: Numerical differentiation –Truncation error via Taylor expansion

Asymptotic error expansion Example 2: Numerical integration via midpoint rule –Truncation error via Taylor expansion

Asymptotic error expansion In general, we assume In addition, we assume the asymptotic error expansion –Convergence –Order of convergence: p 1 Estimate order of convergence numerically –By log-log plot –By quotation

Richardson extrapolation Suppose we have the asymptotic error expansion With two different meshes: h:=h 1 < h 2

Richardson extrapolation Eliminating the leading order error term Equivalently, we have Better approximation, with order of accuracy: p 2

Richardson extrapolation Specifically, if we choose Similarly, we have

Romberg algorithm Choose a sequence of mesh Romberg algorithm based on Richardson extrapolation

An example Composite trapezoidal rule –Asymptotic error expansion –Richardson extrapolation

An example Romberg algorithm Exponential convergence rate

Numerical result Compute: Result by Romberg algorithm

Order of convergence

Exercises Suppose the asymptotic error expansion –Design the Richardson extrapolation with –Design the Romberg algorithm with

Stability and conditioning Example 1. Linear system –Numerical solution with 3 digits –Perturbation errors: small & stable

Stability and conditioning Example 2. Linear system –Numerical solution with 3 digits –Perturbation errors: extremely large & unstable!!!!!

Stability and conditioning In many cases, inaccuracies in computed results are much larger than the round-off errors and/or truncation errors introduced in the computation The reason may be that the errors were ``amplified’’ by the algorithm. We say that a problem is stable if the solution depends continuously on the input parameters –If ``small’’ changes are made to the input parameters, then the resulting changes in the solution will also be ``small –Mathematically,

Stability and conditioning If a problem is not stable, then it is said to be unstable Condition number of a problem: –A measure of the sensitivity of its solution to small perturbation of the input parameters –The ratio of the relative change in the solution to the relative change in the input parameters –It is significant in many problems because the round-off errors in the input to a problem may lead to large changes in the solution

Stability and conditioning –Small: well-conditioned problem –Large: ill-conditioned problem –It is a property of the problem to be solved itself, but not of the numerical algorithm employed to solve it!!! –It depends on the number of significant digits used in the computation Single precision Double precision ---- adapted in most current scientific computations 4 times precision Infinite precision

Perturbation analysis Solving the linear system Vector and matrix norm Perturbation in the right hand side

Perturbation analysis –The largest ratio of the relative change Condition number –Two examples

Some comments on condition number –k(A) is great or equal than 1!! It depends on the norm. –A is well-conditioned if k(A)=O(1) –A is ill-conditioned if k(A)>>1 –The linear system A x= b is well-conditioned (ill-conditioned) if A is well-conditioned (ill-conditioned) –For well-conditioned linear systems, the relative change in the solution is small if the relative change in the right-hand side is small –For ill-conditioned linear systems, the relative change is the sloution can be very large even the right hand side is small!!

A simple example Solve –Condition number: ill-conditioned !!!! –Perturb the right hand side –Perturbation in the error

Another example Consider –Plot the condition number of A for different degree –Solve

Condition number of A

Error of the solution

Some observations A is not singular since det(A)=1 !! Condition number increase exponentially When n=73, the condition number exceeds the double precision!! We solve the linear system by back substitution, thus no truncation. So the errors are fully due to the round-off errors!! The error is directly proportional to the condition number Round-off errors are important for large sparse matrix!

Perturbation on b Result Proof

Perturbation on A Result Proof: see details in class –Lemma 1. –Lemma 2

Perturbation on A & b Result Proof: see details in class

Efficient computation: Fast algorithms Example 1: compute power –Algorithm 1: Computational cost: 254 times multiplication

Efficient computation: Fast algorithms –Algorithm 2: Computational cost: 14 times multiplication

Efficient computation Example 2: Evaluate polynomial –Direction sum: cost is n(n+1)/2 –Fast algorithm: O(n)!!!

Review of numerical integration and differentiation Numerical integration –Basic quadratures Midpoint rule Trapezoidal rule Simpson’s rule –Composite techniques –Romberg algorithm – Richardson extrapolation –Gaussian quadratures --- high order Numerical differentiation –Finite difference & stencils

Review of function approximation & interpolation Function interpolation –Lagrange polynomial interpolation –Hermite polynomial interpolation –Cubic spine interpolation –Piecewise polynomial interpolation Function approximation –Orthogonal functions approximation –Least square approximation