Ordinary Differential Equations (ODE)

1. Ordinary Differential Equations (ODE)#

An Ordinary Differential Equation (ODE) is an equation that relates a function of a single independent variable to one or more of its derivatives. ODEs are used to model how a quantity changes with respect to another variable, typically time. ODEs are called ordinary to distinguish them from Partial Differential Equations (PDEs), which involve functions of multiple variables and their partial derivatives.

Some ODEs can be solved analytically using techniques such as separation of vriables, integration, or Laplace transforms. However, many ODEs arising in practical applications do not possess closed-form solutions, making numerical methods essential.

Definition 1.1 (Ordinary Differential Equation)

An Ordinary Differential Equation (ODE) or order \(n\) is an equation of the form

\[ y^{(n)}(t) = f(t, y(t), y'(t), y''(t), \ldots, y^{(n-1)}(t)), \]

where \(t\) is the independent variable and \(y(t)\) is the unknown function. The highest derivative appearing in the equation is the \(n\)th derivative \(y^{(n)}\).

For brevity, the dependence on \(t\) is often omitted and \(y(t)\) is written simply as \(y\).

The order of an ODE is determined by the highest derivative that appears in the equation. For example, \(y'' + 3y' = 0\) is a second-order ODE.

The solution of an ODE is the function \(y(t)\) that satisfies the ODE over the domain of \(t\). For example, consider the following ODE

(1.1)#\[y' = ky, \]

where \(t \in \mathbb{R}\). Rewriting this using Leibniz notation and integrating both sides we have

\[\begin{split} \begin{align*} \frac{\mathrm{d} y}{\mathrm{d} t} & = ky \\ \frac{\mathrm{d} y}{y} &= k \, \mathrm{d} t \\ \int \frac{1}{y} \mathrm{d} y &= \int k \, \mathrm{d} t \\ \ln |y| &= kt + C. \\ \end{align*} \end{split}\]

Solving for \(y\) gives

\[ \begin{align*} y &= e^{kt + C} = e^{kt}e^{C} = Ae^{kt}, \end{align*} \]

where \(A\) is some constant. Note that there are an infinite number of solutions since \(A\) can be any value. Specifying the value of the solution at a particular point allows the arbitrary constant to be determined, yielding a unique solution. For example, if the solution to the ODE in equation (1.1) where \(t = 0\) is known to be \(y(0) = y_0\) then

\[ \begin{align*} y_0 &= A e^{k(0)} = A e^0 = A, \end{align*} \]

so the ODE has the solution

\[ \begin{align*} y &= y_0 e^{kt}. \end{align*} \]

So if \(y_0 = 1\) then the solution is \(y = e^{kt}\), and if \(y_0 = 2\) then the solution is \(y = 2e^{kt}\).

../_images/7d123ad4beae156d893226ada6000ed55f0b6962f52cbbaf42e55736330e79d4.png

Fig. 1.1 Plots of several solutions of the ODE \(y' = y\) corresponding to different initial conditions.#

In the example above, specifying \(y(0) = y_0\) transformed the family of solutions \(y = Ae^{kt}\) into a single solution. Problems of this type are known as Initial Value Problems (IVP).

Definition 1.2 (Initial value problem)

An Initial Value Problem (IVP) consists of a differential equation together with a specified value of the solution at the inital point of the domain

\[ \begin{align*} y' = f(t,y), \qquad t \in [t_0, t_{\max}], \qquad y(t_0) = y_0. \end{align*} \]

Here \(y(t_0) = y_0\) is called the initial condition.

For many practical applications, an analytical solution is either unavailable or too difficult to obtain. In these situations we seek approximate numerical solutions at a discrete set of points. The Runge-Kutta methods form an important class of numerical algorithms for solving initial value problems and will be the focus of this chapter.