1.3. Analytical Methods for ODEs#
1.3.1. Separable Equations#
Definition 1.6 (Separable Equation)
A first-order differential equation of the form
is said to be separable or to have separable variables.
To solve the separable ODE (1.7), we re-arrange it as
then integrate both sides
so we can get the implicit solution
Example 1.6
Solve \((1+x)\dy - y \dx=0\)
Solution
Re-arranging the equation as
and integrating both sides
so
Example 1.7
Solve \(\displaystyle \diff{y}{x} = \frac{x-5}{y^2}\).
Solution
Rearranging the equation as
Integrating both sides
So the implicit solution is
1.3.2. Linear Equations with Constant Coefficients#
Here we focus on a particular type of \(n\)-th order ODE given as
where the coefficients \(a_p~(p=0, 1, \ldots, n)\) are constants.
Definition 1.7 (Differential Operator \(\D\))
We define \(\D\) as the differential operator, which can be applied on a function \(y=y(x)\) to obtain its derivative
then the \(n\)-th derivative is
Thus we can write the ODE (1.8) in its operator form as
We define the overall operation on \(y\) as
then the equation can also be written as
Definition 1.8 (Characteristic Polynomial and Characteristic Equation)
For equation (1.8), we define its characteristic polynomial as
Note: We can simply replace the operator \(\D\) in formula (1.10) with \(z\) to obtain the characteristic polynomial.
The equation
is called the characteristic equation of the ODE (1.8).
Note: In some books, the characteristic equation is also called auxiliary equation.
1.3.2.1. Homogeneous ODEs#
When the right hand side of equation (1.8) vanishes, i.e. \(g(x)\equiv 0\), we obtain a linear homogeneous ordinary differential equation with constant coefficients
Theorem 1.2 (Superposition Principle — Homogeneous Equations)
Let \(\phi_1(x)\), \(\phi_2(x)\), … , \(\phi_n(x)\) be solutions to the homogeneous \(n\)th order differential equation (1.13) on an interval \(I\), then the linear combination
where \(c_p ~ (p=1, 2, \ldots, n)\) are arbitrary constants, is also a solution on the interval.
We will work step by step to look at the solutions of:
First-order ODEs
Second-order ODEs
Higher-order ODEs
1.3.2.1.1. First-order ODEs#
Solve \(a_1 y' + a_0 y =0\)
Solution
Writing the equation as
separating the variables
integrating both sides
Using the differential operator \(\D\) to rewrite the equation as
and we get the characteristic equation
and its root is \(z = -\dfrac{a_0}{a_1}\). Therefore the general solution to the first-order ODE is
1.3.2.1.2. Second-order ODEs#
Solve \(a y'' + b y'+ c y=0\)
Solution
Using the differential operator \(\D\), we write the equation as
so characteristic/auxiliary equation is
and its roots
can be:
Case 1: two distinct real solutions (\(z_1 \neq z_2 \in \R\));
The general solution of the second-order ODE is
\[ y=c_1 e^{z_1 x} + c_2 e^{z_2 x} \]Case 2: two identical real solutions (\(z_1 = z_2 =z \in \R\));
The general solution of the second-order ODE is
\[ y=c_1 e^{z x} + c_2 x e^{z x} \]Case 3: two conjugate complex solutions (\(z_{1,2} = \alpha \pm \i \beta \in \C\));.
The general solution of the second-order ODE is
\[ y=k_1 e^{(\alpha + \i \beta) x} + k_2 e^{(\alpha - \i \beta) x} \]or we can write it as
\[ y=e^{\alpha x} \left(c_1 \cos \beta x + c_2 \sin \beta x \right), \quad c_1, c_2 \in \C \]
Example 1.8
Solving the following ODEs:
\(2y''-5y'-3y=0\)
\(y''-10y'+25y=0\)
\(y''+4y'+7y=0\)
Solution
\(2z^2-5z-3=(2z+1)(z-3)=0\), \(\quad z_1=-\frac{1}{2}\) and \(z_2=3\)
\(y=c_1 e^{-\frac{x}{2}}+c_2 e^{3x}\)
\(z^2-10z+25=(z-5)^2=0\), \(\quad z_1=z_2=5\)
\(y=c_1 e^{5x} + c_2 x e^{5x}\)
\(z^2+4z+7=0\), \(\quad z_1=-2+\sqrt{3}i\) and \(z_2=-2-\sqrt{3}i\)
\(y=e^{-2x} \left( c_1 \cos \sqrt{3}x + c_2 \sin \sqrt{3}x \right)\)
1.3.2.1.3. Higher-order ODEs#
Solve an \(n\)th order ODE \( \left( a_n \D^n + a_{n-1} \D^{n-1} + \cdots + a_1 \D + a_0 \right) y = 0 \)
Solution
The characteristic equation is
Case 1: \(n\) distinct real solutions (\(z_1 \neq z_2 \neq \cdots \neq z_n \in \R\))
The general solution is
\[ y=c_1 e^{z_1 x} + c_2 e^{z_2 x} + \cdots + c_n e^{z_n x} \]Case 2: \(n\) repeated real solutions (\(z_1=z_2= \cdots =z_n=z \in \R\))
The general solution is
\[ y=c_1 e^{z x} + c_2 x e^{z x} + \cdots + c_n x^{n-1} e^{z x} \]Case 3: \(m\)-pair (\(n=2m\)) conjugate complex solutions
\[\begin{split} \begin{aligned} z_{1,2} & = \alpha_1 \pm \i \beta_1 \\ z_{3,4} & = \alpha_2 \pm \i \beta_2 \\ & \vdots ~ \\ z_{2m-1, 2m} & = \alpha_m \pm \i \beta_m \end{aligned} \end{split}\]The general solution is
\[\begin{split} \begin{aligned} y ~ = ~ & ~ e^{\alpha_1 x} (c_1 \cos \beta_1 x + c_2 \sin \beta_1x) \\ + & ~ e^{\alpha_2 x} (c_3 \cos \beta_2 x + c_4 \sin \beta_2x) \\ & \vdots \\ + & ~ e^{\alpha_m x} (c_{2m-1} \cos \beta_m x + c_{2m} \sin \beta_m x) \end{aligned} \end{split}\]
1.3.2.2. Nonhomogeneous ODEs#
Here we consider a linear nonhomogeneous ODE with constant coefficients given by
The solution \(y(x)\) to equation (1.14) includes two parts:
A homogeneous component \(y_h(x)\), which is the general solution to the homogeneous equation \(\L (\D) y_h = 0\). In some books \(y_h (x)\) is also called complementary solution.
A particular component \(y_p(x)\), which is a particular solution to the nonhomogeneous equation \(\L (\D) y_p = g(x)\).
In conclusion, the solution to equation (1.14) is
The way to find \(y_h(x)\) is the same as described in Homogeneous ODEs. Here we will introduce the Undetermined Coefficients Method to find the particular solution \(y_p(x)\)
Example 1.9
Find the solution to
Solution
Step 1: find a particular solution to the equation
We need to find a function \(y(t)\) to satisfy
\[ (\D^2+3\D+2) y(t) = 3t, \]where \(\D\) is the differential operator.
It seems \(y(t)\) should be a polynomial function, and we can try a linear function
\[ y(t)=At+B \]to see whether it could fit
\[\begin{split} \begin{aligned} (\D^2+3\D+2) (At+B) & = \D^2 (At+B) + 3\D (At+B) + 2(At+B) \\ & = (0) + (3A) + (2At+2B) \\ & = 3t \end{aligned} \end{split}\]so we get simultaneous equations for \(A\) and \(B\)
\[\begin{split} \left\{ \begin{aligned} & 2A=3 \\ & 3A+2B=0 \end{aligned} \right. \end{split}\]we can get
\[ A=\frac{3}{2}, \quad B=-\frac{9}{4} \]therefore the particular solution is
\[ y_p (t) = \frac{3}{2} t - \frac{9}{4} \]Step 2: find the homogeneous solution to the equation
The characteristic equation is
\[ z^2 + 3z + 2 =0, \]so \(z_1 = -1\) and \(z_2 = -2\). Therefore the homogeneous solution is
\[ y_h(t) = c_1 e^{-t} + c_2 e^{-2t} \]Step 3: the overall solution
\[ y(t) = y_h(t) + y_p(t) = c_1 e^{-t} + c_2 e^{-2t} + \frac{3}{2} t - \frac{9}{4} \]
Example 1.10
Find a particular solution to
Solution
The right hand side is \(10e^{3t}\), so we guess \(y_p(t)=Ae^{3t}\). Substituting our guess into the differential equation, we can get
so \(A=\dfrac{1}{2}\), and therefore