Artificial Intelligence 🤖
Differential equations
Ordinary differential equations
Introduction to ODEs
Differential equations

Differential equations

The study of differential equations (DEs) is probably the most important area of applied calculus. Differential equations provide an excellent way of describing physical phenomena and predicting their behaviour as parameters vary. A particular process of interest (be it physical, chemical, biological) describes how the system changes from one state to the next. Using information available to us about the system, we often want to be able to obtain solutions on the overall long-term behaviour. The study of differential equations begins from the mathematical modelling of a process; we aim to translate physical phenomena into a set of equations that describe them. The objective is to solve the resulting DEs thus gaining information on the system behaviour. The subject of mathematical modelling is a science in itself. It is almost impossible to describe a phenomenon totally and so scientists often resort to various simplifying assumptions that approximate the observations as best as possible. Mathematical models are validated by comparing the data generated by the model to data measured and collected from the system.

Techniques

The details and techniques associated with mathematical modelling fall beyond the scope of the present course. While some simple models are discussed at a fundamental equations level, we mainly focus on the techniques used to obtain solutions to DEs. The various classes of techniques can be summarised as follows:

  • Analytic: we use applied calculus to obtain an equation or a set of equations in closed form. The advantage of having a closed form solution is that the solution is exact and we can get a lot of insight on the behaviour of the model.
  • Numerical: few DEs merit analytic solutions; numerical techniques offer a viable alternative when analytic techniques fail. With numerical methods, say for a differential equation describing the behaviour of some quantity over time, we start with initial values of the variables and use the DEs to quantify changes over a very brief time period. While this is an approximation, under certain conditions, it can be a very good one.
  • Perturbation methods: these lie somewhere in the middle between analytic and numerical techniques. Using perturbation methods, it may be possible to find an analytic solution as an approximation to the true solution that is valid in a certain range. Again, the advantage is that we end up with an analytic solution which can be used to extract useful insight.
  • Qualitative: here, the focus is not on exact solutions; instead, we describe solutions in broader terms. We are mainly interested in the long-time behaviour of solutions, whether they are bounded or not, whether they oscillate or exhibit mathematical chaos.

Definitions

Differential equation

A differential equation is defined as any equation that contains ordinary or partial derivatives. As an example let us consider a widely studied model representing population dynamics. This is a good first example, as it encompasses the concepts of mathematical modelling as well. Many questions may be related to population dynamics from simply predicting the size of the population of a country after 5 years to how can we avoid the extinction of resources. We start here with the easiest mathematical model used to govern the population dynamics of a species. In this model, the rate of change of the population is proportional to the current population. Suppose the population of a species is given by P(t)P(t), then, we have:

dPdt=kP\frac{d P}{d t}=k P

where kk is a constant of proportionality describing the rate. Population of course is a nonnegative quantity and so for k>0k>0, Eq. (11.1) describes growth while for k<0k<0, it describes decay. The model is known as the exponential model. If the population species can be represented by the model then it experiences exponential growth (or decay) according to the solution of DE (11.1), given by (do not worry about the details of solving the DE yet):

P(t)=P0ekt,P(t)=P_{0} e^{k t},

where P0P_{0} is the value of the size of the population initially, at t=0t=0 i.e. P(0)=P0P(0)=P_{0}. From Eq. (11.2), we can now obtain information on the long-time behaviour of the solution and assess whether this is viable or not. For instance, let us first consider the case where kk is positive. For k>0k>0,

limtP(t)=+.\lim _{t \rightarrow \infty} P(t)=+\infty .

For k<0k<0, the exponential term decays and P(t)P(t) tends to 0 , which implies extinction. Clearly, for positive rates kk, the model is inadequate since an ever-growing population cannot be sustainable. Eventually, population growth is limited by some factor like, for instance, the depletion of resources. To remedy this, other models like the logistic model is often used (more on population models later).

As a second example, consider the hydrogenation of ethene (C2H4)\left(\mathrm{C}_{2} H_{4}\right) to ethane (C2H6)\left(\mathrm{C}_{2} \mathrm{H}_{6}\right). A proposed mechanism involves a three-step process:

Step 1:

H2k1k12HH_{2} \underset{k_{-1}}{\stackrel{k_{1}}{\rightleftharpoons}} 2 H

Step 2:

C2H4+Hk2C2H5\mathrm{C}_{2} \mathrm{H}_{4}+\mathrm{H} \stackrel{k_{2}}{\longrightarrow} \mathrm{C}_{2} \mathrm{H}_{5}

Step 3:

C2H5+Hk3C2H6\mathrm{C}_{2} \mathrm{H}_{5}+\mathrm{H} \stackrel{k_{3}}{\longrightarrow} \mathrm{C}_{2} \mathrm{H}_{6}

where the first reaction is reversible and can proceed in either direction. We represent the above mechanism, using the law of mass action 18{ }^{18}, as a system of differential equations for the rates:

d[H2]dt=k1[H]2k1[H2]d[H]dt=2k1[H2]2k1[H]2k2[C2H4][H]k3[C2H5][H]d[C2H4]dt=k2[C2H4][H]d[C2H5]dt=k2[C2H4][H]k3[C2H5][H].\begin{aligned} \frac{d\left[H_{2}\right]}{d t} & =k_{-1}[H]^{2}-k_{1}\left[H_{2}\right] \\ \frac{d[H]}{d t} & =2 k_{1}\left[H_{2}\right]-2 k_{-1}[H]^{2}-k_{2}\left[C_{2} H_{4}\right][H]-k_{3}\left[C_{2} H_{5}\right][H] \\ \frac{d\left[C_{2} H_{4}\right]}{d t} & =-k_{2}\left[C_{2} H_{4}\right][H] \\ \frac{d\left[C_{2} H_{5}\right]}{d t} & =k_{2}\left[C_{2} H_{4}\right][H]-k_{3}\left[C_{2} H_{5}\right][H] . \end{aligned}

Order of a DE

The order of a DE is given by the derivative of the highest power present in the equation. For example:

F=mdvdtF=m \frac{d v}{d t} is first order.

d2ydx2+pdydx+qy=0\frac{d^{2} y}{d x^{2}}+p \frac{d y}{d x}+q y=0 is second order.

y+d3ydt3=kty+\frac{d^{3} y}{d t^{3}}=k t is third order.

Notation

Before we move on with more definitions, let us clarify some notation. The derivative dy/dxd y / d x represents the rate of change of yy with respect to xx where yy is the dependent variable and xx is the independent variable. Alternative notation for the first derivative are:

y,y(1),y˙y^{\prime}, y^{(1)}, \dot{y}

the latter being more common in physics. For the second derivative, we write:

d2ydx2,y,y(2),y¨.\frac{d^{2} y}{d x^{2}}, y^{\prime \prime}, y^{(2)}, \ddot{y} .

In the equations you have seen so far there is only one independent variable (this is most commonly denoted by xx for spatial and tt for temporal variables). Differential equations

18{ }^{18} According to the law of mass action, for elementary reactions, the rate of the reaction is proportional to the product of the concentrations of the reactants. which involve only one independent variable are called ordinary differential equations. Differential equations involving more than one independent variable are known as partial differential equations. In this course we focus on ODEs. You will study PDEs extensively in your Year II mathematics course, which arise in many contexts including heat and mass transport equations and reaction-diffusion equations. Solution techniques for PDEs often involve transforming the PDEs into a set of ODEs therefore a solid understanding of the theory and applications of ODEs is necessary.

Linear DEs

A differential equation that can be written in the following form

i=0nai(x)y(i)(x)=g(x)\sum_{i=0}^{n} a_{i}(x) y^{(i)}(x)=g(x)

is called a linear differential equation. Note that, as above, the notation y(i)y^{(i)} represents the ii th derivative. A linear DE:

(a) does not have products of the dependent function, y(x)y(x) and its derivatives, i.e. yyy y^{\prime};

(b) does not have the function, y(x)y(x) or its derivatives at any power higher than 1, i.e. y3,(y)2y^{3},\left(y^{\prime \prime}\right)^{2}

(c) may have the functions ai(x),i=0na_{i}(x), i=0 \cdots n and g(x)g(x) be constant, nonconstant, linear or nonlinear.

Any DE that does not conform to the form given by Eq. (11.7), is called a nonlinear differential equation.

Initial conditions

An initial condition (IC) represents a condition or, a set of conditions, which give values of the function and/or its derivatives at specific points of the independent variable. The IC allows us to determine a particular solution (see below) to the DE. The number of conditions required to determine a particular solution depends on the order of the DE.

For example,

F=mdvdtODE,v(t=0)=5IC.\underbrace{F=m \frac{d v}{d t}}_{O D E}, \quad \underbrace{v(t=0)=5}_{I C} .

General & particular solutions

A general solution has the most general form a solution can take. For example

v(t)=ke2t,v(t)=k e^{-2 t},

is a general solution because kk (which is a constant) can take any value.

A particular solution of a DE represents a solution that satisfies both the DE and the initial condition(s) provided. The solution

v(t)=5e2t,v(t)=5 e^{2 t},

is a particular solution.

Initial value problem

An initial value problem (IVP), is given by:

  1. a differential equation;
  2. an initial condition.

The aim is to solve the differential equation subject to the IC to find a particular solution.

Existence & uniqueness

Once we identify the type of ODE we are dealing with, we would then be interested in answering the so-called existence question:

Does a solution to the ODE exist?

Additionally, we are interested to know whether a particular solution is indeed unique. This is referred to as the uniqueness question in a differential equations course.

Intervals of existence

The solution to a differential equation is a function. For instance, consider the following first-order IVP,

dydx=y2 with y(0)=1.\frac{d y}{d x}=y^{2} \text { with } y(0)=1 .

Our objective is to find a particular solution that describes the function y(x)y(x). The solution to the IVP given by Eq. (11.8) is,

y(x)=11x.y(x)=\frac{1}{1-x} .

Equation (11.9) is the particular solution that satisfies the ODE and the IC given in (11.8). The graph of the solution (11.9) is given in Fig. 11.1.

We note that at x=1,yx=1, y is undefined (there exists a vertical asymptote at x=1x=1 ). It follows that y(x)y(x) is made up of two parts: one defined in <x<1-\infty<x<1 and another defined in 1<x<1<x<\infty.

A particular solution to a differential equation needs to:

  1. be defined continuously over a certain interval;
  2. satisfy the initial condition.

Using Definition 11.1, a valid solution to the IVP is defined in an interval that is continuous and contains the IC. For the IVP (11.8) therefore, since the IC is given at x=0x=0, the solution is valid in the interval <x<1-\infty<x<1, which is the left part of the graph in Fig. 11.1. The interval in which the solution is valid is known as the interval of existence.

Figure 11.1: Graph of function y(x)=(1x)1y(x)=(1-x)^{-1}; the graph is made up of two continuous parts defined in <x<1-\infty<x<1 and 1<x<1<x<\infty. The function is undefined at x=1x=1 (vertical asymptote is shown with red, dotted line).

Example 11.1 Consider the following IVP:

dydx=3x23y24;y(1)=0\frac{d y}{d x}=\frac{3 x^{2}}{3 y^{2}-4} ; y(1)=0

Determine the interval of existence for which the following particular solution is valid,

y34yx3+1=0.y^{3}-4 y-x^{3}+1=0 .

Solution The solution (11.11) is an implicit particular solution. The function y(x)y(x) is implicitly defined, i.e. we have an equation that involves the dependent variable. We observe that Eq. (11.11) is defined everywhere; the ODE (11.10) however is undefined at 3y24=0y=±2/33 y^{2}-4=0 \Rightarrow y= \pm 2 / \sqrt{3}. The interval of existence is always given in terms of the independent variable, xx, so we need to find the points in xx corresponding to the points in yy for which the ODE is undefined. Plugging y=±2/3y= \pm 2 / \sqrt{3} back into Eq. (11.11) and solving for xx gives the interval of existence as

1633<x<1633-\frac{16}{3 \sqrt{3}}<x<\frac{16}{3 \sqrt{3}}

Note that this interval contains the point x=1x=1 which is the value of xx at which the IC is given.