TITLE: Why not evaluate integrals using ODE-solvers?
QUESTION [25 upvotes]: Hello!
I have a question about the relationship between numerical integration and the solution of ordinary differential equations (ODE). Suppose I want to evaluate the integral
$I(x) = \int_{0}^{x} f(t) dt$, where $f$ is a continous function, for some fixed $x = x_{0}$. From the fundamental theorem of calculus I should be able to evaluate this integral by solving an initial value problem $\dot{I} = f(x)$, $I(0) = 0$, $x\in(0,x_{0}]$ right? However, I have seldom seen this method implemented, instead one uses specialized numerical integration codes. How come?
Best regards
Anne

REPLY [5 votes]: Yes, integration of ODE involves extrapolation whereas integration of functions involves interpolation.
Take for example the Euler's method, we are projecting the slope at the initial point and assume that it applies throughout the time step (which is obviously not the case in general). Worse, the errors accumulate through the time steps. That is, the starting value for the 2nd time step is inaccurate to start with.
Integration of functions involves interpolation of a certain polynomial to fit the functional values and evaluating the area under that polynomial. 
In fact, many researchers have tried to apply functional integration methods to integration of ODEs and not the other way round! We know the Gaussian quadrature is one of the most efficient and accurate numerical integration techniques around. Several ODE solvers are based on the Gauss method - e.g. the fully-implicit Gauss-Legendre method developed by Hollingsworth (1955) and later generalized by Butcher (1964) for arbitrary orders as the Gauss methods (implicit Runge-Kutta processes). 
Still later, such  implicit Runge-Kutta processes are shown to be identical to the collocation methods (Wright, 1970).