1 / 38

Today’s class

Today’s class. Numerical Integration Newton-Cotes. Discuss Mid-term Exam 1. Histogram of scores. Average = 74.5, Standard dev = 17.6 Max = 98 Min = 35. Discuss Mid-term Exam 1.

Télécharger la présentation

Today’s class

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. Today’s class • Numerical Integration • Newton-Cotes Prof. Jinbo Bi CSE, UConn

  2. Discuss Mid-term Exam 1 Histogram of scores Average = 74.5, Standard dev = 17.6 Max = 98 Min = 35 Prof. Jinbo Bi CSE, UConn

  3. Discuss Mid-term Exam 1 1 (30) Use Taylor series to approximate at x=0.5 until t 1%, using a base point x=0. (Use 4 significant digits with rounding, and the true value is 0.4055) Prof. Jinbo Bi CSE, UConn

  4. Discuss Mid-term Exam 1 2 (30) Use the false-position method with initial guesses of 50 and 70 to determine x to a level of a 0.5%. (Use 4 significant digits with rounding) Prof. Jinbo Bi CSE, UConn

  5. Discuss Mid-term Exam 1 3 (20) Use the Newton-Raphson method with an initial guess of 6 to determine a root of the following function to a level of a 0.01% (use 4 significant digits with rounding) Prof. Jinbo Bi CSE, UConn

  6. Discuss Mid-term Exam 1 4 (20) Use the Gauss-Seidel method to solve the following linear equation system to a tolerance of s = 5% with a starting point (0, 0, 0).(Use 4 significant digits with rounding) Prof. Jinbo Bi CSE, UConn

  7. Numerical Integration • Numerical technique to solve definite integrals • Find the area under the curve f(x) from a to b • Another way to put it is that we need to solve the following differential equation Prof. Jinbo Bi CSE, UConn

  8. Numerical Integration • Where do we use numerical techniques? • When you can’t integrate directly • When you have a sampling of points representing f(x) as with the experiments results • Graphical techniques • Grid approximation • Strip approximation Prof. Jinbo Bi CSE, UConn

  9. Graphical Techniques • Grid approximation Prof. Jinbo Bi CSE, UConn

  10. Graphical Techniques • Strip approximation Prof. Jinbo Bi CSE, UConn

  11. Numerical Integration • Numerical techniques • Treat integral as a summation • Basic idea is to convert a continuous function into discrete function • The smaller the interval, the more accurate the solution but also at more computational expense Prof. Jinbo Bi CSE, UConn

  12. Numerical Integration • Newton-Cotes formulas • Approximate function with a series of polynomials that are easy to integrate • Zero-order approximation is equivalent to strip approximation • First order approximation is equivalent to trapezoidal approximation Prof. Jinbo Bi CSE, UConn

  13. Newton-Cotes Formulas Prof. Jinbo Bi CSE, UConn

  14. Newton-Cotes Formulas Prof. Jinbo Bi CSE, UConn

  15. Trapezoidal Rule Prof. Jinbo Bi CSE, UConn

  16. Trapezoidal Rule Prof. Jinbo Bi CSE, UConn

  17. Trapezoidal Rule Prof. Jinbo Bi CSE, UConn

  18. Trapezoidal Rule • Evaluate integral • Analytical solution • Trapezoidal solution Prof. Jinbo Bi CSE, UConn

  19. Trapezoidal Rule Prof. Jinbo Bi CSE, UConn

  20. Trapezoidal Rule • Trapezoidal solution • To increase accuracy, shorten up the interval Prof. Jinbo Bi CSE, UConn

  21. Trapezoidal Rule Prof. Jinbo Bi CSE, UConn

  22. Trapezoidal Rule • If you split the interval into n sub-intervals, each sub-interval has a width of h = (b – a)/n Prof. Jinbo Bi CSE, UConn

  23. Trapezoidal Rule • More accurate as you increase n • Double n and reduce the error by a factor of four • However, if n is too large, you will start encountering round-off error and the integral solution can diverge Prof. Jinbo Bi CSE, UConn

  24. Simpson’s Rules • Second and third-order polynomial forms of the Newton-Cotes formulas • Simpson’s 1/3 Rule • Use three points on the curve to form a second order polynomial Prof. Jinbo Bi CSE, UConn

  25. Simpson’s Rules • Approximate the function by a parabola Prof. Jinbo Bi CSE, UConn

  26. Simpson’s Rules Prof. Jinbo Bi CSE, UConn

  27. Simpson’s Rules Prof. Jinbo Bi CSE, UConn

  28. Simpson’s 1/3 Rule • Error • Multiple Application • n must be even Prof. Jinbo Bi CSE, UConn

  29. Simpson’s 3/8-Rule • Approximate with a cubic polynomial Prof. Jinbo Bi CSE, UConn

  30. Simpson’s 3/8-Rule Prof. Jinbo Bi CSE, UConn

  31. Simpson’s 3/8-Rule • Error • Multiple Application • n must be a multiple of 3 Prof. Jinbo Bi CSE, UConn

  32. Simpson’s 3/8-Rule • Both the cubic and quadratic approximations are of the same order • The cubic approximation is slightly more accurate then the quadratic approximation • Usually not worth the extra work required • Only use the 3/8 rule if you need odd number of segments • Can combine with 1/3 rule on some segments Prof. Jinbo Bi CSE, UConn 32

  33. Example Prof. Jinbo Bi CSE, UConn

  34. Integration with unequal segments • We have until now assumed that each segment is equal • If we are integrating based on experimental or tabular data, this assumption may not be true • Newton-Cotes formulas can easily be adapted to accommodate unequal segments Prof. Jinbo Bi CSE, UConn

  35. Trapezoid Rule with Unequal Segments Prof. Jinbo Bi CSE, UConn

  36. Trapezoidal Rule Prof. Jinbo Bi CSE, UConn

  37. Simpson’s Rule with Unequal Segments Prof. Jinbo Bi CSE, UConn

  38. Next class • Numerical Integration • HW5 due Tuesday Oct 21 Prof. Jinbo Bi CSE, UConn

More Related