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

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

Lecture 14: Quadrature

Math& 152 Section Integration by Parts

Interpolation. Gaussian Quadrature. September 25, 2011

Discrete Least-squares Approximations

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

Construction of Gauss Quadrature Rules

DOING PHYSICS WITH MATLAB MATHEMATICAL ROUTINES

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

Orthogonal Polynomials

Orthogonal Polynomials and Least-Squares Approximations to Functions

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

Theoretical foundations of Gaussian quadrature

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

1 The Lagrange interpolation formula

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

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

COT4501 Spring Homework VII

Definite integral. Mathematics FRDIS MENDELU

Numerical integration

Abstract inner product spaces

Numerical Integration

Review of Gaussian Quadrature method

Numerical quadrature based on interpolating functions: A MATLAB implementation

Review of Calculus, cont d

INTRODUCTION TO INTEGRATION

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

Best Approximation. Chapter The General Case

Lecture 12: Numerical Quadrature

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

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

Lecture 14 Numerical integration: advanced topics

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

P 3 (x) = f(0) + f (0)x + f (0) 2. x 2 + f (0) . In the problem set, you are asked to show, in general, the n th order term is a n = f (n) (0)

New Expansion and Infinite Series

Numerical Analysis: Trapezoidal and Simpson s Rule

Numerical Methods I Orthogonal Polynomials

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

Riemann Sums and Riemann Integrals

Chapter 3 Polynomials

Riemann Sums and Riemann Integrals

3.4 Numerical integration

Lecture 20: Numerical Integration III

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

Section 6.1 Definite Integral

Lecture 19: Continuous Least Squares Approximation

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

Numerical Integration

PHYSICS 116C Homework 4 Solutions

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

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

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

NUMERICAL INTEGRATION

The Regulated and Riemann Integrals

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

Sections 5.2: The Definite Integral

B.Sc. in Mathematics (Ordinary)

Lecture 4: Piecewise Cubic Interpolation

x = b a n x 2 e x dx. cdx = c(b a), where c is any constant. a b

Chapter 7 Notes, Stewart 8e. 7.1 Integration by Parts Trigonometric Integrals Evaluating sin m x cos n (x) dx...

Best Approximation in the 2-norm

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

1 The Riemann Integral

APPROXIMATE INTEGRATION

Physics 116C Solution of inhomogeneous ordinary differential equations using Green s functions

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

The Riemann Integral

7.2 The Definite Integral

Lecture Notes: Orthogonal Polynomials, Gaussian Quadrature, and Integral Equations

Numerical Integration

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

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

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

Numerical Analysis. Doron Levy. Department of Mathematics Stanford University

Matrices, Moments and Quadrature, cont d

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

1 1D heat and wave equations on a finite interval

Calculus of Variations

MA 124 January 18, Derivatives are. Integrals are.

Integrals - Motivation

Chapter 3 Solving Nonlinear Equations

THE EXISTENCE-UNIQUENESS THEOREM FOR FIRST-ORDER DIFFERENTIAL EQUATIONS.

Lab 11 Approximate Integration

Section 4.8. D v(t j 1 ) t. (4.8.1) j=1

Fundamental Theorem of Calculus

Math 100 Review Sheet

2

5.7 Improper Integrals

4.4 Areas, Integrals and Antiderivatives

We partition C into n small arcs by forming a partition of [a, b] by picking s i as follows: a = s 0 < s 1 < < s n = b.

Indefinite Integral. Chapter Integration - reverse of differentiation

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

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

Math 520 Final Exam Topic Outline Sections 1 3 (Xiao/Dumas/Liaw) Spring 2008

221B Lecture Notes WKB Method

ODE: Existence and Uniqueness of a Solution

Section 5.4 Fundamental Theorem of Calculus 2 Lectures. Dr. Abdulla Eid. College of Science. MATHS 101: Calculus 1

QUADRATURE is an old-fashioned word that refers to

a < a+ x < a+2 x < < a+n x = b, n A i n f(x i ) x. i=1 i=1

Review on Integration (Secs ) Review: Sec Origins of Calculus. Riemann Sums. New functions from old ones.

Transcription:

Lecture notes on Vritionl nd Approximte Methods in Applied Mthemtics - A Peirce UBC Lecture 6: Singulr Integrls, Open Qudrture rules, nd Guss Qudrture (Compiled 6 August 7) In this lecture we discuss the evlution of singulr integrls using so-clled open qudrture formule. We lso discuss vrious techniques to obtin more ccurte pproximtions to singulr integrls such s subtrcting out the singulrity nd trnsformtions to non singulr integrls. We next introduce Guss Integrtion, which exploits the orthogonlity properties of orthogonl polynomils in order to obtin integrtion rules tht cn integrte polynomil of degree N exctly using only N smple points. We lso discuss integrtion on infinite integrls nd dptive integrtion. Key Concepts: Singulr Integrls, Open Newton-Cotes Formule, Guss Integrtion. 6 Singulr Integrls, Open Qudrture rules, nd Guss Qudrture Consider evluting singulr integrls of the form I 6. Integrting functions with singulrities e x x/ We cnnot just use the trpezoidl rule in this cse s f. Insted we use wht re clled open integrtion formule tht do not use the endpoints in the numericl pproximtion of the integrls. 6.. Open Newton-Cotes formule The Midpoint rule x +h/ x h/ f(x) f(x ) + (x x )f (x ) + (x x ) f (x ) + x +h/ f(x) f + (x x )f + (x x ) f (ξ) x h/ hf + h/ h/ hf + s 6 sf + s f (ξ) dξ h/ f (ξ) hf + h 8 f (ξ) hf + h 4 f (ξ)

x x x N The Composite Midpoint rule For cell x k +h/ x k h/ I f(x) h h h h f(x) hf(x k ) + h 4 f (x k ) Open Newton-Cotes Formule: x x k +h/ x k h/ h/ h/ h/ h/ f(x) f(x k + s)ds f(x k ) + sf (x k ) + s f (x k ) + ds f(x k ) + f(x k ) + h 4 f (x k ) h f (x k ) f(x k ) + h f (x) 4 f(x k ) + h 4 {f (b) f ()} (h) f(x) hf + 4 f (ξ) MidpointRule ξ (x, x ) x x x f(x) x 4 x f(x) h (f + f ) + h 4 f () (ξ) ξ (x, x ) 4h (f f + f ) + 8h5 9 f (4) (ξ) ξ (x, x 4 )

Numericl Integrtion 6.. Chnge of vrible (Eg.) I (Eg. ) I x /n f(x) n f(t n ) t nt n dt let t x /n x t n nt n dt I n (Eg. ) I π π/ f(t n )t n dt which is proper integrl for n f(x) x cos t sin t dt ( x ) / f(cos t) dt proper f(x) [x( x)] / x sin t sin t cos t dt f(sin t) sin t cos t dt sin t cos t π/ f(sin t)dt. 6.. Subtrcting the singulrity Consider evluting the integrl I e x x/ We note tht close to the singulr point x in the integrnd, the numertor cn be expnded bout the singulr point in the Tylor series: e x + x + x! I + +.... We now choose to rerrnge the integrnd s follows e x (e x ) + x/ x/ x / e x x / Using this decomposition we cn thus evlute the singulr prt nlyticlly nd the non-singulr prt numericlly. We cn expect to obtin more ccurte result thn simply using n open integrtion formul nd ignoring the singulrity. Since the ccurcy of the midpoint rule, for exmple, depends on the second derivtive of the integrnd (e x ), we cnnot expect even the midpoint rule to chieve its theoreticl rte of convergence for this integrl. To x /

4 retrieve the O(h ) ccurcy of the Midpoint rule we need to subtrct t lest three terms s follows: I + e x x/ + x/ 4 5 + x + x/ + 5 x / x / e x x x / + x/ x / + e x x x / x / e x x x / x / In figure we plot the errors obtined when the midpoint rule is used directly s well s the errors when nd terms re subtrcted from the integrnd. The second order ccurcy only returns when terms re removed so tht g is bounded on [, ], where g(x) ex x x / x /. Error(h) Midpoint Errors O(h p / ) in evluting exp(x)/x 4 Direct p.5 term p. terms p 6 h Figure. Plots of the errors vs h when the midpoint rule is used directly, nd when nd terms re removed

Numericl Integrtion 5 6. Guss Qudrture 6.. Orthogonl polynomils There exist fmilies of polynomil functions {ϕ n (x)} n over n intervl [, b] with weight w(x) : i.e.: ech of which re orthogonl with respect to integrtion ϕ m (x)ϕ n (x)w(x) δ mn C n. Eg. () Legendre Polynomils: {P n (x)} ; [, b] [, ]; w(x). In generl P n (x) cn be constructed by the recursion: P (x), P (x) x, P (x) (x ),... P n (x) n xp n (x) n (n ) P n (x). n ODE: ( x )y xy + (n + )ny ; y P n (x) Eg. () Lguerre Polynomils: {L n (x)}; [, b) [, ); w(x) e x L (x) ; L (x) x, L (x) 4x + x,... Recursion reltion: L n (x) (n x )L n (x) (n ) L n (x). ODE: xy + ( x)y + ny ; y L n (x). Eg. () Chebyshev Polynomils: {T n (x)}, [, b] [, ], w(x) / x Definition: T n (x) cos nθ where θ cos x. T (x), T (x) x, T (x) cos θ cos θ x,... The recursion reltion follows from the identity: cos nθ cos θ cos(n )θ cos(n ) T n (x) xt n (x) T n (x) ODE: ( x )y xy + n y y T n (x)

6 Hermite Polynomils: {H n (x)} (, b) (, ) w(x) e x H (x), H (x) x, H (x) 4x,... Recursion: H n (x) xh n (x) (n )H n (x) ODE: y xy + ny y H n (x). 6.. Expnsion of n rbitrry polynomil in terms of orthogonl polynomils Let q k (x) α + α x + + α k x k be ny polynomil of degree k. Then since the orthogonl polynomils {ϕ j (x)} re linerly independent, we cn lso express q k (x) s liner combintion of {ϕ j (x)}, j,..., k s follows: q k (x) α + α x + + α k x k β ϕ + β ϕ + + β k ϕ k. ( ) Exmple: Expnd q (x) x + x in terms of Legendre Polynomils P k (x) q (x) x + x in terms of Legendre polynomils β + β x + β (x ) ( β β ) + β x + β x β β 4 β β + β 5 q (x) 5 P (x) + P (x) 4 P (x) 6.. ϕ n (x) is orthogonl w.r.t the weight w(x) to ll lower degree polynomils q k (x), k,..., n The fct tht ny polynomil q k (x) cn be expnded s liner combintion of orthogonl polynomils {ϕ j (x)} k j up to degree k, s ws shown in the expnsion ( ), implies tht n orthogonl polynomil ϕ n (x) is orthogonl with respect to the weight w(x) to ny polynomil of lower degree thn n. In other words, if {q k (x)} n k polynomils of degrees k,..., n, then w(x)ϕ n (x)q k (x) for k,..., n re ny

Numericl Integrtion 7 To see this, consider ny kth degree polynomil q k (x) nd use use the expnsion ( ) to write w(x)ϕ n (x)q k (x) k m w(x)ϕ n (x) β k m k β k ϕ m (x) w(x)ϕ n (x)ϕ m (x) The ltter integrls vnish becuse of the orthogonlity of polynomils of distinct degree with respect to the weight w(x). Ide behind Guss Qudrture: We ssume tht the pproximtion of 6. Guss-Legendre qudrture f(x) is given by: f(x) w i f(x i ) where the w i re weights given to the function vlues f(x i ). If we regrd the x i s free then cn we do better by choosing these x i ppropritely? Shift to the intervl [, ] : There is no loss of generlity in ssuming tht [, b] [, ] since the chnge of vribles x [, b] to t [, ]: will reduce the integrl to x t(b ) i + F (t)dt where F (t) (b ) f(x(t)) ( + b) Let us pproximte f on [, ] by polynomil of degree M nd integrte the resulting polynomil. The error involved is of the form: f(x) M p M (x) + f (M) (ξ) M! f k M f k w k + l k (x) + (x x )... (x x M ) f[x,..., x M, x](x x )... (x x M ) f[x,..., x M, x](x x )... (x x M ) where l k (x) nd w k This formul will be exct if f is polynomil of degree M since then P M (x) f(x). M (x x j )/x k x j ) j j k l k (x).

8 Now let M N nd choose x,..., x N to be the zeros of the Legendre polynomil P N (x) of degree N. In this cse, ll the weights w k for k N + s cn be seen from the clcultion or w k f(x) C k C k l k (x) P N (x)q k,n (x) P N (x) ( N {}}{{}}{ (x x )... (x x N ) (x x N+ )... (x x k )(x x k+ )... (x x M ) k N + (x k x )... (x k x N+ )... (x k x M ) S β S P S (x) no mtter where we choose the x N+,..., x N. f(x) f k w k + f (N) (ξ) (N)! f k w k + f (N) (ξ) (N)! ) (x x )... (x x N ) C N [P N (x)] f k w k + N+ (N!) 4 (N + )[(N)!] f (N) (ξ). Thus for only N points we cn integrte polynomil of degree N exctly. For rbitrrily chosen smple points {x k }, we would hve required N points to chieve the sme ccurcy. Expressions for the bscisse nd the weights The {x k } N re the zeros of the Legendre polynomil of degree N. The weights w k ( x k ) (N + ) [P N+ (x k )] m x k w k ±.577569 /.8 8 8/9. ±.774596669 5.5 5 5/9

Numericl Integrtion 9 6.. Generting the coefficients nd weights using the method of undetermined coefficients N: This qudrture rule must integrte polynomil of degree exctly + x + x + x + w f(x ) + w f(x ) w w x x w ( + x ) w x x N: This qudrture rule must integrte polynomil of degree 5 exctly. + x + x + x + 4 x 4 + 5 x 5 + + 5 4 w ( + x + 4 x 4 ) + w w + w w x w x 4 5 x 5 / 5 x 5 w 5 w 5 9.5 9 + w w 8 9

Exmple: Evlute I sin πx We mke use of the trnsformtion of vribles x t( ) + t+ t x I sin πx.666977 ( + t) sin π dt ( ) sin π π cos.66959 + sin π ( + ) Compre this result with the trpezium rule using two function evlutions, which yields.5. Now using three point Guss-Legendre formul: I N 5 9. sin π ) π + 4 5 9 5 9 cos (.676877 5 + 8 9 sin π + 5 9 sin + 5 6.. Other Guss-Qudrture formule ) Hermite-Guss: w(x) e x (, b) (, ) e x f(x) w k f(x k ) + N! π N (N)! f (N) (ξ) w k N+ N! π [H N+ (x k )] m x k w k ±.777.8867..866 ±.4745.9549

) Chebyshev-Guss Qudrture: w(x) ( x ) [, b] [, ]. Numericl Integrtion f(x) N π w k f(x k ) + x N (N)! f (N) (ξ) w k π T N (x k)t N+ (x k ) π N (weights re ll equl). 6.4 Integrting Functions on Infinite Intervls Consider evluting integrls of the form If f(x) x p s x then exists only if p >. I f(x) x p x p p 6.4. Truncte the Infinite Intervl c I f(x) + f(x) c I + I Use the symptotic behviour of f to determine how lrge c should be for I < ϵ/ I c Eg. cos xe x cos xe x c ln(ϵ/) 8.4 OR use n symptotic pproximtion for I. Evlute I using the stndrd integrtion rules. c e x e c ϵ 8

6.4. Mp to Finite Intervl I Choose the mp such tht x p dt f(x) where f(x) x x p Eg. p : x p x t t dt I x t f(x) Now s t f ( ) ( ) t t t so integrnd is finite OR t e x x ln t f f(x) ( ) dt t t f( ln t) t OR [, ) [, S] [S, ) nd on [, S] set t x/s on [S, ) set t S/x dt 6.4. Specilized Guss integrtion rules for infinite intervls () Guss-Lguerre Integrtion: (, ) w e x e x f(x) g(x) (b) Guss-Hermite integrtion: (, ) w e x e x f(x) w k f(ξ k ) e x ( e x g(x) ) }{{} f(x) w k f(ξ k )

Numericl Integrtion 6.5 Adptive Integrtion 6.5. Adptive Simpson Integrtion I() h [f + 4f + f 5 ] h5 }{{} 9 f (4) (ξ) S (h) f f f f 4 f 5 h I() (h/) {[f + 4f + f + 4f 4 + f 5 ]} (h/)5 } {{} 9 S 4 (h) Assume f (4) (ξ) f (4) (ξ ) f (4) (ξ) pproximtely constnt. Substrct { } f (4) (ξ ) + f (4) (ξ ) S S 4 h5 9 f (4) (ξ) [ ] 5 5 ( ) h 5 6 9 f (4) (ξ) h 5 9 f (4) (ξ) 6 5 (S S 4 ) I() S 4 h5 9 f (4) (ξ) ( 4 ) 5 S S 4 I, I 4 is 5 S S 4 < TOL S 4 YES DONE NO is ( ) ( ) h h 5 S S 4 < TOL 6.5. The Best of Both Worlds Guss-Ptterson Integrtion Guss Qudrture Rules obtin the highest ccurcy for the lest number of function evlutions. x x x x Newton-Cotes Formule llow for utomtic nd dptive integrtion rules becuse the regulr grid llows one to use ll previous function evlutions towrd subsequent refinements - the dptive Trpezium rule is n exmple of this. The Guss-Ptterson integrtion rules llow one to build higher order integrtion schemes which mke use of previous function evlutions in subsequent clcultions. These rules hve the ttrctive high order ccurcy typicl of Guss qudrture rules. This is idel for dptive integrtion. Ptterson, T.N.L. 968, The Optimum Addition of Points T Qudrture Formuls, Mth. Comp.,, p. 847 856.