Chapter 2 Differential Equations
“Among all of the mathematical disciplines the theory of differential equations is the most important… It furnishes the explanation of all those elementary manifestations of nature which involve time.” - Sophus Lie (1842-1899)
2.1 Differential Equations and Ordinary Differential Equations
Before we formally construct and solve any continuous models in Chapter 3, we will be unpacking what an ordinary differential equation is, the ways in which we can classify them, and hence the methods of solution we can adopt in order to find analytical solutions. It will be useful at this juncture to discuss some useful definitions.
Remark. At this stage, I want to emphasize that you are registered for a degree in the mathematical sciences. You should not be afraid to grapple with technical and theoretical mathematical definitions. It is a key toolkit within your arsenal that you need to develop. If you have discomfort trying to decipher a mathematical definition, that is okay. However, you need not shy away from doing so, but instead try to make meaning that links the theory to the concepts There is an inherent discomfort to learning. You also need to develop an aptitude for reading with comprehension. Spoiler: If you thought there was a lot of reading to do last week, wait until Chapter 3. *rant over*
Definition 2.1 (Differential Equation) A differential equation (DE) is a mathematical equation that relates a function with its derivatives.
Definition 2.2 (Ordinary Differential Equation) An ordinary differential equation (ODE) is an equation that involves some ordinary derivatives of one or more unknown function (the dependent variable(s)) of one single independent variable.
For example:
\[\begin{equation}
\dfrac{d^2 y}{dx^2}+3\dfrac{d y}{dx}+2y=\sin{x}
\tag{2.1}
\end{equation}\]
Definition 2.3 (Partial Differential Equation) In contrast, a partial differential equation is an equation that involves some partial derivatives of one or more unknown function (the dependent variable(s)) of two or more independent variables.
For example: \[\begin{equation} \dfrac{\partial^2 u}{\partial x^2}+ \dfrac{\partial^2 u}{\partial y^2}=0 \end{equation}\]
The work we do will do regarding differential equations in this course will exclusively involve ordinary differential equations. This means that we will have only one independent variable. For the rest of these notes, any reference to the word differential equation and the abbreviation DE refers exclusively to ordinary differential equations You will consider partial differential equations in subsequent years, once you have a firmer grasp of multivariable calculus.
Differential equations arise from many sources, and the independent variable can signify many different things. In these notes we will use a variety of variables for for the independent variable (including time \(t\)), likewise for the dependent variable (excluding time \(t\)). Nonetheless, very often the independent variable represents time, and the dependent variable is some dynamical quantity which depends upon time.
2.2 Notation
Throughout these notes, ordinary derivatives will be denoted with the use of either the Leibniz notation, the prime notation, or Newton’s dot notation.
Update: Newton’s dot notation is most commonly used in physics, and it is mostly, but not exclusively, used to represent change with respect to time \(t\).
2.3 Classification of an Ordinary Differential Equation
Consider the the general ordinary differential equation given below,
\[\begin{equation} a_{n}(x)\dfrac{d^n y}{dx^n}+a_{n-1}(x)\dfrac{d^{n-1} y}{dx^{n-1}}+\dots+ a_{2}(x)\dfrac{d^2 y}{dx^2}+a_{1}(x)\dfrac{d y}{dx}+a_{0}(x)y=g(x) \tag{2.2} \end{equation}\] where the coefficient functions, \(a_{n}(x), a_{n-1}(x), \dots, a_{2}(x), a_{1}(x), g(x)\) can be any functions of the independent variable \(x\) (including a constant/zero function).
We are interested in distinguishing all resultant ODEs that can be extracted from the above general ODE from each other by considering some of its constituent features. There are many ways to relate a function with its derivatives. When this is done, we find the following classifications of an ODE useful:
2.3.1 Order
2.3.2 Linearity
2.3.3 Homogeneity
2.3.4 Coefficients
Remark. One of the reasons we are interested in doing so is that once we are able to classify certain ordinary differential equations using the above features, it will give us better insights into what solution methods and procedures are best suited to deploy in order to solve that particular differential equation. At this stage, it may seem unneccesary, but you will see the importance of doing so in later sections within this chapter.
2.3.1 Classification by order
Definition 2.4 (Order of an Ordinary Differential Equation) The order of a differential equation is the order of the highest derivative in the differential equation.
The order of Equation (2.1) is \(2\) or it is of the \(2\)nd order. This corresponds to the term with the highest derivative operator \(\dfrac{d^2 y}{dx^2}\).
The order of Equation (2.2) is \(n\) or it is of the \(n\)th order. This corresponds to the term with the highest derivative operator \(\dfrac{d^n y}{dx^n}\).
2.3.2 Classification by linearity
Definition 2.5 (Linearity of an Ordinary Differential Equation) A linear differential equation is one in which neither the unknown function nor any of its derivatives are raised to a power greater than 1.
An \(nth\)-order ODE such as in Equation (2.2) is said to be linear if
- the dependent variable (in this case, \(y\)) and all of its derivatives are of the first degree, that is, the power of each term involving the dependent variable \(y\) is 1, and
- the coefficients of the dependent variable \(y\) and any of its derivatives are constants, or they depend on the independent variable (in this case, \(x\)) only.
A differential equation that is not linear is said to be non-linear and this occurs when the above does not hold, that is, non-linear functions of the dependent variable or any of its derivatives occur in the differential equation.
Equation (2.1) is linear as \(\dfrac{d^2 y}{dx^2}, \dfrac{d y}{dx},\) and \(y\) are of the first degree, and its coefficients are all constants (1, 3, and 2 respectively). \(\sin{x}\) is non-linear in the independent variable, and thus has no effect on the linearity of Equation (2.1).
2.3.3 Classification by homogeneity
Definition 2.6 (Homogeneity of an Ordinary Differential Equation) A differential equation is homogeneous with respect to the dependent variable (say \(y\), in this case) if replacing the dependent variable with a non-zero arbitrary constant multiplied by the dependent variable does not change the structure of the differential equation. We say that the differential equation remains invariant under this transformation.
Otherwise, the differential equation is said to be non-homogeneous with respect to the dependent variable (in this case, \(y\)).
Otherwise stated, the ODE is homogeneous in the dependent variable if the substitution of \(ky\) (where \(k\) \(\neq\) 0) for \(y\) in the differential equation does not change the ODE. We will refer to this as the test for homogeneity. Any ODE that changes upon implementing the test will be classified as non-homogeneous.
We now implement the test for homogeneity on Equation (2.1) to check if this equation is homogeneous or not. To do this, let \(y=ky\), and so Equation (2.1) becomes \[\begin{equation} \dfrac{d^2 (ky)}{dx^2}+3\dfrac{d (ky)}{dx}+2ky=\sin{x}, \end{equation}\] \[\begin{equation} k\dfrac{d^2 y}{dx^2}+3k\dfrac{d y}{dx}+2ky=\sin{x}, \end{equation}\] \[\begin{equation} k\left( \dfrac{d^2 y}{dx^2}+3\dfrac{d y}{dx}+2y\right) =\sin{x}, \end{equation}\] \[\begin{equation} \dfrac{d^2 y}{dx^2}+3\dfrac{d y}{dx}+2y=\frac{1}{k}\sin{x}. \tag{2.3} \end{equation}\] Recall that \(k\) is a non-zero constant, i.e. \(k\neq 0.\) Thus, we can conclude that Equation (2.1) is non-homogeneous as the structure of the original Equation (2.1) and the resultant transformed Equation (2.3) are different.
Now, let us remove \(\sin{x}\) in Equation (2.1) to get the equation \[\begin{equation} \dfrac{d^2 y}{dx^2}+3\dfrac{d y}{dx}+2y=0. \tag{2.4} \end{equation}\] Let us now conduct the test for homogeneity on Equation (2.4). Again we let \(y=ky\) to get, \[\begin{equation} \dfrac{d^2 (ky)}{dx^2}+3\dfrac{d (ky)}{dx}+2ky=0, \end{equation}\] \[\begin{equation} k\dfrac{d^2 y}{dx^2}+3k\dfrac{d y}{dx}+2ky=0, \end{equation}\] \[\begin{equation} k\left( \dfrac{d^2 y}{dx^2}+3\dfrac{d y}{dx}+2y\right) =0, \end{equation}\] Since \(k \neq 0\), it follows that \[\begin{equation} \dfrac{d^2 y}{dx^2}+3\dfrac{d y}{dx}+2y=0 \tag{2.5} \end{equation}\] Equation (2.4) is homogeneous as it is the same as Equation (2.5) under the transformation, i.e. the equation remained invariant.
Let us now clarify or refine this definition for homogeneity for linear ordinary differential equations.
Definition 2.7 (Homogeneity of a Linear Ordinary Differential Equation) Consider the \(nth\)-order linear ODE given in Equation (2.2). \[\begin{equation} a_{n}(x)\dfrac{d^n y}{dx^n}+a_{n-1}(x)\dfrac{d^{n-1} y}{dx^{n-1}}+\dots+ a_{2}(x)\dfrac{d^2 y}{dx^2}+a_{1}(x)\dfrac{d y}{dx}+a_{0}(x)y=g(x) \tag{2.2} \end{equation}\] where the coefficient functions, \(a_{n}(x), a_{n-1}(x), \dots, a_{2}(x), a_{1}(x), g(x)\) can be any functions of the independent variable \(x\) (including a constant/zero function).
Equation (2.2) is non-homogeneous with respect to the dependent variable (say \(y\), in this case) if \(g(x) \neq 0\), in other words \(g(x)\) is not identically zero and the ODE contains terms that are functions of the independent variable, including constants.
Now consider the case when \(g(x)=0\), that is \[\begin{equation} a_{n}(x)\dfrac{d^n y}{dx^n}+a_{n-1}(x)\dfrac{d^{n-1} y}{dx^{n-1}}+\dots+ a_{2}(x)\dfrac{d^2 y}{dx^2}+a_{1}(x)\dfrac{d y}{dx}+a_{0}(x)y=0 \tag{2.6} \end{equation}\] An \(nth\)-order linear ODE such as in Equation (2.6) is homogeneous with respect to the dependent variable (say \(y\), in this case) if \(g(x)=0\), in other words it does not contain any term that is a function of the independent variable only, including constants.
Based on the above refined definition for homogeneity for linear ODEs, Equation (2.1) is a non-homogeneous second-order linear ordinary differential equation since \(g(x)=\sin x\) (a non-zero function of the independent variable \(x\)), whereas Equation (2.4) is a homogeneous second-order linear ordinary differential equation since \(g(x)=0\).
Remark. One can only use Definition 2.7 for homogeneity once you have concluded that the ODE is linear. In that case, homogeneity can be done by inspection based on whether the function of the independent variable \(g(x)=0\) (homogeneous) or \(g(x) \neq 0\) (non-homogeneous).
To summarize: the key difference between homogeneous and non-homogeneous linear ODEs is the presence of a forcing term. In a non-homogeneous linear ODE, there is an additional term which is not identically zero: a function (on the right-hand side) that depends on the independent variable, such as \(f(x)\) or \(g(t)\). This function is called the forcing term or the non-homogeneous part of the equation because it forces the solution to have a particular behaviour. Non-homogeneous ODEs are used to model phenomena where there is an external influence on the system being modeled, such as in electrical circuits or mechanical systems.
In contrast, a homogeneous linear ODE is an equation in which the forcing term is identically zero. Homogeneous ODEs are used to model phenomena where the system being modeled is self-contained and does not have any external influences. An example of a homogeneous ODE is \(y'' + 4y' + 3y = 0\), where \(y=y(x)\), which models the behavior of a mass-spring system without any external forces acting on it.
2.3.4 Classification by coefficients
Definition 2.8 (Coefficients of an Ordinary Differential Equation) The coefficient of any term of an ODE is that factor of the term which does not involve the unknown function or any of its derivatives. An ODE can have constant or variable (non-constant) coefficients.
An ODE has constant coefficients if all terms in the equation involving the dependent variable and its derivatives are preceded by coefficients that are constants.
An ODE has variable coefficients if at least one of the terms in the equation involving the dependent variable and its derivatives are preceded by coefficients that are functions of the independent variable.
Equation (2.1) has constant coefficients. The coefficients of \(\dfrac{d^2 y}{dx^2}\) is 1, \(\dfrac{d y}{dx}\) is 3, and \(y\) is 2, all of which are constants.
The coefficients play a crucial role in determining the behavior of the solution to an ODE. They can affect whether the solution is oscillatory or decaying, and they can also impact the stability of the solution. Understanding the coefficients is essential for solving and interpreting ODEs.
Classification of Differential Equations: Examples
- \(\dfrac{d^2 y}{dx^2}-2\dfrac{d y}{dx}+3y=0\)
2. \(5 \dfrac{d^2 x}{dt^2}+7\dfrac{d x}{dt}-8x=e^{x}\)
3. \(x^2\dfrac{d^2 y}{dx^2}+x\dfrac{d y}{dx}-y=0\)
4. \(s\dfrac{d^3 s}{dt^3}-6\left( \dfrac{d^2 s}{dt^2}\right) ^2+3\dfrac{d s}{dt}=0\)
Exercise:
Check if the following differential equations are ODEs, and then classify them in terms of their order, linearity, homogeneity, and coefficients:
\(t \dfrac{d^3 x}{dt^3}-2\left(\dfrac{d x}{dt}\right) ^4+x=0\)
\(y y'+2y=1+x^2\), where \(y=y(x)\)
\(y''+9y=\sin y\), where \(y=y(x)\)
\(\dfrac{d^2 R}{dt^2}=\dfrac{\kappa}{R^2}\), where \(\kappa\) (read: kappa) is a constant
\(x^5\dfrac{d^4 y}{dx^4}-x^3 \dfrac{d^3 y}{dx^3}+6y=0\)
\(\dfrac{d^2 x}{dt^2}=\sqrt{1+\left( \dfrac{d x}{dt}\right) ^2}\)
Did you get it?
Check your understanding of some of the concepts covered at this stage by attempting the DYGIT? on ODEs and Classification. This is a formative assessment task and does not count for marks so please do it on your own to ascertain your own learning.
2.4 Solutions of Ordinary Differential Equations
Differential equations appear naturally in mathematics and physics as the determining equations governing the behaviour of physical systems. The key outcome of this chapter is to find solutions to various classes of differential equations that will arise from our modelling processes in Chapter 3.
As stated previously, the property of a differential equation that makes it different from an algebraic equation is that the solutions to algebraic equations are numbers whereas the solutions to differential equations are themselves functions or equations. This means that the solution to a formal continuous model is not a number that might describe what a given system is doing at any one point in time or place (static), but rather a function or equation that describes what the system does and evolves over time (dynamic). The particular behaviour of the system at a given point in time and space can be determined by evaluating the solution to the differential equation at that point of interest.
2.4.1 Concept of a Solution
Definition 2.9 (Solution of an Ordinary Differential Equation) A function \(y=h(x)\) is a solution of a given \(n\)-th order differential equation in the unknown dependent variable \(y\) and the independent variable \(x\) if it is defined on some interval \(I\), and identically satisfies the differential equation for all \(x\) in \(I\).
In other words, substituting the solution \(y=h(x)\) into the differential equation reduces the equation to an identity. We say that \(y=h(x)\) satisfies the differential equation.
Remark. While we have just emphasized the concept of a solution, it is important to point out that a differential equation may not possess any real solution. Otherwise stated, it would be incorrect to assume that any differential equation possesses a solution. The concepts of the existence and uniqueness of solutions to differential equations will not be explicitly covered in a theoretical context for now, but it may feature later, and it definitely will appear in other courses related to differential equations going forward. I am just flagging this here for completeness.
Verification of a Solution
One way to verify that a given function \(y=h(x)\) is a solution to the differential equation is to substitute this solution on either side of the DE and evaluate whether both sides result in the same output for every \(x\) in the interval \(I\). Let us consider an example.
Example: Verify that \(y=\frac{1}{16}x^4\) is a solution to the DE \(\dfrac{d y}{dx}=xy^{\frac{1}{2}}\)
Solution:
Definition 2.10 (Trivial Solution of an Ordinary Differential Equation) A trivial solution of a differential equation is a solution that is identically zero on an interval \(I\).
Definition 2.11 (Explicit Solution of an Ordinary Differential Equation) An explicit solution of a differential equation is a solution \(y=h(x)\) in which the dependent variable is expressed solely in terms of the independent variable and constants.
Exercise:
Verify that the indicated function is a solution of the given differential equation on the interval \((-\infty, \infty)\).
- \(y''-2y'+y=0; \quad y=xe^x\)
- \(u''(t)+2u'(t)+2u(t)=0;\)
- \(\quad u(t)=e^{-t}\sin t,\)
- \(\quad u(t)=e^{-t}\cos t\)
Thinking Questions:
- We do not yet know how to find the solutions to a DE. Based on the above exercise, given the solution to the DE, are you able to think of how we landed up with that solution?
- In the second question in the exercise, two solutions are given. What does that tell you?
- Do those two differential equations contain the trivial solution?
2.4.2 Solution Curves
Definition 2.12 (Solution Curve of an Ordinary Differential Equation) The solution curve of a differential equation is the graph of its solution \(y=h(x)\).
The study of differential equations is similar to that of integral calculus. When you evaluated an indefinite integral in calculus, you used a single constant \(c\) of integration. In the same way, when solving a first-order differential equation, we usually obtain a solution containing a single arbitrary constant or parameter \(c\).
Remark. We can use any letter or symbol to represent an arbitrary constant. There is no convention in this regard. Remember that the arbitrary constant is just a placeholder for the infinite number of solutions that the general solution to a differential equation possesses.
The number of arbitrary constants in a solution is governed by the order of the differential equation. Hence, a first-order differential equation will have a solution containing one arbitrary constant, whereas an \(n\)th-order differential equation will have a solution containing \(n\) arbitrary constants.
Definition 2.13 (General Solution of an Ordinary Differential Equation) The general solution of a differential equation is the solution that contains one or more arbitrary constants or parameters.
The arbitrary constant encompasses all the infinite solutions that the differential equation satisfies. A solution containing one arbitrary constant gives rise to a set of solutions called a one-parameter family of solutions. When solving an nth-order differential equation, we get an n-parameter family of solutions. This means that a single differential equation can possess an infinite number of solutions corresponding to the unlimited number of choices for the arbitrary constant(s)/parameter(s).
Definition 2.14 (Family of Solution Curves of an Ordinary Differential Equation) A family of solution curves of a differential equation is the geometric solution of a differential equation containing infinitely many solution curves, one for each value (or combination of values) of the arbitrary constants or parameters.
We may also be interested in a solution to the differential equation for a particular value(s) of the arbitrary constant(s).
Definition 2.15 (Particular Solution of an Ordinary Differential Equation) A particular solution of a differential equation is a solution that does not contain any arbitrary constants or parameters.
For example, the one-parameter family of solutions given by \(y=cx-x \cos x\) is an explicit solution of the linear first-order differential equation \(xy'-y= x^2 \sin x\) (Verify this). Figure 1 below taken from Zill and Cullen, shows the graphs of some of the solutions in this family governed by infinite values of the arbitrary constant \(c\). The solution \(y=-x \cos x\), the blue curve in the figure, is a particular solution corresponding to the value of the arbitrary constant \(c=0\).

Exercise:
Draw a rough sketch or use a graphing calculator like Desmos to find the family of solution curves for the following differential equations:
- \(y'=\cos x; \quad y=\sin x + c\)
- \(y'=-0.2y, \quad y=Be^{-0.2t}\)
Did you get it?
Check your understanding of some of the concepts covered at this stage by attempting the DYGIT? on Solutions of ODEs. This is a formative assessment task and does not count for marks so please do it on your own to ascertain your own learning.
2.5 Methods of Solution for Ordinary Differential Equations
Euler’s Number and Ordinary Differential Equations
In the next section we shall familiarize ourselves with some interesting aspects of the behaviour of an important function and its derivatives that will appear in the solutions to differential equations that will follow thereafter.
Let us consider the function \(y = e^{x}\). This function has many interesting characteristics. For example, consider its derivative, \[\begin{equation*} \dfrac{d}{dx} e^{x} =\lim_{h \to 0}{\dfrac{e^{x + h} - e^{x}}{h}}. \end{equation*}\] If we simply factor out the \(e^{x}\) and note it is not affected by the limit, we get the following, \[\begin{equation*} \dfrac{d}{dx}e^{x} = e^{x} \lim_{h \to 0}{\dfrac{e^{h} - 1}{h}}. \end{equation*}\] With a simple substitution of \(n = e^{h}-1\) and some algebraic manipulation we can show that this is equivalent to \[\begin{equation} \dfrac{d}{dx} e^{x} = e^{x}\dfrac{1}{\lim_{n \to 0}\ln{(1+n)^{\dfrac{1}{n}}}}. \tag{2.7} \end{equation}\] At this point we note that \[\begin{equation} e = \lim_{n \to 0}{(1+n)^{\dfrac{1}{n}}}, \tag{2.8} \end{equation}\] where both of these have an approximate solution of 2.7182818284… We call \(e\) Euler’s number. Now substituting Equation (2.8) into Equation (2.7), we find a useful result. \[\begin{equation} \dfrac{d}{dx} e^{x} = e^{x}. \end{equation}\] Using this knowledge we can consider evaluating the derivative of \[\begin{equation} y = \ln{x}. \tag{2.9} \end{equation}\] After a simple manipulation of Equation (2.9), we get \[\begin{equation*} e^{y} = x. \end{equation*}\] Applying implicit differentiation to this we get \[\begin{equation*} e^{y} \dfrac{dy}{dx} = 1. \end{equation*}\] Rearranging we find \[\begin{equation*} \dfrac{dy}{dx} = \dfrac{1}{e^{y}}. \end{equation*}\] By substituting Equation (2.9) into this we get \[\begin{equation*} \dfrac{dy}{dx} = \dfrac{1}{e^{\ln{x}}}, \end{equation*}\] which simplifies to our next useful result. \[\begin{equation*} \dfrac{d}{dx} \ln{x} = \dfrac{1}{x}. \end{equation*}\] There is a special relationship between the instantaneous rate of change of a function and the function itself. This is a general pattern that we observe when studying rates of change. In addition, the number \(e\) shall play an important role in the solution to many models.
We will consider three particular methods of solution for ordinary differential equations in this course:
2.5.1 The Method of Direct Integration
2.5.2 The Method of Separation of Variables
2.5.3 The Method of Undetermined Coefficients
These are just three analytical methods for finding solutions to differential equations. There are numerous other analytical ndd numerical methods you will encounter in Mathematics, Physics, and further studies in Applied Mathematics.
Before delving in to the Methods section, I would like to draw your attention back to the preceding Chapter on the Prerequisites for this course. It would be worthwhile digging out your Calculus notes now. Here is a quick preamble:
You should also watch this recap of Section 2.3 before continuing as knowing how to correctly classify a differential equation is going to be essential when we decide which method of solution is appropriate for a given DE.
2.5.1 The Method of Direct Integration
The Method of Direct Integration can be used for \(n\)-th order differential equations, provided that they are differential equations that can be written in the standard form: \[\begin{equation} \dfrac{d^n y}{dx^n}=g(x). \tag{2.10} \end{equation}\]
Notice the following key classification criteria:
- The left hand side of the differential equation in (2.10) contains a single derivative of the dependent variable, of any order. The key here is that there are not multiple derivatives of the dependent variable.
- The derivative of the dependent variable is linear, meaning its degree is at most one, and there contains no products of the dependent variable with this derivative.
- The right hand side of the differential equation in (2.10) is a function of the independent variable only, i.e. \(g=g(x)\). This may include a constant/non-zero function of the independent variable. This means that the right hand side of the differential equation cannot contain any term or function involving the dependent variable.
If these classification criteria are met, the differential equation can be solved using the Method of Direct Integration. In this case, you can integrate the differential equation a sufficient number of times (\(n\) times in (2.10)) until \(y\) is found.
For example, the equation \[\begin{equation*} \dfrac{d^2 y}{dx^2}= x^3+3x+1, \end{equation*}\] satisfies the aforementioned criteria as the left hand side contains a single derivative of the dependent variable \(y\) that is linear and of the second order, while the right hand side contains some function of the independent variable \(x\). However, the equation \[\begin{equation} \dfrac{d x}{dt}= 3t+x^2, \end{equation}\] does not meet the criteria for the Method of Direct Integration. Even though the left hand side contains a single derivative of the dependent variable \(x\) that is linear and of the first order, the right hand side contains some function of the independent and dependent variable, i.e. \(g=g(t,x)\). What about the differential equation \[\begin{equation} y''+y'= x^3+3x+1, \end{equation}\] where \(y=y(x)\)? While the right hand side contains some function of the independent variable \(x\) only, the left hand side contains both a second and first derivative of the dependent variable, thus the Method of Direct Integration cannot be used here.
Remark. Please note here that a differential equation may not present itself in the form set out in Equation (2.10). Sometimes, manipulation will be required in order to write a given DE in this form before you can apply the method. But it is equally important that you do not force an equation to meet this form if it cannot be done. All that means is the differential equation cannot be solved using this method, and that another method may be applicable.
For example, do the following differential equations meet the criteria to use the Method of Direct Integration?
\[\begin{equation}
y''= x^3+3x-2y''+1,
\end{equation}\]
and
\[\begin{equation}
\left(\dfrac{d^2 y}{dx^2}\right)^{2}= x^3+3x+1.
\end{equation}\]
Remark. It is important to remember the reasons why we were interested in classifying a differential equation. Hopefully you can see now how certain elements of classification are key markers to determine when a method of solution is applicable.
Once a given differential equation is shown to meet the form specified in Equation (2.10), the method of solution is simple: integrate both sides of the differential equation with respect to the independent variable \(x\), i.e.
\[\begin{equation}
\int \dfrac{d^n y}{dx^n} dx=\int g(x) dx.
\end{equation}\]
You then need to integrate this differential equation \(n\) times sequentially to get the following solution for the dependent variable \(y\):
\[\begin{equation}
y=G(x_1)+G(x_2)+...+G(x_n)+c_1+c_2+...+c_n,
\tag{2.11}
\end{equation}\]
where \(G(x_i)\) represents the antiderivatives, and \(c_i\) the constants of integration that result from integrating the differential equation \(n\) times. Equation (2.11) represents the general solution of the differential equation (2.10) by using the Method of Direct Integration.
Let us look at a simple first order case. This is what I mean:
Let us now consider some examples:
Examples
- \(\dfrac{d y}{dx}+\sin 2x=0\)
2. \(\dfrac{d^3 y}{dx^3}=\sin 2x+e^{-2x}+x^2+x+7\)
Notice from the above example that:
- We had a third order derivative and we needed to integrate three times to find the solution for the dependent variable \(y\). In other words, the order of the differential equation dictates how many integration you need to do.
- These three integrations resulted in three arbitrary constants. In other words, the order of the differential equation will dictate the parameter of the family of solution curves.
- When integrating the differential equation the second and third time, it is imperative that you remember to integrate the terms containing any arbitrary constant as well.
- Be wary of your signs when integrating.
Did you get it?
Check your understanding of some of the concepts covered at this stage by attempting the DYGIT? on Direct Integration. This is a formative assessment task and does not count for marks so please do it on your own to ascertain your own learning.
2.5.2 The Method of Separation of Variables
Unlike the Method of Direct Integration outlined in 2.5.1, the Method of Separation of Variables can only be used for first-order differential equations.
Consider a first-order differential equation of the form \[\begin{equation} \dfrac{d y}{dx}=g(x)h(y). \tag{2.12} \end{equation}\]
Notice the following key classification criteria:
- The left hand side of the differential equation in (2.12) contains a single derivative of the dependent variable that is of the first order. The key here also is that there are not multiple derivatives of the dependent variable, only the first derivative.
- The first derivative of the dependent variable is linear, meaning its degree is at most one.
- The right hand side of the differential equation in (2.12) consists of the product of distinct functions of the dependent variable \(y\) and the independent variable \(x\), i.e. it contains a separate and distinct product of functions \(g=g(x)\) and \(h=h(y)\). Here also, the functions \(g\) and \(h\) may include a constant/non-zero function of the dependent or independent variable respectively. This means that the right hand side of the differential equation may contain terms or functions involving the dependent variable, provided it is a product with the terms or functions involving the independent variable.
If these classification criteria are met, the differential equation can be solved using the Method of Separation of Variables. For example, the equation \[\begin{equation*} \dfrac{d y}{dx}= y^2 x e^{3x+4y}, \end{equation*}\] is separable as it satisfies the aforementioned criteria as the left hand side contains a single first derivative of the dependent variable \(y\) that is linear and of the first order, while the right hand side contains a product of a function of the independent variable (\(g(x)=xe^{3x}\)), and a function of the dependent variable (\(h(y)=y^2e^{4y}\)). Notice that some manipulation was required here. However, the equation \[\begin{equation} \dfrac{d x}{dt}= x +\sin t, \end{equation}\] is not separable as it does not meet the criteria for the Method of Separation of Variables. Even though the left hand side contains a single derivative of the dependent variable \(x\) that is linear and of the first order, there is no way of expressing the right hand side \(x +\sin t\) as a product of a function of the independent variable \(t\) (\(g(t)\)), and a function of the dependent variable \(x\) (\(h(x)\)). Try your best :)
Remark. Please note again here that a differential equation may not present itself in the form set out in Equation (2.12). Sometimes, manipulation will be required in order to write a given DE in this form before you can apply the method. But it is equally important that you do not force an equation to meet this form if it cannot be done. All that means is the differential equation cannot be solved using this method, and that yet another method may be applicable.
Such a differential equation as written in the form given in Equation (2.12) is called separable since it is possible to separate the dependent and independent variables on different sides of the equation, i.e.
\[\begin{equation*}
\dfrac{1}{h(y)} \dfrac{d y}{dx}=g(x).
\end{equation*}\]
Under these specific circumstances when we have a first derivative only, we can treat the differentials/infinitesimals \(dy\) and \(dx\) as normal algebraic quantities and multiply or divide them on either side of the equation. This means that we can separate the dependent and independent variables on different sides of the equation along with its associated differential, i.e.
\[\begin{equation*}
\dfrac{1}{h(y)} dy=g(x) dx.
\end{equation*}\]
Once we have isolated the functions of the dependent variable \(y\) and its associated differential \(dy\), and the functions of the independent variable \(x\) and its associated differential \(dx\) on either side of the equation, we can then integrate both sides of the equation with respect to its associated differential, i.e.
\[\begin{equation*}
\int \dfrac{1}{h(y)} dy=\int g(x) dx.
\end{equation*}\]
We can then use the rules of integration as well as some algebraic manipulation in order to find a solution for the dependent variable \(y\). Hence, the general solution of Equation (2.12) is given by
\[\begin{equation*}
\int \dfrac{1}{h(y)} dy=\int g(x) dx +c,
\end{equation*}\]
where \(c\) is the constant of integration. Note here that even though we are computing an integral on either side of the equation, we only require one constant of integration due to the nature of arbitrary constants.
Remark. It is important to note here that a separable ordinary differential equation may not necessarily be analytically solvable as the resulting integrals may not always be reducible to elementary functions.
Even when this integration is analytically possible, it is oftentimes the case that this solution for the dependent variable \(y\) will be in implicit form. We will endeavour as much as possible to write this solution in explicit form as outlined in Definition 2.11. Again, do not force a solution into explicit form if it cannot be written as such. We will leave such solutions in implicit form. If a question does not state otherwise, you can assume that I require an explicit solution. When an implicit solution is deemed sufficient, I will state that “you may leave your solution in implicit form”.
Examples
- \(\dfrac{d y}{dx}=2\)
2. \(\dfrac{d y}{dx}=\sin x\)
3. \(\dfrac{d y}{dx}=xy\)
4. \(\dfrac{d y}{dx}-2y=0\)
Try this on your own
- \(\dfrac{d y}{dx}-2y=3\)
(Ignore the reference in the beginning to page numbers and notes. This is my video from last year.)
6. \(\dfrac{d y}{dx}-\dfrac{y}{x}=0\)
Try this on your own
- \(\dfrac{d y}{dx}-2y^2+5y=3\)
This example requires a full understanding of the algebraic technique called partial fraction decomposition which you have covered in Mathematics.
Thinking Questions:
- Can a given differential equation meet the criteria to be solved by using either the Method of Direct Integration, or the Method of Separation of Variables?
- If so, what does that tell you?
- If so, can you think of examples of such differential equations?
- If so, go back to all the examples of differential equations you have seen thus far, and observe them through this dual lens.
Exercise
In the problems below, solve the given differential equation for its general solution in explicit form by using either the method of direct integration, separation of variables, or both.
\(\dfrac{d^2 x}{dt^2}+16x=0\)
\(\dot x+5x=10\)
\(\dfrac{d^3 y}{dx^3}-2y=0\)
\(y\dfrac{d y}{dx}=\sin 5x\)
\(\dfrac{d^3 y}{dx^3}=\sin 5x\)
\((1+x) dy-y dx=0\), where \(y=y(x)\)
\(\dfrac{d y}{dx}=(x+1)^2\)
\(dx+e^{3x}dy=0\), where \(y=y(x)\)
\(\dfrac{d^3 y}{dx^3}-2y^2=0\)
\(\dfrac{d^3 y}{dx^3}-2x^2=0\)
\(\dfrac{d S}{dt}-\dfrac{5S}{t}=0\)
\(y\dfrac{d y}{dx}=3y^2+1\)
\(y'-3y^2-y=0\)
\(\dfrac{d x}{dt}-x^2=-4\)
\(t \dot x -(1+t)x=0\)
\((a^2-x^2)y'+xy=0\), where \(a\) is a constant
\(\dfrac{d y}{dx}-\dfrac{y+3}{x^2-3x+2}=0\)
Find an implicit general solution to the following equation \(\dfrac{y}{x^2}\dfrac{d y}{dx}+e^{2x^{3}+y^{2}}=0\)
Did you get it?
Check your understanding of some of the concepts covered at this stage by attempting the DYGIT? on Separation of Variables. This is a formative assessment task and does not count for marks so please do it on your own to ascertain your own learning.
2.6 Initial Value Problems
As we have noted previously, the solution of an ordinary differential equation is not unique, as it contains arbitrary constants. This is a natural reflection of the fact that a physical law describes an infinitely large number of processes, hence an infinitely large number of solution curves. We had referred to this solution as the general solution.
In order to obtain a unique process, or a unique solution of a differential equation, we need to use additional conditions that specify the initial state of the process. We refer to this solution as a particular solution.
We are often interested in problems in which we seek a solution \(y(x)\) of a differential equation so that \(y(x)\) satisfies these prescribed additional conditions imposed on the unknown function \(y(x)\) or any of its derivatives. That is, we need to
Solve: \[\begin{equation} \dfrac{d^n y}{dx^n}=f(x,y,y',...,y^{(n-1)}), \tag{2.13} \end{equation}\] Subject to: \[\begin{equation} y(x_0)=y_0, y'(x_0)=y_1,...,y^{(n-1)}(x_0)=y_{n-1}, \tag{2.14} \end{equation}\] where \(y_0\), \(y_1\),…,\(y_{n-1}\) are arbitrarily specified real constants, is called an nth-order initial-value problem (IVP) or Cauchy problem. The values of \(y(x)\) and its first \(n-1\) derivatives at a single point \(x_0\), as given in Equation (2.14), are called initial conditions.
Solving this nth-order initial-value problem entails first finding an \(n\)-parameter family of solutions of the given differential equation in Equation (2.13) (the general solution), and then using the \(n\) initial conditions at \(x_0\) in Equation (2.14) to determine numerical values of the \(n\) constants in the family (a particular solution). It is important to note here that the number of initial conditions coincides with the order of the differential equation. So in this case, we have \(n\) initial conditions corresponding to an \(nth\) order differential equation. Otherwise stated, the number of initial conditions that need to be specified is equal to the number of arbitrary constants in the general solution.
Remark. The initial conditions must and can only be applied once the general solution has been found.
A first-order explicit ODE has an initial value problem that is of the form
Solve: \[\begin{equation} y'=f(x,y), \quad \text{subject to} \quad y(x_0)=y_0. \tag{2.15} \end{equation}\]
In most cases the unique solution of a given first-order initial value problem as given in Equation (2.15), hence a particular solution, is obtained from a general solution by an initial condition \(y(x_0)=y_0\), with given values \(x_0\) and \(y_0\), that is used to determine a value of the arbitrary constant \(c\). Geometrically this condition means that the solution curve should pass through the point \((x_0, y_0)\) in the \(xy\)-plane.
A second-order initial-value problem is of the form
Solve: \[\begin{equation} y''=f(x,y,y'), \quad \text{subject to} \quad y(x_0)=y_0, y'(x_0)=y_1. \tag{2.16} \end{equation}\] In geometric terms, we want to find a solution \(y(x)\) to the second-order initial value problem as given in Equation (2.16) so that its solution curve not only passes through \((x_0, y_0)\), but the slope of the curve at this point is the number \(y_1\).
These two solution curves are shown in Figure 2 from Zill and Cullen below:

Remark. The words initial conditions derive from physical systems where the independent variable is time \(t\) and where \(y(t_0) = y_0\) and \(y'(t_0) = y_1\) represent the position and velocity, respectively, of an object at some beginning, or initial, time \(t_0\) (See your Mechanics course).
Examples
- \(y'=3y, \quad \text{subject to} \quad y(0)=5.7\)
2. Revisited \(\dfrac{d^3 y}{dx^3}=\sin 2x+e^{-2x}+x^2+x+7, \quad \text{subject to} \quad y(0)=0,y'(0)=1,y''(0)=0\)
Try this for yourself based on the solution we have already obtained previously.
Notice from the above example that:
- We had a third order derivative and we needed three initial conditions in order to find specific values for the the three arbitrary constants, i.e. a particular solution. In other words, the order of the differential equation dictates how many initial conditions are required in order to find a particular solution.
- \(\dfrac{d y}{dx}=-\dfrac{x}{y}, \quad \text{subject to} \quad y(4)=-3\)
4. \((e^{2y}-y) \cos x \dfrac{d y}{dx}=e^y \sin 2x, \quad \text{subject to} \quad y(0)=0\)
Exercise
In the problems below, find an explicit solution for the given initial-value problem.
\(\dfrac{d x}{dt}=4(x^2+1); \quad x(\pi/4)=1\)
\(\dfrac{d y}{dx}=\dfrac{y^2-1}{x^2-1}; \quad y(2)=2\)
\(x^2\dfrac{d y}{dx}=y-xy; \quad y(-1)=-1\)
Did you get it?
Check your understanding of some of the concepts covered at this stage by attempting the DYGIT? on Initial Value Problems. This is a formative assessment task and does not count for marks so please do it on your own to ascertain your own learning.
–> –> –> –> –>