COSC 3361 Numerical Analysis I Numerical Integration and Differentiation (III) - Gauss Quadrature and Adaptive Quadrature

Similar documents
Numerical Integration

NUMERICAL INTEGRATION. The inverse process to differentiation in calculus is integration. Mathematically, integration is represented by.

Lecture 20: Numerical Integration III

Lecture 17. Integration: Gauss Quadrature. David Semeraro. University of Illinois at Urbana-Champaign. March 20, 2014

Construction of Gauss Quadrature Rules

1 Error Analysis of Simple Rules for Numerical Integration

Lecture 14 Numerical integration: advanced topics

Orthogonal Polynomials

Numerical Integration

Numerical Analysis. 10th ed. R L Burden, J D Faires, and A M Burden

Lecture 6: Singular Integrals, Open Quadrature rules, and Gauss Quadrature

Lecture 14: Quadrature

3.4 Numerical integration

1 The Lagrange interpolation formula

Review of Gaussian Quadrature method

Interpolation. Gaussian Quadrature. September 25, 2011

Trapezoidal Rule, n = 1, x 0 = a, x 1 = b, h = b a. f (x)dx = h 2 (f (x 0) + f (x 1 )) h3

III. Lecture on Numerical Integration. File faclib/dattab/lecture-notes/numerical-inter03.tex /by EC, 3/14/2008 at 15:11, version 9

COT4501 Spring Homework VII

Numerical Integration. 1 Introduction. 2 Midpoint Rule, Trapezoid Rule, Simpson Rule. AMSC/CMSC 460/466 T. von Petersdorff 1

B.Sc. in Mathematics (Ordinary)

Numerical Analysis: Trapezoidal and Simpson s Rule

Theoretical foundations of Gaussian quadrature

CHAPTER 6b. NUMERICAL INTERPOLATION

Lecture Note 4: Numerical differentiation and integration. Xiaoqun Zhang Shanghai Jiao Tong University

Review of Calculus, cont d

Numerical integration

OPEN NEWTON - COTES QUADRATURE WITH MIDPOINT DERIVATIVE FOR INTEGRATION OF ALGEBRAIC FUNCTIONS

Section 6.1 Definite Integral

Suppose we want to find the area under the parabola and above the x axis, between the lines x = 2 and x = -2.

Numerical quadrature based on interpolating functions: A MATLAB implementation

Numerical Methods I Orthogonal Polynomials

Advanced Computational Fluid Dynamics AA215A Lecture 3 Polynomial Interpolation: Numerical Differentiation and Integration.

CMDA 4604: Intermediate Topics in Mathematical Modeling Lecture 19: Interpolation and Quadrature

7. Numerical evaluation of definite integrals

DOING PHYSICS WITH MATLAB MATHEMATICAL ROUTINES

Lecture 23: Interpolatory Quadrature

CAAM 453 NUMERICAL ANALYSIS I Examination There are four questions, plus a bonus. Do not look at them until you begin the exam.

LECTURE 19. Numerical Integration. Z b. is generally thought of as representing the area under the graph of fèxè between the points x = a and

Definite Integrals. The area under a curve can be approximated by adding up the areas of rectangles = 1 1 +

Math 1B, lecture 4: Error bounds for numerical methods

Harmonic Mean Derivative - Based Closed Newton Cotes Quadrature

Sections 5.2: The Definite Integral

Numerical Integration. Newton Cotes Formulas. Quadrature. Newton Cotes Formulas. To approximate the integral b

Discrete Least-squares Approximations

Chapter 5. Numerical Integration

1. Gauss-Jacobi quadrature and Legendre polynomials. p(t)w(t)dt, p {p(x 0 ),...p(x n )} p(t)w(t)dt = w k p(x k ),

1 The Riemann Integral

The Fundamental Theorem of Calculus. The Total Change Theorem and the Area Under a Curve.

Numerical integration. Quentin Louveaux (ULiège - Institut Montefiore) Numerical analysis / 10

Matrix Algebra. Matrix Addition, Scalar Multiplication and Transposition. Linear Algebra I 24

Chapter 3 Polynomials

Chapter 3 Solving Nonlinear Equations

Properties of Integrals, Indefinite Integrals. Goals: Definition of the Definite Integral Integral Calculations using Antiderivatives

CHAPTER 4a. ROOTS OF EQUATIONS

JDEP 384H: Numerical Methods in Business

Chapter 2. Numerical Integration also called quadrature. 2.2 Trapezoidal Rule. 2.1 A basic principle Extending the Trapezoidal Rule DRAWINGS

Quadrature Rules for Evaluation of Hyper Singular Integrals

Matrices, Moments and Quadrature, cont d

QUADRATURE is an old-fashioned word that refers to

Numerical Integration

1 Numerical integration

Orthogonal Polynomials and Least-Squares Approximations to Functions

APPROXIMATE INTEGRATION

Monte Carlo method in solving numerical integration and differential equation

Chapter 3 Single Random Variables and Probability Distributions (Part 2)

Math& 152 Section Integration by Parts

Z b. f(x)dx. Yet in the above two cases we know what f(x) is. Sometimes, engineers want to calculate an area by computing I, but...

METHODS OF APPROXIMATING THE RIEMANN INTEGRALS AND APPLICATIONS

63. Representation of functions as power series Consider a power series. ( 1) n x 2n for all 1 < x < 1

Euler, Ioachimescu and the trapezium rule. G.J.O. Jameson (Math. Gazette 96 (2012), )

Lecture 19: Continuous Least Squares Approximation

Unit #9 : Definite Integral Properties; Fundamental Theorem of Calculus

Abstract inner product spaces

Section 6.1 INTRO to LAPLACE TRANSFORMS

NUMERICAL INTEGRATION

September 13 Homework Solutions

Jim Lambers MAT 169 Fall Semester Lecture 4 Notes

The area under the graph of f and above the x-axis between a and b is denoted by. f(x) dx. π O

Best Approximation. Chapter The General Case

A REVIEW OF CALCULUS CONCEPTS FOR JDEP 384H. Thomas Shores Department of Mathematics University of Nebraska Spring 2007

How can we approximate the area of a region in the plane? What is an interpretation of the area under the graph of a velocity function?

Definite integral. Mathematics FRDIS MENDELU

p(x) = 3x 3 + x n 3 k=0 so the right hand side of the equality we have to show is obtained for r = b 0, s = b 1 and 2n 3 b k x k, q 2n 3 (x) =

The Regulated and Riemann Integrals

6.5 Numerical Approximations of Definite Integrals

Lab 11 Approximate Integration

Definite integral. Mathematics FRDIS MENDELU. Simona Fišnarová (Mendel University) Definite integral MENDELU 1 / 30

Lecture 12: Numerical Quadrature

CLOSED EXPRESSIONS FOR COEFFICIENTS IN WEIGHTED NEWTON-COTES QUADRATURES

INTRODUCTION TO INTEGRATION

Best Approximation in the 2-norm

Polynomials and Division Theory

Exam 2, Mathematics 4701, Section ETY6 6:05 pm 7:40 pm, March 31, 2016, IH-1105 Instructor: Attila Máté 1

Improper Integrals. Introduction. Type 1: Improper Integrals on Infinite Intervals. When we defined the definite integral.

Taylor Polynomial Inequalities

THE HANKEL MATRIX METHOD FOR GAUSSIAN QUADRATURE IN 1 AND 2 DIMENSIONS

Topic 6b Finite Difference Approximations

AN INTEGRAL INEQUALITY FOR CONVEX FUNCTIONS AND APPLICATIONS IN NUMERICAL INTEGRATION

State space systems analysis (continued) Stability. A. Definitions A system is said to be Asymptotically Stable (AS) when it satisfies

Transcription:

COSC 336 Numericl Anlysis I Numericl Integrtion nd Dierentition III - Guss Qudrture nd Adptive Qudrture Edgr Griel Fll 5 COSC 336 Numericl Anlysis I Edgr Griel

Summry o the lst lecture I For pproximting n integrl vlue one cn determine the pproximting polynomil o degree n The ccording integrl is then x dx p x dx = xi li x dx = A n i= For eqully spced points x, x,..., x n the ormul : is clled the Newton-Cotes ormul The Newton-Cotes ormul produce exct results, or eing polynomil o degree t most n n i= i x i : COSC 336 Numericl Anlysis I Edgr Griel

Summry o the lst lecture II Two wys o clculting the coeicients in the Newton-Cotes ormul hve een presented Using the Lgrnge orm o the interpolting polynomil Using the method o undetermined coeicients A i A i Nme Trpezoid rule 6 4 6 6 Simpsons rule 3 4 8 7 9 3 8 3 9 3 8 9 8 3 9 7 9 3/8 th rule Milne COSC 336 Numericl Anlysis I Edgr Griel

COSC 336 Numericl Anlysis I Edgr Griel Chnge o intervls I A ormul derived or certin intervl cn esily e dpted to ny other intervl y ming chnge o vrile e.g. using the sustitution nd or the pproximtion dt t dx x + = t x + = dt t dx x + = = + t A

Chnge o intervls II Even more generlly with x dx = t dt d c λ λ t = d c t d c d + d c c COSC 336 Numericl Anlysis I Edgr Griel

Qudrture Formuls Generl qudrture ormuls re descried y n x dx i= α t Bsic steps to solve n integrl using qudrture ormul: Determine the nots Construct the interpolting polynomil Determine the coeicients i t i i α i COSC 336 Numericl Anlysis I Edgr Griel

Composite Formuls I Applying integrtion ormul onto multiple intervls For equidistnt points x i = + ih with h = = x i xi x dx = i= Since Thus i COSC 336 Numericl Anlysis I Edgr Griel x x i x dx xi n x dx xi xi α xi + xi xi t x = i i= x x dx = x dx h x i i n i= = α x = i + ht h n = α x i + ht

Error estimtes I Trunction error or the composite Formul e trunc n = x dx h i= = h α x + i ht Assuming tht insted o the exct vlues x i + ht we ~ cn only clculte i, with ~ x ht ε i + i, COSC 336 Numericl Anlysis I Edgr Griel

The error is then Error estimtes II n x dx h i= = ~ e h = α n x dx h i= = i, α x i + ht + h n i= = α e trunc n ~ x + ht h α i i= = i, e roundo COSC 336 Numericl Anlysis I Edgr Griel

Error estimtes III Since Newton-Cotes ormul is exct or ll polynomils o degree t most n, ll methods o order > hve to integrte p t = c exctly. Thus p t dt = c = = α = c Using 9: we cn rewrite the roundo error n n ~ e h α x + ht h α roundo i= = n i= = i = α : i= = i, hε α : COSC 336 Numericl Anlysis I Edgr Griel

Error estimtes IV I ll vlues or re positive nd = e = α α roundo = α = hnε = ε I not ll vlues o α re positive, eqution : is not correct Roundo error is mgniied y the process Clcultion is not stle : COSC 336 Numericl Anlysis I Edgr Griel

Conclusions All Newton-Cotes ormuls with purely positive coeicients re numericlly stle α This is only the cse or the lgorithms o degree nd = 9 Algorithms or = 8 or hve some negtive coeicients nd re thereore not stle α 7 COSC 336 Numericl Anlysis I Edgr Griel

Generlized qudrture ormuls Newton-Cotes For the ormul o degree n we hd n coeicients which hd to e determined The choice o nodes were done priori The equtions to determine the coeicients were set up such tht the ormul produces exct results or ll polynomils o degree t most n Other deinitions or the coeicients might e useul s well e.g. Cheyshev s qudrture ormuls n n x dx α ti = α i= i= COSC 336 Numericl Anlysis I Edgr Griel t i t i

Gussin qudrture ormuls I Gussin qudrture: Determine the nots such tht the resulting ormuls o degree n is exct or ll polynomils o degree n+ Introduce weight unction wx such tht n x w x dx i= α t i i Furthermore, let q e nonzero polynomil o degree n+ tht is w-orthogonl to Π n. Thus, or ny polynomil o degree n we hve q x p x w x dx = 4: COSC 336 Numericl Anlysis I Edgr Griel

Gussin qudrture ormuls II Using the zeros o qx, ormul 4: will e exct or ll polynomils o degree n+ The polynomils qx with the desired ehviour re clled Legendre polynomils All zeros re simple roots Zeros o these unctions re well documented or mny degrees n Ater determining the zeros o the Legendre Polynomils o degree n, determine the coeicients α using e.g. the method o undetermined coeicients COSC 336 Numericl Anlysis I Edgr Griel

Exmple Determine the Gussin qudrture rule when [,]=[-,], wx= nd n= The orthogonl polynomils re: q x = q 3 x = x q x = x q3 x = x 3 The roots o q 3 x re, ± 3 5 Thus, 3 3 x dx α + α 5 + α 5 Using the method o undetermined coeicients one otins α = 5 α = 8 9 9 α = 5 9 3 5 x COSC 336 Numericl Anlysis I Edgr Griel

Coeicients o the Gussin Qudrture ormuls All coeicients nd zeros re trnsormed to the intervl [,] αi ti Degree 3 + 6 63 4 3 5 8 8 8 5 8 5 + 5 6 COSC 336 Numericl Anlysis I Edgr Griel

Adptive Qudrture Given: unction, intervl [,], required ccurcy I given method will not e suiciently ccurte on the given intervl, divide the intervl into two equl prts Repet this procedure until desired ccurcy hs een reched Prolem: how to estimte the error o the qudrture lgorithm used COSC 336 Numericl Anlysis I Edgr Griel

Adptive Qudrture II Exmple: Simpson s rule + x dx = [ + 4 + + E, 6 with the error term eing E, = 9 or slightly rewritten: v u [ / ] S, 5 4 ξ 5 4 x dx = S u, v [ v u / ] ξ 9 9: COSC 336 Numericl Anlysis I Edgr Griel

Adptive Qudrture III When sudividing into two sudomins v x dx = x dx + u w x dx u v w 5 4 = S u, w [ w u / ] ξ 9 5 4 + S w, v [ v w / ] ξ3 9 5 v u 4 = S u, w + S w, v [ ξ + 9 4 ξ 3 ] : COSC 336 Numericl Anlysis I Edgr Griel

Adptive Qudrture IV 4 4 4 With ξ = [ ξ + ξ3] eqution : ecomes v 5 4 x dx = S u, w + S w, v v u ξ 9 9 u Note: ech sudomin hs to ulill the locl error term given y e i ε x x / v u i i 4 Note: ξ usully not ville. Assumption: over 4 smll intervl ξ = c. Thus 4 4 ξ = ξ : : :3 COSC 336 Numericl Anlysis I Edgr Griel

Adptive Qudrture V 4 Using :3 the term ξ cn e eliminted y multiplying : y 6/5 multiplying 9: y /5 sutrcting : rom :. This leds to v u x dx S u, w + S w, v + [ S u, w + S w, v S u, v] 5 : : :3 Error estimte COSC 336 Numericl Anlysis I Edgr Griel

Adptive Qudrture - Algorithm Given:,,, h=-/ l=h/ Clculte,+l,+h,+h+l, Clculte S,, S,+h, S+h, Clculte error term: e=/5[s,+h+s+h,- S,] Compre e with the locl error term s deined in : I ccurcy not stisctory, strt the sme procedure twice y setting =, =+h =+h, = COSC 336 Numericl Anlysis I Edgr Griel