1.3. Analytical Methods for ODEs#

1.3.1. Separable Equations#

Definition 1.6 (Separable Equation)

A first-order differential equation of the form

(1.7)#\[ \diff{y}{x} = g(x) h(y) \]

is said to be separable or to have separable variables.

To solve the separable ODE (1.7), we re-arrange it as

\[ \frac{1}{h(y)} \dy= g(x) \dx, \]

then integrate both sides

\[ \int \frac{1}{h(y)} \dy= \int g(x) \dx, \]

so we can get the implicit solution

\[ H(y) = G(x) + C. \]

Example 1.6

Solve \((1+x)\dy - y \dx=0\)

Example 1.7

Solve \(\displaystyle \diff{y}{x} = \frac{x-5}{y^2}\).

1.3.2. Linear Equations with Constant Coefficients#

Here we focus on a particular type of \(n\)-th order ODE given as

(1.8)#\[ a_n y^{(n)} + a_{n-1} y^{(n-1)} + \cdots + a_1 y' + a_0 y = g(x), \quad a_n \neq 0 \]

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

\[ \D y = \diff{y}{x}, \]

then the \(n\)-th derivative is

\[ \D^n y = \diff[n]{y}{x}. \]

Thus we can write the ODE (1.8) in its operator form as

(1.9)#\[ \left( a_n \D^n + a_{n-1} \D^{n-1} + \cdots + a_1 \D + a_0 \right) y = g(x). \]

We define the overall operation on \(y\) as

(1.10)#\[ \L (\D)= a_n \D^n + a_{n-1} \D^{n-1} + \cdots + a_1 \D + a_0, \]

then the equation can also be written as

\[ \L (\D) y = g(x). \]

Definition 1.8 (Characteristic Polynomial and Characteristic Equation)

For equation (1.8), we define its characteristic polynomial as

(1.11)#\[ \L (z) = a_n z^n + a_{n-1} z^{n-1} + \cdots + a_1 z + a_0. \]

Note: We can simply replace the operator \(\D\) in formula (1.10) with \(z\) to obtain the characteristic polynomial.

The equation

(1.12)#\[ \L (z) = a_n z^n + a_{n-1} z^{n-1} + \cdots + a_1 z + a_0 = 0 \]

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

(1.13)#\[ \L (\D) y = \left( a_n \D^n + a_{n-1} \D^{n-1} + \cdots + a_1 \D + a_0 \right) y = 0 \]

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

\[ y=c_1 \phi_1(x) + c_2 \phi_2(x) + \cdots + c_n \phi_n(x) \]

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

\[ a_1 \diff{y}{x} = - a_0 y, \]

separating the variables

\[ \frac{1}{y}\dy = -\frac{a_0}{a_1} \dx, \]

integrating both sides

\[ \int \frac{1}{y}\dy = \int -\frac{a_0}{a_1} \dx, \]
\[ \ln |y| = -\frac{a_0}{a_1} x + c_1 \]
\[ y = e^{-\frac{a_0}{a_1} x + c_1} = C e^{-\frac{a_0}{a_1} x } \]

Using the differential operator \(\D\) to rewrite the equation as

\[ (a_1\D + a_0) y=0, \]

and we get the characteristic equation

\[ a_1 z + a_0 = 0, \]

and its root is \(z = -\dfrac{a_0}{a_1}\). Therefore the general solution to the first-order ODE is

\[ y = C e^{z x} = C e^{-\frac{a_0}{a_1} x} \]

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

\[ \left( a\D^2 + b\D + c \right) y = 0, \]

so characteristic/auxiliary equation is

\[ a z^2 + b z + c=0, \]

and its roots

\[ z_{1,2} = \frac{-b\pm\sqrt{b^2-4ac}}{2a} \]

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:

  1. \(2y''-5y'-3y=0\)

  2. \(y''-10y'+25y=0\)

  3. \(y''+4y'+7y=0\)

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

\[ a_n z^n + a_{n-1} z^{n-1} + \cdots + a_1 z + a_0 = 0 \]
  • 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

(1.14)#\[ \L (\D) y = \left( a_n \D^n + a_{n-1} \D^{n-1} + \cdots + a_1 \D + a_0 \right) y = g(x), \quad g(x)\neq 0 \]

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

(1.15)#\[\begin{split} \left\{ \begin{aligned} \L (\D) y_h(x) & = 0 \\ \L (\D) y_p(x) & = g(x) \\ y(x) & = y_h (x) + y_p(x) \\ \end{aligned} \right. \end{split}\]

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

\[ y''+3y'+2y=3t \]

Example 1.10

Find a particular solution to

\[ y''+3y'+2y=10e^{3t} \]