A large number of engineering problems are formulated in terms of a differential equation or a system of differential equations. A typical engineering problem requires finding the solution of a set of differential equations subject to some set of initial values or subject to some set of boundary values. In this chapter only the initial value type of problem will be considered. A subset of general differential equations is the set of linear differential equations with constant coefficients. For such systems, closed form solutions can always be found as the solutions are always sums of exponential functions. For general differential equations and especially for non-linear differential equations, closed form solutions can not in general be found and one must resort to numerical solutions. What is meant by a numerical solution is a set of tabular values giving the value of the dependent variable (or variables) as a function of the independent variable (or variables) at a finite number of values of the dependent variable.
This chapter begins by discussing the simple case of a single first-order differential equation. The independent variable will be assumed to be time (t), but the discussing is independent of whether the independent variable is time or some spatial coordinate. Some fundamental properties of all numerical solutions to differential equations will be developed for some simple cases. The discussion will then be expanded to systems of first-order differential equations and then to systems of second and higher order differential equations. Some general computer code segments will be developed for use in solving general non-linear differential equations. Finally several examples will be given to illustrate the application of the code segments to typical problems.