Numerical Computing with MATLAB

MATLAB has several different functions for the numerical solution of ordinary differential equations. This chapter describes the simplest of these functions and then compares all of the functions for efficiency, accuracy, and special features. Stiffness is a subtle concept that plays an important role in these comparisons.
The initial value problem for an ordinary differential equation involves finding a function y(t) that satisfies
together with the initial condition
A numerical solution to this problem generates a sequence of values for the independent variable, t 0, t 1, , and a corresponding sequence of values for the dependent variable, y 0, y 1, , so that each y n approximates the solution at t n:
Modern numerical methods automatically determine the step sizes
so that the estimated error in the numerical solution is controlled by a specified tolerance.
The fundamental theorem of calculus gives us an important connection between differential equations and integrals:
We cannot use numerical quadrature directly to approximate the integral because we do not know the function y(s) and so cannot evaluate the integrand. Nevertheless, the basic idea is to choose a sequence of values of h so that this formula allows us to generate our numerical solution.
One special case to keep in mind is the situation where f(t, y) is a function of t alone. The numerical solution of such simple differential equations is then just a sequence...