Lecture 14 Numerical integration: advanced topics

Similar documents
Numerical quadrature based on interpolating functions: A MATLAB implementation

Numerical Integration

Orthogonal Polynomials

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

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

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

Lecture 14: Quadrature

1 The Lagrange interpolation formula

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

3.4 Numerical integration

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

Numerical Analysis: Trapezoidal and Simpson s Rule

Lecture 12: Numerical Quadrature

B.Sc. in Mathematics (Ordinary)

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

7.2 Riemann Integrable Functions

Construction of Gauss Quadrature Rules

COT4501 Spring Homework VII

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

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

The Fundamental Theorem of Calculus

Numerical Integration

Lecture 23: Interpolatory Quadrature

Lecture 20: Numerical Integration III

JDEP 384H: Numerical Methods in Business

Definite integral. Mathematics FRDIS MENDELU

Composite Mendeleev s Quadratures for Solving a Linear Fredholm Integral Equation of The Second Kind

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

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

DOING PHYSICS WITH MATLAB MATHEMATICAL ROUTINES

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

AN INTEGRAL INEQUALITY FOR CONVEX FUNCTIONS AND APPLICATIONS IN NUMERICAL INTEGRATION

Numerical Methods I Orthogonal Polynomials

Math 554 Integration

n f(x i ) x. i=1 In section 4.2, we defined the definite integral of f from x = a to x = b as n f(x i ) x; f(x) dx = lim i=1

1 Error Analysis of Simple Rules for Numerical Integration

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

1 The Riemann Integral

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

Properties of the Riemann Integral

Numerical integration

Lecture 1: Introduction to integration theory and bounded variation

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

Section 6.1 Definite Integral

Abstract inner product spaces

Math& 152 Section Integration by Parts

NUMERICAL INTEGRATION

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

Tangent Line and Tangent Plane Approximations of 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.

INTRODUCTION TO INTEGRATION

AN INEQUALITY OF OSTROWSKI TYPE AND ITS APPLICATIONS FOR SIMPSON S RULE AND SPECIAL MEANS. I. Fedotov and S. S. Dragomir

Interpolation. Gaussian Quadrature. September 25, 2011

Midpoint Approximation

6.5 Numerical Approximations of Definite Integrals

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 ),

The goal of this section is to learn how to use a computer to approximate definite integrals, i.e. expressions of the form. Z b

Best Approximation in the 2-norm

For a continuous function f : [a; b]! R we wish to define the Riemann integral

Some estimates on the Hermite-Hadamard inequality through quasi-convex functions

The Riemann Integral

Riemann Sums and Riemann Integrals

Arithmetic Mean Derivative Based Midpoint Rule

Best Approximation. Chapter The General Case

Riemann Sums and Riemann Integrals

GENERALIZATIONS OF WEIGHTED TRAPEZOIDAL INEQUALITY FOR MONOTONIC MAPPINGS AND ITS APPLICATIONS. (b a)3 [f(a) + f(b)] f x (a,b)

Discrete Least-squares Approximations

Sections 5.2: The Definite Integral

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...

Lecture 4: Piecewise Cubic Interpolation

2

Week 10: Riemann integral and its properties

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

different methods (left endpoint, right endpoint, midpoint, trapezoid, Simpson s).

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) =

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

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

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

A Computational Method for Solving Linear Volterra Integral Equations

Integration Techniques

Chapters 4 & 5 Integrals & Applications

Advanced Calculus: MATH 410 Notes on Integrals and Integrability Professor David Levermore 17 October 2004

13.4. Integration by Parts. Introduction. Prerequisites. Learning Outcomes

Module 11.4: nag quad util Numerical Integration Utilities. Contents

7. Numerical evaluation of definite integrals

We divide the interval [a, b] into subintervals of equal length x = b a n

Theoretical foundations of Gaussian quadrature

Review of Gaussian Quadrature method

Problem Set 3 Solutions

Chapter 3 Polynomials

CS514 Fall '00 Numerical Analysis (Sketched) Solution of Homework 3 1. Questions from text in Chapter 3 Problem 1: 0 f 0 1 f 8 1 8(f 1 f 0 ) 1 f 4 2 8

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

c n φ n (x), 0 < x < L, (1) n=1

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

The Regulated and Riemann Integrals

APPROXIMATE INTEGRATION

A NONLINEAR OPTIMIZATION PROCEDURE FOR GENERALIZED GAUSSIAN QUADRATURES

Journal of Inequalities in Pure and Applied Mathematics

f(x)dx . Show that there 1, 0 < x 1 does not exist a differentiable function g : [ 1, 1] R such that g (x) = f(x) for all

arxiv: v1 [math.ca] 11 Jul 2011

Transcription:

Lecture 14 Numericl integrtion: dvnced topics Weinn E 1,2 nd Tiejun Li 2 1 Deprtment of Mthemtics, Princeton University, weinn@princeton.edu 2 School of Mthemticl Sciences, Peking University, tieli@pku.edu.cn No.1 Science Building, 1575

Outline Motivtions Gussin qudrture Adptive qudrture

Gussin qudrture n b f(x) dx k=1 n A k f(x k ), How to obtin the mximl ccurcy with fixed number of node points n nd suitble choice of coefficients A k?

Adptive integrtion Adptive integrtion Adptive grid for numericl integrtion The informtion of the function itself must be tken into ccount.

Outline Motivtions Gussin qudrture Adptive qudrture

Interpolted integrtion I = b f(x)dx k=0 n A k f(x k ) = I N x k A k E n(f) = I(f) I N (f). f P n, E n(f) = 0, (1) I N (f) (2) I N (f) x 0, x 1,..., x n n

: m, f(x) = 1, x, x 2,..., x m, f(x) = x m+1, m. : b f(x)dx f( + b )(b ). 2 f(x) = 1, x, f(x) = x 2 1

n n + k : 0 k n + 1, I N (f) d = n + k (1) I N (f) (2) ω n(x) = n k=0 (x x k) b ωn(x)p(x)dx = 0, p P k 1. : Newton-Cotes n n n + 1

Guss n b f(x) dx k=1 n A k f(x k ), (1) b ρ(x)f(x) dx k=1 n A k f(x k ), (2) ρ(x) > 0. n, x k A k,.,, Guss. 2n 2n 1.

Guss, [, b] = [ 1, 1], b f(x) dx = b 2 1 1 ( + b f 2 + b ) 2 t dt. (3) 2n (n,n ), f(x) 1, x, x 2,..., x 2n 1,. ρ(x) 1, 2n n k=1 A k f(x k ) = 1 j + 1 (bj+1 j+1 ), j = 0, 1, 2,..., 2n 1.,!

Guss n = 1 1 f(x) dx = A1f(x1), f(x) = 1 f(x) = x 1 A 1 = 2, x 1 = 0. Guss. b f(x)dx f( + b )(b ). 2

Guss n = 2 1 f(x) dx = A1f(x1) + A2f(x2), f(x) = 1, f(x) = x, 1 f(x) = x 2, f(x) = x 3 A 1 + A 2 = 2, A 1x 1 + A 2x 2 = 0, A 1x 2 1 + A 2x 2 2 = 2, 3 A 1x 3 1 + A 2x 3 2 = 0. A 1 = A 2 = 1, x 1 = 1 3, x 2 = 1 3. Guss b f(x) dx b ( ( + b f 2 2 3. b ) ( + b 2 + f 3 2 + b )) 2. 3

Guss! : ρ(x) (, b), f,g C[, b], (f, g) = f g, b ρ(x)f(x)g(x)dx b f 2 = (f, f) = ρ(x)f(x)f(x)dx f 2, ρ(x). : f,g C[, b], (f, g) = b ρ(x)f(x)g(x)dx = 0

(, b) {ϕ 0(x), ϕ 1(x), ϕ 2(x),, }, b ρ(x)ϕ j(x)ϕ l (x)dx = 0, j l, (4) [, b] ρ(x)., Grm-Schmidt {1, x, x 2,..., x k,... } ϕ 0(x) = 1 j ϕ j+1(x) = x j+1 (x j+1, ϕ i(x)) ϕi(x), j = 0, 1,... (ϕ i(x), ϕ i(x)) i=0

(1)Legendre [, b] = [ 1, 1], ρ(x) 1, ϕ 0(x) = 1, ϕ 1(x) = x, ϕ k+1 (x) = 2k + 1 k + 1 xϕ k(x) k k + 1 ϕ k 1(x), k = 1, 2,... (2)Chebyshev [, b] = [ 1, 1], ρ(x) = 1/ 1 x 2 T 0(x) = 1, T 1(x) = x, T k+1 (x) = 2xT k (x) T k 1 (x), k = 1, 2,... (3)Lguerre [, b) = [0, + ), ρ(x) = exp ( x) Q 0(x) = 1, Q 1(x) = 1 x, Q k+1 (x) = (1 + 2k x)q k (x) k 2 Q k 1 (x), k = 1, 2,... Hermite.

Guss : [, b] n n. x j Guss. Guss-Legendre : [, b] = [ 1, 1],ρ(x) 1, x j n Legendre. n = 1 n = 2 n = 3 1 1 1 1 1 1 f(x) dx 2f(0) ( f(x) dx f 1 ) 3 3 f(x) dx 5 9 f (. Guss-Chebyshev 1 1 5 ( 1 3 ) + f ) f(x) 1 x 2 dx π n + 8 9 f(0) + 5 ( 9 f 3 ) 5 n f(x j) j=1 x j [ 1, 1] n Chebyshev T n(x) ( 2j 1 ) x j = cos 2n π

Guss Guss-Lguerre e x f(x) dx 0 j=1 n A jf(x j) x j (, 0] n Lguerre Q n(x). n = 2,Guss-Lguerre 0 e x f(x) dx 2 + 2 4. f(2 2) + 2 2 f(2 + 2) 4 : ρ(x) = 1 [, b] 1 n + 1 q n+1(x) f C 2n+2 [, b] Guss-Legendre E(f) = f (2n+2) (ξ) (2n + 2)! b (ω n(x)) 2 dx.

Outline Motivtions Gussin qudrture Adptive qudrture

Composite trpezoid rule Consider, for exmple, the generl composite trpezoid rule I N (f) = nd the error estimte N i=1 I(f) I N (f) = x i x i 1 [f(x i 1 + f(x i)] 2 N f (η i)(x i x i 1) 3 i=1 where the nodes x i re not necessrily eqully spced. The contribution 12 f (η i)(x i x i 1) 3, η i (x i 1, x i) 12 depends on both the size of f (x) on the intervl (x i 1, x i) nd the size of x i x i 1.

Adptive ide In those prts of the intervl of integrtion (, b) where f (x) is smll, we cn tke subintervls of lrge size, while in regions where f (x) is lrge, we cn tke subintervls of smll size. This equi-prtition policy of errors is best if the gol is to minimize the number of subintervls nd hence the number of function evlutions, necessry to clculte I(f) to given ccurcy.

Adptive qudrture Suppose the object is to compute n pproximtion P to the integrl I(f) = b f(x)dx such tht P I(f) ɛ nd to do this using s smll number of function evlutions s possible. Define I i(f) = x i+1 f(x)dx, nd x i S i = h (f(x i) + 4f(x i + h ) 6 2 ) + f(xi+1) S i = h (f(x i) + 4f(x i + h 12 4 ) + 2f(xi + h 2 ) + 4f(xi + 3h ) 4 ) + f(xi+1)

Adptive qudrture From error estimtes I i(f) S i = f (4) (η 1) ( h 90 2 )5 Assume η 1 = η 2, then thus Substitute it bck we hve I i(f) S i = 2f (4) (η 2) ( h 90 4 )5 S i S i = f (4) h 5 ( 1 2 4 ) 2 5 90 2 4 f (4) h 5 2 5 90 = 24 ( S i S i) 1 2 4 I i(f) S i = S i S i 1 2 4 = 1 15 ( S i S i)

Adptive qudrture So the principle of equiprtition of errors gives E i = 1 15 ( S i S i) nd the pproximte integrtion is tken s h b ɛ N P = S i Adptive qudrture essentilly consists of pplying the Simpson s rule to ech of the subintervls covering [, b] until the bove inequlity of equiprtition of errors is stisfied. If the inequlity is not stisfied, those subintervls must be further subdivided nd the entire process repeted. i=1

Adptive qudrture Exmple I(f) = nd the error ɛ = 0.0005. Sketch of function f(x) = x 1 0 xdx f(x) 0 1 The curve is very steep in the vicinity of 0 while it is firly flt s x 1.

Adptive qudrture Step 1: Divide the intervl [0, 1] into [0, 1 2 ] nd [ 1 2, 1]. S[ 1, 1] = 0.43093403 2 then S[ 1, 1] = 0.43096219 2 E[ 1 2, 1] = 1 15 ( S S) = 0.0000018775 < 1/2 (0.0005) = 0.00025 1 The error criterion is stisfied, we ccept the vlue S[ 1, 1]. 2 Step 2: Compute the integrl in [0, 1 2 ]: S[0, 1 2 ] = 0.22449223 nd S[0, 1 2 ] = 0.23211709 E[0, 1 2 ] = 0.00043499 > 0.00025 The error criterion is not stisfied, we must subdivide [0, 1 2 ] gin.

Adptive qudrture Step 3: Compute the integrl in [ 1, 1 ]: 4 2 S[ 1 4, 1 2 ] = 0.15235819 S[ 1 4, 1 2 ] = 0.15236814 nd E[ 1 4, 1 2 ] = 0.664 10 6 < 1/4 (0.0005) = 0.000125 1 The error criterion is stisfied, we ccept the vlue S[ 1, 1 ]. 4 2 Step 4: Compute the integrl in [0, 1 ]: 4 S[0, 1 4 ] = 0.07975890 S[0, 1 4 ] = 0.08206578 nd E[0, 1 4 ] > 1/4 (0.0005) = 0.000125 1 The error criterion is not stisfied, we must subdivide [0, 1 ] gin. 4

Adptive qudrture Step 5: We repet the procedure bove gin nd gin until ll of the subintervls stisfies the condition. The subintervls re [0, 1 8 ], [ 1 8, 1 4 ], [ 1 4, 1 2 ], [ 1 2, 1], So we hve the pproximte integrtion vlues P = i S i = 0.66621524 We hve I(f) = 2, so 3 P F (f) = 0.00045142 < 0.0005 The subroutine for dptive qudrture is very complicte in generl. But it is very useful for lrge scle computtions.