Numerical integration is the process of approximating integrals in lieu of evaluating them analytically. This subject is very rich in terms of the number of different techniques, history, applications, and even debate as to which approaches are better for given applications. Many of the methods commonly used are derived from Newton-Cotes integration formulas. Most modern books on numerical methods include some chapter(s) devoted to these methods. Some well-known Newton-Cotes integration formulas are the trapezoidal rule, Simpson's first and second rules, and Bode's rule.
There are other methods that are typically referred to as Gaussian methods or Gaussian quadratures . This class of methods includes such formulas as the Gauss-Legendre formula, the Gauss-Chebyshev formula, and the Gauss-Hermite formula.
Of course, there are other methods that combine elements of these classes, expand upon them, or take different approaches altogether, for example, Monte Carlo integration .
In this chapter I'll show you how to implement some of the more popular numerical integration rules and formulas to solve specific problems. My aim is to show you how to implement such rules and formulas in Excel, not to show how to implement every rule, formula, or variation available. In general, most of these rules and formulas follow similar patterns in the way they are constructed, with many of them differing only by coefficients and factors. Therefore, the techniques I discuss here on how to implement some common methods in Excel can be easily extended to deal with other rules and formulas.
Additionally, I've included a recipe here on numerical differentiation. As differentiation is the inverse of integration, I felt it appropriate to address numerical differentiation here as well, and to highlight some of the particular challenges associated with numerical differentiation. In other chapters of this book that deal with solving differential equations, I'll address some other numerical methods that involve differentiation.
Getting Acquainted with Visual Basic for Applications
Collecting and Cleaning Up Data
Time Series Analysis
Curve Fitting and Regression
Numerical Integration and Differentiation
Solving Ordinary Differential Equations
Solving Partial Differential Equations
Performing Optimization Analyses in Excel
Introduction to Financial Calculations