next up previous
Next: Euler Method Up: Ordinary Differential Equations Previous: Ordinary Differential Equations

Types of Differential Equation

In this chapter we will consider the methods of solution of the sorts of ordinary differential equations (ODEs) which occur very commonly in physics. By ODEs we mean equations involving derivatives with respect to a single variable, usually time. Although we will formulate the discussion in terms of linear ODEs for which we know the analytical solution, this is simply to enable us to make comparisons between the numerical and analytical solutions and does not imply any restriction on the sorts of problems to which the methods can be applied. In the practical work you will encounter examples which do not fit neatly into these categories. The work in this section is also considered in chapter 16 of Press et al. (1992) or chapter II of Potter (1973) We consider 3 basic differential equations:
$\displaystyle {\d y\over\d t} + \alpha y$ $\textstyle = 0$ $\displaystyle \quad\Rightarrow\quad y = y_0 \exp(-\alpha t)
\qquad\mbox{The {\it Decay\/} equation}$ (1.1)
$\displaystyle {\d y\over\d t} - \alpha y$ $\textstyle = 0$ $\displaystyle \quad\Rightarrow\quad y = y_0 \exp(+\alpha t)
\qquad\mbox{The {\it Growth\/} equation}$ (1.2)
$\displaystyle {\d y\over\d t} \pm\i\omega y$ $\textstyle = 0$ $\displaystyle \quad\Rightarrow\quad y = y_0 \exp(\mp\i\omega t)
\qquad\mbox{The {\it Oscillation\/} equation}$ (1.3)

which are representative of most more complex cases. Higher order differential equations can be reduced to 1st order by appropriate choice of additional variables. The simplest such choice is to define new variables to represent all but the highest order derivative. For example, the damped harmonic oscillator equation, usually written as
m {\d^2 y\over\d t^2} + \eta {\d y\over\d t} +\kappa y = 0
\end{displaymath} (1.4)

can be rewritten in terms of $y$ and velocity $v=\d y/\d t$ in the form of a pair of 1st order ODEs
$\displaystyle {\d v\over\d t}$ $\textstyle + {\eta\over m} v + {\kappa\over m} y$ $\displaystyle = 0$ (1.5)
$\displaystyle {\d y\over\d t}$ $\textstyle - v$ $\displaystyle = 0$ (1.6)

Similarly any $n$th order differential equation can be reduced to $n$ 1st order equations. Such systems of ODEs can be written in a very concise notation by defining a vector, $\bi{y}$ say, whose elements are the unknowns, such as $y$ and $v$ in (1.1). Any ODE in $n$ unknowns can then be written in the general form
{\d\bi{y}\over\d t} + \bi{f}(\bi{y},t) = 0
\end{displaymath} (1.7)

where $\bi{y}$ and $\bi{f}$ are $n$-component vectors. Remember that there is no significance in the use of the letter $t$ in the above equations. The variable is not necessarily time but could just as easily be space, as in (1.9), or some other physical quantity. Formally we can write the solution of (1.7) as
\bi{y}(t) = \bi{y}(t_{0})
- \int_{t_0}^{t}\bi{f}\left(\bi{y}(t'), t'\right)\d t'
\end{displaymath} (1.8)

by integrating both sides over the interval $t_0 \rightarrow t$. Although (1.8) is formally correct, in practice it is usually impossible to evaluate the integral on the right-hand-side as it presupposes the solution $\bi{y}(t)$. We will have to employ an approximation. All differential equations require boundary conditions. Here we will consider cases in which all the boundary conditions are defined at a particular value of $t$ (e.g. $t=0$). For higher order equations the boundary conditions may be defined at different values of $t$. The modes of a violin string at frequency $\omega$ obey the equation
{\d^2 y\over\d x^2} = -{\omega^2\over c^2}y
\end{displaymath} (1.9)

with boundary conditions such that $y=0$ at both ends of the string. We shall consider such problems later.
next up previous
Next: Euler Method Up: Ordinary Differential Equations Previous: Ordinary Differential Equations