November 11, 2004 --- Class 22 --- Project, Numerical Integration in One Dimension Project The project is due on Tuesday, Dec. 14 at 5 p.m., as stated in the syllabus. You project report will be graded on this basis: Statement 10 Eq Solved 5 Num. Method 5 Code 5 Results 10 Discussion 10 Critique 5 ------------------ Total 50 Note the emphasis on the statement of the problem, analysis of results and discussion of what has been learned. Also please note that your report should include a critical discussion of how you might do it better (or at least differently) and how it could be extended. Numerical Integration We talked about some of the standard methods for numerical integration in one dimension. This is discussed in Section 11.1 of CSM. Additional material is available in Numerical Recipes or in Abramowitz and Stegun. We compared the accuracy of various methods like the rectangle rule, trapezoid rule and Simpson's rule. We indicated how Simpson's rule can simply be derived from removing the leading 1/N^2 error in the trapeziod rule with N and 2N points. (This is detailed below.) This technique can be extended in the method known as Romberg integration. The previous two points are expanded upon in Numerical Recipes. Practical codes may be found there. Simpson's Rule Rederived Starting from the trapezoid rule, we used the formulae below for correcting the leading 1/N^2 errors. S_N = A + E/N^2 S_2N = A + E/(2N)^2 so A = 4/3 S_2N -1/3 S_N Applying this to a one-dimensional itegral, we easily found that the weighting of the sum of two expressions on the right hand side exactly coincides with the Simpson's rule formula. We previously found that Simpson's Rule has a leading error of order 1/N^4. Since the approach above removes the leading 1/N^2 error and since the error of the trapezoid rule only has even powers of 1/N (asserted, but not proved), this is not surprising.