1 / 97

NUMERICAL INTEGRATION AND DIFFERENTIATION Student Notes

NUMERICAL INTEGRATION AND DIFFERENTIATION Student Notes. ENGR 351 Numerical Methods for Engineers Southern Illinois University Carbondale College of Engineering Dr. L.R. Chevalier Dr. B.A. DeVantier. Specific Study Objectives. Understand the derivation of the Newton-Cotes formulas

yoshi
Télécharger la présentation

NUMERICAL INTEGRATION AND DIFFERENTIATION Student Notes

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 AND DIFFERENTIATION Student Notes ENGR 351 Numerical Methods for Engineers Southern Illinois University Carbondale College of Engineering Dr. L.R. Chevalier Dr. B.A. DeVantier

  2. Specific Study Objectives • Understand the derivation of the Newton-Cotes formulas • Recognize that the trapezoidal and Simpson’s 1/3 and 3/8 rules represent the areas of 1st, 2nd, and 3rd order polynomials • Be able to choose the “best” among these formulas for any particular problem

  3. Specific Study Objectives • Recognize the difference between open and closed integration formulas • Understand the theoretical basis of Richardson extrapolation and how it is applied • Recognize why both Romberg integration and Gauss quadrature have utility when integrating equations (as opposed to tabular or discrete data)

  4. Specific Study Objectives • Understand basic finite difference approximations • Understand the application of high-accuracy numerical-differentiation • Recognize data error on the processes of integration and differentiation

  5. Numerical Differentiation and Integration • Calculus is the mathematics of change. • Engineers must continuously deal with systems and processes that change, making calculus an essential tool of our profession. • At the heart of calculus are the related mathematical concepts of differentiation and integration.

  6. Differentiation • Dictionary definition of differentiate - “to mark off by differences, distinguish; ..to perceive the difference in or between” • Mathematical definition of derivative - rate of change of a dependent variable with respect to an independent variable

  7. f(x) Dy Dx x

  8. Integration • The inverse process of differentiation • Dictionary definition of integrate - “to bring together, as parts, into a whole; to unite; to indicate the total amount” • Mathematically, it is the total value or summation of f(x)dx over a range of x. In fact the integration symbol is actually a stylized capital S intended to signify the connection between integration and summation.

  9. f(x) a b x

  10. Mathematical Background

  11. Mathematical Background

  12. Overview • Newton-Cotes Integration Formulas • Trapezoidal rule • Simpson’s Rules • Unequal Segments • Open Integration • Integration of Equations • Romberg Integration • Gauss Quadrature • Improper Integrals

  13. Overview • Numerical Differentiation • High accuracy formulas • Richardson’s extrapolation • Unequal spaced data • Uncertain data • Applied problems

  14. Newton-Cotes Integration • Common numerical integration scheme • Based on the strategy of replacing a complicated function or tabulated data with some approximating function that is easy to integrate

  15. The approximation of an integral by the area under - a first order polynomial - a second order polynomial We can also approximated the integral by using a series of polynomials applied piece wise.

  16. An approximation of an integral by the area under straight line segments.

  17. Newton-Cotes Formulas • Closed form - data is at the beginning and end of the limits of integration • Open form - integration limits extend beyond the range of data.

  18. Trapezoidal Rule • First of the Newton-Cotes closed integration formulas • Corresponds to the case where the polynomial is a first order

  19. Trapezoidal Rule A straight line can be represented as:

  20. Trapezoidal Rule Integrate this equation. Results in the trapezoidal rule.

  21. Trapezoidal Rule Recall the formula for computing the area of a trapezoid: (height)(average of the bases) base height base

  22. Trapezoidal Rule The concept is the same but the trapezoid is on its side. base height height height width base

  23. Error of the Trapezoidal Rule This indicates that is the function being integrated is linear, the trapezoidal rule will be exact. Otherwise, for section with second and higher order derivatives (that is with curvature) error can occur. A reasonable estimate ofx is the average value of b and a Guide to pronouncing Greek letters

  24. Example Evaluate the following integral using the trapezoidal rule. Estimate the error Strategy

  25. Strategy • Using the graph, illustrate the problem. • Isolate the function • Calculate the function at the two endpoints, a and b • Using the values of a,b, f(a), and f(b), estimate I • Estimate error

  26. Multiple Application of the Trapezoidal Rule • Improve the accuracy by dividing the integration interval into a number of smaller segments • Apply the method to each segment • Resulting equations are called multiple-application or composite integration formulas

  27. Multiple Application of the Trapezoidal Rule When there are n+1 equally spaced base points, we can group terms to express a general form } } width average height

  28. } } width average height Multiple Application of the Trapezoidal Rule The average height represents a weighted average of the function values Note that the interior points are given twice the weight of the two end points

  29. Example Evaluate the following integral using the trapezoidal rule and h = 0.1 Strategy

  30. Strategy • Isolate the function to be solved • Determine n • Graphically evaluate the problem to be solved • Expand the governing equation • Make a table of the needed values of f(x) • Estimate the integral • Estimate the error

  31. Simpson’s 1/3 Rule • Corresponds to the case where the function is a second order polynomial

  32. Simpson’s 1/3 Rule • Designate a and b as x0and x2, and estimate f2(x) as a second order Lagrange polynomial

  33. } } width average height Simpson’s 1/3 Rule • After integration and algebraic manipulation, we get the following equations

  34. Error Single application of Trapezoidal Rule. Single application of Simpson’s 1/3 Rule

  35. Multiple Application of Simpson’s 1/3 Rule

  36. The odd points represent the middle term for each application. Hence carry the weight 4. The even points are common to adjacent applications and are counted twice. i=1 (odd) weight of 4 i=2 (even) weight of 2 f(x) x

  37. Simpson’s 3/8 Rule • Corresponds to the case where the function is a third order polynomial

  38. Integration of Unequal Segments • Experimental and field study data is often unevenly spaced • In previous equations we grouped the term (i.e. hi) which represented segment width.

  39. Integration of Unequal Segments • We should also consider alternately using higher order equations if we can find data in consecutively even segments trapezoidal rule 1/3 rule trapezoidal rule 3/8 rule

  40. Example Integrate the following using the trapezoidal rule, Simpson’s 1/3 Rule, a multiple application of the trapezoidal rule with n=2 and Simpson’s 3/8 Rule. Compare results with the analytical solution. Strategy

  41. Strategy • Solve the problem analytically. Your error will be based on this true value • For error, use the equation for et • Isolate the function • Graphically consider the problem • Identify the governing equation for each estimate • For each method, determine n and h. Make a table of x and f(x) • Estimate the integral. Compare the results

  42. Integration of Equations • Integration of analytical as opposed to tabular functions • Romberg Integration • Richardson’s Extrapolation • Romberg Integration Algorithm • Gauss Quadrature • Improper Integrals

  43. Richardson’s Extrapolation Estimate the integral using two different step sizes. If h1 = h2/2 then

  44. Example: Class Demonstration Use Richardson’s extrapolation to evaluate:

  45. Solution Recall our previous example where we calculated the integral using a single application of the trapezoidal rule, and then a multiple application of the trapezoidal rule by dividing the interval in half.

  46. Solution Therefore h2 = h1 / 2. We can use a special case that will be introduced later in lecture.

  47. Solution SINGLE APPLICATION OF TRAPEZOIDAL RULE MULTIPLE APPLICATION OF TRAPEZOIDAL RULE (n=2) RICHARDSON’S EXTRAPOLATION 357% 133% 58% ....end of example

  48. Richardson’s Extrapolation • Use two estimates of an integral to compute a third more accurate approximation • The estimate and error associated with a multiple application trapezoidal rule can be represented generally as: • I = I(h) + E(h) • where I is the exact value of the integral • I(h) is the approximation from an n-segment application • E(h) is the truncation error • h is the step size (b-a)/n

  49. Richardson’s Extrapolation Make two separate estimates using step sizes of h1and h2. I(h1) + E(h1) = I(h2) + E(h2) Recall the error of the multiple-application of the trapezoidal rule Assume that is constant regardless of the step size

More Related