1 / 8

Numerical Integration

Numerical Integration. Romberg Extrapolation. Acceleration The term acceleration is a term sometimes used in numerical analysis that refers to how you can improve the results of an iterative algorithm by applying another algorithm to it.

roary-kirk
Télécharger la présentation

Numerical Integration

An Image/Link below is provided (as is) to download presentation Download Policy: Content on the Website is provided to you AS IS for your information and personal use and may not be sold / licensed / shared on other websites without getting consent from its author. Content is provided to you AS IS for your information and personal use only. Download presentation by click this link. While downloading, if for some reason you are not able to download a presentation, the publisher may have deleted the file from their server. During download, if you can't get a presentation, the file might be deleted by the publisher.

E N D

Presentation Transcript


  1. Numerical Integration Romberg Extrapolation

  2. Acceleration • The term acceleration is a term sometimes used in numerical analysis that refers to how you can improve the results of an iterative algorithm by applying another algorithm to it. • In the example we use here we can show how we can use the results of the trapezoid method to improve (give a more accurate estimate of the integral) how quickly it arrives at the answer in terms of the number of calculations that need to be performed. • The example of acceleration I will show you is called an extrapolation method (specific case of Richardson extrapolation). • Define a sequence of values Ai where: • A0 = Trapezoid method with 20=1 partition (i.e. ½(b-a)(f(a)+f(b)) • A1 = Trapezoid method with 21=2 partitions • A2 = Trapezoid method with 22=4 partitions • A3 = Trapezoid method with 23=8 partitions Each Ai calculation is considered an iteration.

  3. Extrapolation Methods In the first chapter we discussed acceleration techniques. An acceleration technique changed how you were calculating something to get an improved calculation method that was shorter and more accurate. An extrapolation method is a technique for getting a more accuracy from two previous step sizes. Romberg Integration Romberg Integration is an extrapolation of two results of the trapezoid method applied to a regular partition cut into subintervals of sizes that are consecutive powers of 2. We discussed this exact method when we talked about acceleration in the beginning of the course.

  4. The values for Romberg’s Method of integration can be arranged in a triangular matrix. The best possible estimate in each row is the right most entry: A0,B1,C1,D1,E1,F1 Since we will run out of letters after 26 rows we express this with R(i,j). The best possible estimate in each row is the right most entry: R(i,i)

  5. The R(i,j) can be obtained in the following way: R(i,0) is always the trapeziod method applied with a partition size of 2i. For the rest of them a triangular pattern exists as how you fill in the other entries.

  6. Example: Apply Romberg Extrapolation to the data to the right to get the best possible estimate for: The pattern that exists for the Romberg Entries is as follows: Note: This only applies for i>0 and j>0.

  7. Algorithm for Romberg Integration Method function intf( a, b, n) deltax = (b-a)/n xi = a + deltax intsum = f(a)+f(b) for(i=1,in, i++, intsum = intsum + 2f(xi) xi = xi + deltax) intf = (1/2)*deltax * intsum prevvals = {(1/2)(b-a)(f(a)+f(b))} for( i = 1, inumber of requested rows, i++, nextvals = {intf(a,b,2^i)} for( j = 1, j  i , j++ nextvals = Append[nextvals,(4^j*nextvalsj – prevvalsj)/(4^j-1)]) Print[nextvals] prevvals = nextvals) In this implementation of the Romberg Method of Integration the stopping condition is given by the number of rows of the triangular array you want to compute. This could use the standard Cauchy Error by taking as your sequence the last entry in the last row.

  8. Example Estimate the integral to the right with 3 rows of the Romberg Method of integration. Building the triangular matrix:

More Related