12.07.2015 Views

COPYRIGHT 2008, PRINCETON UNIVERSITY PRESS

COPYRIGHT 2008, PRINCETON UNIVERSITY PRESS

COPYRIGHT 2008, PRINCETON UNIVERSITY PRESS

SHOW MORE
SHOW LESS
  • No tags were found...

Create successful ePaper yourself

Turn your PDF publications into a flip-book with our unique Google optimized e-Paper software.

126 chapter 6f(x)f(x)parabola 1parabola 2trap 1trap 2trap 3trap 4axbaxbFigure 6.2 Right: Straight-line sections used for the trapezoid rule. Left: Two parabolas used inSimpson’s rule.You will notice that because the internal points are counted twice (as the end ofone interval and as the beginning of the next), they have weights of h/2+h/2=h,whereas the endpoints are counted just once and on that account have weights ofonly h/2. In terms of our standard integration rule (6.32), we have{ }hw i =2 ,h,...,h,h 2(trapezoid rule). (6.10)In Listing 6.1 we provide a simple implementation of the trapezoid rule.6.2.2 Algorithm: Simpson’s RuleFor each interval, Simpson’s rule approximates the integrand f(x) by a parabola(Figure 6.2 right):f(x) ≃ αx 2 + βx+ γ, (6.11)TABLE 6.1Elementary Weights for Uniform-Step Integration RulesName Degree Elementary WeightsTrapezoid 1 (1, 1) h 2Simpson’s 2 (1, 4, 1) h 3383 (1, 3, 3, 1) 3 h 8Milne 4 (14, 64, 24, 64, 14) h 45−101<strong>COPYRIGHT</strong> <strong>2008</strong>, PRINCET O N UNIVE R S I T Y P R E S SEVALUATION COPY ONLY. NOT FOR USE IN COURSES.ALLpup_06.04 — <strong>2008</strong>/2/15 — Page 126

Hooray! Your file is uploaded and ready to be published.

Saved successfully!

Ooh no, something went wrong!