This chapter is not intended as a comprehensive course in numerical methods. Rather it deals, and only in a rather basic way, with the very common problems of numerical integration and the solution of simple (and not so simple!) equations. Specialist astronomers today can generate most of the planetary tables for themselves; but those who are not so specialized still have a need to look up data in tables such as The Astronomical Almanac, and I have therefore added a brief section on interpolation, which I hope may be useful. While any of these topics could be greatly expanded, this section should be useful for many everyday computational purposes.
- 1.2: Numerical Integration
- There are many occasions when one may wish to integrate an expression numerically rather than analytically. Sometimes one cannot find an analytical expression for an integral, or, if one can, it is so complicated that it is just as quick to integrate numerically as it is to tabulate the analytical expression. Or one may have a table of numbers to integrate rather than an analytical equation.
- 1.5: The Solution of Polynomial Equations
- The Newton-Raphson method is very suitable for the solution of polynomial equations.
- 1.6: Failure of the Newton-Raphson Method
- In nearly all cases encountered in practice Newton-Raphson method is very rapid and does not require a particularly good first guess. Nevertheless for completeness it should be pointed out that there are rare occasions when the method either fails or converges rather slowly.
Thumbnail: Comparison between 2-point Gaussian and trapezoidal quadrature. The blue line is the polynomial , whose integral in [−1, 1] is 2/3. The trapezoidal rule returns the integral of the orange dashed line. The 2-point Gaussian quadrature rule returns the integral of the black dashed curve. Such a result is exact, since the green region has the same area as the red regions. Image used with permission (CC BY-Sa 4.0; Paolostar).