1 / 21

Numerical Integration

Numerical Integration. Section 4.6. Section outline. Why numerical integration? Trapezoidal rule Simpson’s rule Error analysis. Be able to…. Derive the Trapezoidal Rule formula Use the Trapezoidal Rule to approximate the area under a curve

saburo
Download Presentation

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 Section 4.6

  2. Section outline • Why numerical integration? • Trapezoidal rule • Simpson’s rule • Error analysis

  3. Be able to… • Derive the Trapezoidal Rule formula • Use the Trapezoidal Rule to approximate the area under a curve • Use Simpson’s rule to approximate the area under a curve • Analyze the error in using these integral approximations

  4. Why numerical integration? Some functions do not have antiderivatives that are elementary functions, or easily integrable. • For example: • In these cases the best we can do is use an approximation.

  5. Method 1: Using trapezoids to approximate area The area under this curve from a to bcan be approximated by 4 trapezoids

  6. Using trapezoids to approximate area Area of a general trapezoid Area of 1st Trapezoid: Area of ith Trapezoid:

  7. Sum of n trapezoids AREA =

  8. The Trapezoidal Rule Let f be continuous on the closed interval [a,b]. The Trapezoidal Rule for approximating is given by: Moreover, as n  ∞, the right-hand side approaches N.B! n MUST be an integer. Pattern of coefficients: 1, 2, 2, …, 2, 1.

  9. Applying the Rule Use the Trapezoidal rule to approximate Compare the results for n = 4 and n = 8.

  10. Applying the rule • When n = 4, , and you get:

  11. Applying the rule • When n = 4, , and you get:

  12. Method 2: Using parabolas to approximate the area • Thomas Simpson (1710 -- 1761) • Let f be continuous on [a,b]. To approximate the integral: N.B! n MUST be an even integer. Pattern of coefficients: 1, 4, 2, 4, … , 4, 1.

  13. Simpson’s Rule, applied Use Simpson’s Rule to approximate: Compare the results for n = 4 and n = 8

  14. Simpson’s Rule, applied • When n = 4:

  15. Simpson’s Rule, applied • When n = 8

  16. Error analysis for the Trapezoidal Rule If f has a continuous 2nd derivative on [a,b], then the error E in approximating by the Trapezoidal Rule is:

  17. Error analysis for Simpson’s Rule • …Moreover, if f has a continuous 4th derivative on [a, b], then the error E in approximating by Simpson’s Rule is:

  18. Example of error analysis • Determine a value of n such that the Trapezoidal Rule will approx. the value of w/an error < 0.01. • Let . Then,

  19. Example of error analysis • Find the maximum value of on [0,1]… • The maximum occurs at x = 0. • Therefore, the maximum value occurs at • Apply Theorem 4.19:

  20. Example of error analysis • E must be less than or equal to 1/100: Because n can only be an even number, where n is an even integer, will satisfy the conditions.

  21. Summary of techniques • Trapezoidal rule: • Using trapezoids to approximate area under a curve • Simpson’s rule: • Using parabolas to approximate the area under a curve • Error analysis: • Because Trapezoidal and Simpson’s rule are approximations, not exact answers

More Related