08 numerical integration

  • Published on
    28-Nov-2014

  • View
    1.259

  • Download
    0

Embed Size (px)

DESCRIPTION

 

Transcript

<ul><li> 1. Numerical Integration </li> <li> 2. Objectives <ul><li>The student should be able to </li></ul><ul><li><ul><li>Understand the need for numerical integration </li></ul></li></ul><ul><li><ul><li>Derive the trapezoidal rule using linear interpolation </li></ul></li></ul><ul><li><ul><li>Apply the trapezoidal rule </li></ul></li></ul><ul><li><ul><li>Derive Simpsons rule using parabolic interpolation </li></ul></li></ul><ul><li><ul><li>Apply Simpsons rule </li></ul></li></ul></li> <li> 3. Need for Numerical Integration! </li> <li> 4. Interpolation! <ul><li>If we have a function that needs to be integrated between two points </li></ul><ul><li>We may use an approximate form of the function to integrate! </li></ul><ul><li>Polynomials are always integrable </li></ul><ul><li>Why dont we use a polynomial to approximate the function, then evaluate the integral </li></ul></li> <li> 5. Example <ul><li>To perform the definite integration of the function between (x 0 &amp; x 1 ), we may interpolate the function between the two points as a line. </li></ul></li> <li> 6. Example <ul><li>Performing the integration on the approximate function: </li></ul></li> <li> 7. Example <ul><li>Performing the integration on the approximate function: </li></ul><ul><li>Which is equivalent to the area of the trapezium! </li></ul></li> <li> 8. The Trapezoidal Rule Integrating from x 0 to x 2 : </li> <li> 9. General Trapezoidal Rule <ul><li>For all the points equally separated (x i+1 -x i =h) </li></ul><ul><li>We may write the equation of the previous slide: </li></ul></li> <li> 10. In general Where n is the number if intervals and h=total interval/n </li> <li> 11. Example <ul><li>Integrate </li></ul><ul><li>Using the trapezoidal rule </li></ul><ul><li>Use 2 points and compare with the result using 3 points </li></ul></li> <li> 12. Solution <ul><li>Using 2 points (n=1), h=(1-0)/(1)=1 </li></ul><ul><li>Substituting: </li></ul></li> <li> 13. Solution <ul><li>Using 3 points (n=2), h=(1-0)/(2)=0.5 </li></ul><ul><li>Substituting: </li></ul></li> <li> 14. Quadratic Interpolation <ul><li>If we get to interpolate a quadratic equation between every neighboring 3 points, we may use Newtons interpolation formula: </li></ul></li> <li> 15. Integrating </li> <li> 16. After substitutions and manipulation! </li> <li> 17. For 4-Intervals </li> <li> 18. In General: Simpsons Rule NOTE: the number of intervals HAS TO BE even </li> <li> 19. Example <ul><li>Integrate </li></ul><ul><li>Using the Simpson rule </li></ul><ul><li>Use 3 points </li></ul></li> <li> 20. Solution <ul><li>Using 3 points (n=2), h=(1-0)/(2)=0.5 </li></ul><ul><li>Substituting: </li></ul><ul><li>Which is the exact solution! </li></ul></li> <li> 21. Homework #7 <ul><li>Chapter 21, pp. 610-612, numbers: 21.1, 21.3, 21.5, 21.25, 21.28. </li></ul><ul><li>Due date: Week 8-12 May 2005 </li></ul></li> </ul>