Initial value problems

What an IVP is, when it has a unique solution (Lipschitz condition), how it is discretized, and how systems and higher-order equations reduce to the same scheme.

What an initial value problem is

Differential equations model dynamical systems: the trajectory of a particle, the evolution of a temperature, an electrical circuit or the growth of a population. An initial value problem (IVP) combines the differential equation with the state of the system at the initial time:

y(t)=f(t,y(t)),t[a,b],y(a)=yay'(t)=f(t,y(t)),\qquad t\in[a,b],\qquad y(a)=y_a

A classic example is the Malthus population model, y(t)=ky(t)y'(t)=k\,y(t): the growth rate is proportional to the number of individuals (with k<0k<0 it describes decay). The logistic or Verhulst model adds a nonlinear term that slows growth when resources are limited: y(t)=ky(t)py(t)2y'(t)=k\,y(t)-p\,y(t)^2. The latter appears as a recurring example in the methods of this section.

Existence and uniqueness of the solution

Before approximating a solution it helps to know that one exists and is unique. The condition controls how fast ff changes with respect to yy:

From the continuous to the discrete solution

Analytic techniques produce the continuous solution y(t)y(t), but they only work for specific families of equations. Numerical methods approximate the solution when the analytic computation is impossible or too costly: they produce a discrete solution yky(tk)y_k\approx y(t_k) on the nodes of a partition of the interval.

tk=a+kh,k=0,1,,N,h=baNt_k=a+kh,\qquad k=0,1,\dots,N,\qquad h=\frac{b-a}{N}
Equally spaced discretization of [a,b][a,b] into NN subintervals of step hh.

Every method in this area (Euler, Heun, Runge-Kutta and the Adams multistep methods) follows this scheme: start from y0=yay_0=y_a and advance node by node, building yk+1y_{k+1} from the available information.

Systems of first-order equations

When several quantities evolve together (for instance interacting populations), the IVP is stated with mm unknown functions y1,,ymy_1,\dots,y_m and one equation for each. With vector notation Y(t)=[y1(t),,ym(t)]TY(t)=[y_1(t),\dots,y_m(t)]^T the system mirrors the scalar case:

Y(t)=F(t,Y(t)),Y(a)=[y1,a,,ym,a]TY'(t)=F\bigl(t,Y(t)\bigr),\qquad Y(a)=\bigl[y_{1,a},\dots,y_{m,a}\bigr]^T

This notation carries over to computation: one-step methods apply to the system component by component with no conceptual change, as the SIR epidemic model exercise shows.

Higher-order equations

An order-mm equation, y(m)(t)=f(t,y,y,,y(m1))y^{(m)}(t)=f\bigl(t,y,y',\dots,y^{(m-1)}\bigr), defines an IVP when yy and its derivatives up to order m1m-1 are known at the initial time. To solve it numerically, convert it into a first-order system:

Reduction to a first-order system
  1. Introduce new variables: the function and its successive derivatives.

    y1(t)=y(t),y2(t)=y(t),,ym(t)=y(m1)(t)y_1(t)=y(t),\quad y_2(t)=y'(t),\quad \dots,\quad y_m(t)=y^{(m-1)}(t)
  2. Differentiating each new variable yields the next one, and the last one carries the original equation.

    y1=y2,y2=y3,,ym=f(t,y1,,ym)y_1'=y_2,\quad y_2'=y_3,\quad \dots,\quad y_m'=f\bigl(t,y_1,\dots,y_m\bigr)
  3. The initial conditions of the equation translate directly into those of the system: y1(a)=y(a)y_1(a)=y(a), y2(a)=y(a)y_2(a)=y'(a), and so on. The sought solution is the first component, y(t)=y1(t)y(t)=y_1(t).

ExampleThe pendulum as a system

Write as a first-order system the equation of a pendulum of length LL, θ(t)gLsinθ(t)=0\theta''(t)-\frac{g}{L}\sin\theta(t)=0, with initial angle θ(0)=π/6\theta(0)=\pi/6 and initial angular velocity θ(0)=0\theta'(0)=0.

  1. With y1=θy_1=\theta and y2=θy_2=\theta', the second-order equation becomes two first-order equations:

    [y1y2]=[y2gLsiny1]\begin{bmatrix} y_1' \\ y_2' \end{bmatrix}=\begin{bmatrix} y_2 \\ \tfrac{g}{L}\sin y_1 \end{bmatrix}

The initial conditions of the system are y1(0)=π/6y_1(0)=\pi/6, y2(0)=0y_2(0)=0, and any one-step method can integrate it in vector form.