4 numerical quadrature where analytical abilities end
play

4. Numerical Quadrature Where analytical abilities end . . . 4. - PowerPoint PPT Presentation

Preliminary Remarks Simple and Composite Rules Extrapolation Other Approaches Applications of Quadrature 4. Numerical Quadrature Where analytical abilities end . . . 4. Numerical Quadrature Numerical Programming I (for CSE), Hans-Joachim


  1. Preliminary Remarks Simple and Composite Rules Extrapolation Other Approaches Applications of Quadrature 4. Numerical Quadrature Where analytical abilities end . . . 4. Numerical Quadrature Numerical Programming I (for CSE), Hans-Joachim Bungartz page 1 of 32

  2. Preliminary Remarks Simple and Composite Rules Extrapolation Other Approaches Applications of Quadrature 4.1. Preliminary Remarks The Integration Problem • Numerical quadrature denotes numerical computation of a definite integral of the kind Z I ( f ) := f ( x )d x Ω to a given function f : R d ⊇ Ω → R , the integrand , and a given integration domain Ω . • In the following, we will deal solely with univariate quadrature, i.e. with the case d = 1 of an interval Ω = [ a, b ] . Of course, the big challenge is the higher dimensional case of multivariate quadrature. Especially the high dimensional case of d = 100 (occuring in statistics, physics, and in mathematical finance), or even higher dimensions demands sophisticated numerical methods. • Numerical quadrature should only be used when all other methods such as closed integration using substitution or partial integration or splitting into sums of integrals between discontinuous points of f or a derivation of f etc. fail. • Most methods of numerical quadrature demand a sufficient smoothness (differentiability) of the integrand. 4. Numerical Quadrature Numerical Programming I (for CSE), Hans-Joachim Bungartz page 2 of 32

  3. Preliminary Remarks Simple and Composite Rules Extrapolation Other Approaches Applications of Quadrature • Almost all rules of quadrature , i.e. instructions for numerical quadrature, can be written as weighted sums of function values (samples) : n n X X I ( f ) ≈ Q ( f ) := g i f ( x i ) =: g i y i i =0 i =0 with weights g i and pairwise different nodes x i , where a ≤ x 0 < x 1 < ... < x n − 1 < x n ≤ b . • As the evaluation of the integrand is often an expensive issue (especially when f is only given implicitly: for example, in some applications, a differential equation has to be solved every time to be able to evaluate f at a point x ), one is interested in rules that allow a high accuracy (a small error of quadrature ) with moderate n . 4. Numerical Quadrature Numerical Programming I (for CSE), Hans-Joachim Bungartz page 3 of 32

  4. Preliminary Remarks Simple and Composite Rules Extrapolation Other Approaches Applications of Quadrature Exact Integration of a Polynomial Interpolant • How do we get appropriate rules of quadrature? The standard ansatz is to replace the integrand f by an approximation ˜ f that is both easy to construct and easy to integrate which will then be integrated exactly , thus Z b ˜ Q ( f ) := f ( x )d x . a • For reasons of simplicity, a polynomial interpolant p ( x ) of f ( x ) to the nodes x i is chosen as approximant ˜ f . In this case, the representation of p ( x ) via the Lagrange polynomials L i ( x ) of degree n delivers the weights g i virtually free of cost: Z b Z b Z b n n „ « X X Q ( f ) := p ( x )d x = y i L i ( x )d x = y i · L i ( x )d x , a a a i =0 i =0 with which the weights g i are directly defined by Z b g i := L i ( x )d x a The integrals of Lagrange polynomials can obviously be calculated in advance – although they depend on the chosen grid (the nodes), they do not depend on the integrand f . 4. Numerical Quadrature Numerical Programming I (for CSE), Hans-Joachim Bungartz page 4 of 32

  5. Preliminary Remarks Simple and Composite Rules Extrapolation Other Approaches Applications of Quadrature • Because of the uniqueness of the interpolation problem (which polynomial interpolant of degree less or equal to n interpolates the n + 1 points ( x i , 1) , i = 0 , ..., n ?), we have n X L i ( x ) ≡ 1 i =0 and therefore also Z b Z b n n X X g i = L i ( x )d x = 1d x = b − a . a a i =0 i =0 That means that the sum of the weights is always equal to b − a when a polynomial interpolant is used for quadrature. 4. Numerical Quadrature Numerical Programming I (for CSE), Hans-Joachim Bungartz page 5 of 32

  6. Preliminary Remarks Simple and Composite Rules Extrapolation Other Approaches Applications of Quadrature About the Condition of Numerical Quadrature • How is the problem of numerical quadrature conditioned? Particularly, are there any requirements for the weights g i to ensure a good condition? – To answer this question, we examine small changes δy i in the input data – the nodes y i = f ( x i ) – as well as their effect on the approximation value of the integral. – If all input fluctuations are less or equal ε , we have for a change δQ ( f ) of the approximation value ˛ n ˛ n ˛ ˛ X X | δQ ( f ) | = g i δy i ˛ ≤ ε · | g i | . ˛ ˛ ˛ ˛ ˛ i =0 i =0 – If all weights g i are positive, then the sum on the right hand side takes its minimal value b − a and the entire right hand side is of order of magnitude of O ( ε ) . Thus, in this case, the quadrature problem is well-conditioned. – If, in contrast, negative weights occur, then the sum on the right hand side of the estimation above might become very big – and with it the upper bound of δQ ( f ) . In case of negative weights, the problem of quadrature can be ill-conditioned. 4. Numerical Quadrature Numerical Programming I (for CSE), Hans-Joachim Bungartz page 6 of 32

  7. Preliminary Remarks Simple and Composite Rules Extrapolation Other Approaches Applications of Quadrature – As we will see in the following section, this demand for positivity of the weights is an exclusion criterion for the integration via the polynomial interpolant in case of big n . As we have already seen at polynomial interpolation, polynomials of high degree are problematic. 4. Numerical Quadrature Numerical Programming I (for CSE), Hans-Joachim Bungartz page 7 of 32

  8. Preliminary Remarks Simple and Composite Rules Extrapolation Other Approaches Applications of Quadrature 4.2. Simple and Composite Rules The Rectangle Rule • In the following, we will introduce some of the most important rules of quadrature. We distinguish between simple and composite quadrature rules: – A simple rule deals with the whole integration domain [ a, b ] in one go. For its length, we will use the denotation H := b − a . – A composite rule splits the integration domain into subdomains, applies simple rules there, and forms the total approximation by summing up. This procedure is very similar to the spline interpolation of chapter 3. • The simplest simple rule is the rectangle rule „ a + b « Q R ( f ) := H · f = I ( p 0 ) , 2 where p 0 denotes the polynomial interpolant of f of degree 0 with the only node x 0 := ( a + b ) / 2 – For the remainder R R ( f ) := Q R ( f ) − I ( f ) , the relation R R ( f ) := − H 3 · f (2) ( ξ ) 24 can be shown for an intermediate point ξ ∈ ] a, b [ , if f is twice continuously differentiable on ] a, b [ . 4. Numerical Quadrature Numerical Programming I (for CSE), Hans-Joachim Bungartz page 8 of 32

  9. Preliminary Remarks Simple and Composite Rules Extrapolation Other Approaches Applications of Quadrature – From this relation of the remainder, we first learn that polynomials of degree 0 or 1 are integrated exactly . That might surprise at first glance as only a constant interpolant is used. However, in the linear case, the quadrature errors left and right to the centre point of the interval cancel each other. – Second, we see via the H -Terms what has already been clear geometrically: On a small integration interval, the error is asymptotically smaller as well. However, for now, we only examine constant integration domains for the simple rules. 4. Numerical Quadrature Numerical Programming I (for CSE), Hans-Joachim Bungartz page 9 of 32

  10. Preliminary Remarks Simple and Composite Rules Extrapolation Other Approaches Applications of Quadrature The Trapezoidal Rule • If we use the linear polynomial interpolant p 1 instead of the constant polynomial interpolant p 0 , we get the trapezoidal rule : Q T ( f ) := H · f ( a ) + f ( b ) = I ( p 1 ) . 2 – Here, the linear interpolant to the two interval bounds x 0 := a and x 1 := b is integrated exactly. – For the remainder, it can be shown (again without proof) R T ( f ) = H 3 · f (2) ( ξ ) , 12 where ξ again identifies an intermediate point in the interior of the integration domain. – At first glance, the trapezoidal rule might seem hardly helpful: We invest twice as much as before (two function evaluations), but only get a result of comparable quality because the integration errors left and right to the centre point of the interval do not cancel each other in case of a quadratic interpolant. The justification of the trapezoidal rule lies in its superb eligibility as starting point for composite methods. • The maximal polynomial degree that can be treated exactly by a quadrature rule is called degree of accuracy or shortly accuracy of the method. Thus, the rectangle rule as well as the trapezoidal rule have accuracy 1. 4. Numerical Quadrature Numerical Programming I (for CSE), Hans-Joachim Bungartz page 10 of 32

Download Presentation
Download Policy: The content available on the website is offered to you 'AS IS' for your personal information and use only. It cannot be commercialized, licensed, or distributed on other websites without prior consent from the author. To download a presentation, simply click this link. If you encounter any difficulties during the download process, it's possible that the publisher has removed the file from their server.

Recommend


More recommend