Skip to the content of the web site.

Lecture 5

Lecture 4 | Lecture 6


By Giuseppe Tenti and annotated by Douglas Wilhelm Harder.

We will now look at 2nd-order differential equations. A general 2nd-order differential equation is of the form

tex:$$f(t, y, \dot{y}, \ddot{y}) = 0$$;

however, this cannot be solved in general. We will begin by looking at specific cases which have a much simpler form.

Linear Homogeneous 2nd-order Ordinary Differential Equations with Constant Coefficients

A linear homogeneous 2nd-order differential equation with constant coefficients is a differential equation of the form:

tex:$$a\ddot{y} + b\dot{y} + cy = 0$$

Equation 5.1.

where tex:$$a$$, tex:$$b$$, and tex:$$c$$ are arbitrary constant complex (though usually real) numbers.

This ODE is fundamental as a description of oscillation and vibration in all areas of science including electrical, mechanical, but also biological systems. To solve this, we will first look at the statements made by Leonhard Euler in 1739 in a letter to Johann Bernoulli (paraphrased):

Look, tex:$$y$$ is not known, so we cannot do anything about the term tex:$$cy$$ in the differential equation. Therefore, the only way to make the left hand side of the equation vanish is to reduce tex:$$b\dot{y}(t)$$ to something like tex:$$\beta y$$ and tex:$$a\ddot{y}$$ to something like tex:$$\alpha y$$, so that the differential equation becomes something like

tex:$$(\alpha + \beta + c)y(t) = 0$$

and then we choose tex:$$\alpha$$ and tex:$$\beta$$ so that tex:$$\alpha + \beta = -c$$.

Euler then noticed that this requires that tex:$$y$$ and its derivatives must be scalar multiples of each other and the only function where this is possible are the eigenfunctions of the differential operator, namely, tex:$$y(t) = ke^{mt}$$, where tex:$$b$$ and tex:$$c$$ are arbitrary constants.

Under this assumption, we have that tex:$$\dot{y}(t) = mke^{mt}$$ and tex:$$\ddot{y}(t) = m^2ke^{mt}$$ and substituting these into Equation 5.1 yields

tex:$$am^2y + bmy + cy = 0$$

and therefore

tex:$$\left (am^2 + bm + c \right ) y = 0$$

and therefore, as the exponential function tex:$$y(t) = ke^{mt}$$ is not zero, we must require that

tex:$$am^2 + bm + c = 0$$.

This is called the characteristic equation of the differential equation and is a quadratic equation with roots

tex:$$m = \frac{-b \pm \sqrt{b^2 - 4ac}}{2a}$$.

There are three cases on the descriminant tex:$$b^2 - 4ac$$ which is either positive, zero, or negative yielding two distinct real roots, a double root, or two complex conjugate roots.

Case 1: tex:$$b^2 - 4ac > 0$$

There are two roots tex:$$m_1 = \frac{-b + \sqrt{b^2 - 4ac}}{2a}$$ and tex:$$m_2 = \frac{-b - \sqrt{b^2 - 4ac}}{2a}$$ and each is a linearly independent solution (tex:$$\frac{e^{m_1t}}{e^{m_2t}} = e^{(m_1 - m_2)t}$$ is not constant). It follows that, by the superposition principle, the general solution is

tex:$$y(t) = k_1e^{m_1t} + k_2e^{m_2t}$$.

Example 1

Find the general solution of the differential equation tex:$$2\ddot{x} + 5\dot{x} + 3x = 0$$.

First, the characteristic equation is tex:$$2m^2 + 5m + 3 = 0$$ which has two roots tex:$$\frac{-5 \pm \sqrt{25 - 24}}{4}$$ and therefore tex:$$m_1 = -\frac{3}{2}$$ and tex:$$m_2 = -1$$. These two solutions are linearly independent as tex:$$\frac{e^{-\frac{3}{2}t}}{e^{-t}} = e^{-\left (\frac{3}{2} - 1 \right )t} = e^{-\frac{1}{2}t}$$ which is not constant. Therefore, the general solution is

tex:$$x(t) = k_1e^{-\frac{3}{2}t} + k_2e^{-t}$$.

Figure 1 shows a number of solutions to this differential equation using various coefficients of tex:$$k_1$$ and tex:$$k_2$$.


Figure 1. Numerous solutions to the differential equation of Example 1.

Looking at these, we note that there appear to be two classes of solutions: there is either zero or one local extreme points and all solutions tend to zero as tex:$$t \rightarrow \infty$$. These three cases are shown in Figure 2.


Figure 2. Three representative examples of solutions to Example 1.

Case 2: tex:$$b^2 - 4ac = 0$$

In this case, the two roots are real and coincident: tex:$$m = -\frac{b}{2a}$$. This gives us one particular solution tex:$$e^{-\frac{b}{2a}t}$$ and therefore there must be a second solution which is linearly independent from this solution.

The trick for finding the second solution was first proposed by D'Alambert in 1748. He suggested that you have two solutions tex:$$m$$ and tex:$$m + \epsilon$$ where tex:$$\epsilon$$ is arbitrarily small; therefore, tex:$$\lim_{\epsilon \rightarrow 0}{m + \epsilon} = m$$. Consider first the two solutions with tex:$$m$$ and tex:$$m + \epsilon$$ and only once you have the two solutions, let tex:$$\epsilon \rightarrow 0m$$.

Now, the two linearly independent solutions are

tex:$$e^{-\frac{b}{2a}t}$$ and tex:$$e^{\left( -\frac{b}{2a} + \epsilon \right )t}$$.

But any linear combination of these two solutions must also be a solution and in particular, let us define

tex:$$h_\epsilon(t) = \frac{1}{\epsilon}e^{-\frac{b}{2a}t} + \frac{1}{\epsilon}e^{\left( -\frac{b}{2a} + \epsilon \right )t} = \frac{e^{-\frac{b}{2a}t} + e^{\left( -\frac{b}{2a} + \epsilon \right )t}}{\epsilon}$$.

This must be a solution for any any finite value of tex:$$\epsilon > 0$$ but in the limit, the solution is in an indeterminate form tex:$$\frac{0}{0}$$ and therefore we must use l'Hôpital's Rule:

tex:$$\lim_{\epsilon \rightarrow 0} h_\epsilon(t) = e^{-\frac{b}{2a}t} \lim_{\epsilon \rightarrow 0} \frac{e^{\epsilon t} - 1}{\epsilon} = e^{-\frac{b}{2a}t} \lim_{\epsilon \rightarrow 0} \frac{te^{\epsilon t}}{1} = te^{-\frac{b}{2a}t}$$.

The simplest form of the two linearly independent solutions is therefore

tex:$$y(t) = k_1e^{-\frac{b}{2a}t} + k_2te^{-\frac{b}{2a}t} = (k_1 + k_2t)e^{-\frac{b}{2a}t}$$.

Example 2

Find the general solution of the differential equation tex:$$\ddot{x} + 2\dot{x} + x = 0$$.

First, the characteristic equation is tex:$$m^2 + 2m + 1 = 0$$ which has a double root at tex:$$m = -1$$. The two linearly independent solutions are, therefore, tex:$$e^{-t}$$ and tex:$$te^{-t}$$; hence, the general solution is

tex:$$x(t) = (k_1 + k_2t)e^{-t}$$.

Figure 3 shows a number of solutions to this differential equation using various coefficients of tex:$$k_1$$ and tex:$$k_2$$.


Figure 3. Numerous solutions to the differential equation of Example 2.

As with the previous case, there are either zero or one local extreme points and all solutions tend to zero as tex:$$t \rightarrow \infty$$. These are the same three cases already shown in Figure 2.

Case 3: tex:$$b^2 - 4ac < 0$$

In this case, the roots of the characteristic equation are complex conjugates of the form tex:$$\phi \pm j\psi$$ where tex:$$\phi = \frac{-b}{2a}$$ and tex:$$\psi = \frac{\sqrt{4ac - b^2}}{2a}$$. The two linearly independent solutions using these functions are

tex:$$e^{(\phi + j\psi)t}$$ and tex:$$e^{(\phi - j\psi)t}$$;

however, these are complex-valued functions, yet any linear combination of these solutions is also a solution. This freedom allows us to find two real-valued linearly independent solutions:

  • Sum the solutions: tex:$$e^{(\phi + j\psi)t} + e^{(\phi - j\psi)t} = $e^{\phi t}\left ( e^{j\psi t} + e^{-j\psi t} \right ) = 2e^{\phi t}\cos(\psi t)$$
  • Take the difference: tex:$$e^{(\phi + j\psi)t} - e^{(\phi - j\psi)t} = $e^{\phi t}\left ( e^{j\psi t} - e^{-j\psi t} \right ) = 2je^{\phi t}\sin(\psi t)$$

The constants tex:$$2$$ and tex:$$2j$$ may be ignored and hence we may conclude that two real-valued linearly independent solutions are tex:$$e^{\phi t}\cos(\psi t)$$ and tex:$$e^{\phi t}\sin(\psi t)$$. The superposition principle gives us that the general solution is

tex:$$y(t) = e^{\phi t} \left( k_1 \cos(\psi t) + k_2 \sin(\psi t) \right )$$.

As an alternate formulation, we may write this using two constants in the amplitude-phase form:

tex:$$y(t) = A e^{\phi t} \cos( \psi t + \delta )$$

where tex:$$A$$ is the amplitude and tex:$$\delta$$ is the phase shift. This can also, of course, be written in terms of a sine function together with the corresponding adjusted phase shift.

Example 3

Find the general solution of the differential equation tex:$$\ddot{x} + 2\dot{x} + 5x = 0$$.

First, the characteristic equation is tex:$$m^2 + 2m + 5 = 0$$ which has two complex roots at tex:$$m = -1 \pm j2$$. The two linearly independent solutions are, therefore, tex:$$e^{-t}\cos(2t)$$ and tex:$$e^{-t}\sin(2t)$$; hence, the general solution is

The two linearly independent solutions are, therefore, tex:$$e^{-t}$$ and tex:$$te^{-t}$$; hence, the general solution is

tex:$$x(t) = k_1e^{-t}\cos(2t) + k_2e^{-t}\sin(2t)$$,

or, an alternate formulation is tex:$$x(t) = Ae^{-t}\cos(2t + \delta)$$.

Figure 4 shows a number of solutions to this differential equation using various coefficients of tex:$$k_1$$ and tex:$$k_2$$ while Figure 5 shows the two linearly independent solutions. All solutions oscillate infinitely many times.


Figure 4. Numerous solutions to the differential equation of Example 3.


Figure 5. The two linearly independent solutions to the differential equation of Example 3.

Examples with Animations

The reader may wonder about the transition from real to complex roots of this system, and therefore, the three animations shown in Figures 6-8 will show how the solutions to a differential equation change as the parameters change. In all cases, the differential equation will start with two different real roots, will make the transition to two identical real roots with the differential equation

tex:$$\ddot{y} + 2\dot{y} + y = 0$$

and then continue with two complex roots. In each case, the reader will note that there is a smooth transition from a solution with no extreme points past tex:$$t = 0$$ to a solution which is oscillating.


Figure 6. Solutions to the differential equation

tex:$$a\ddot{y} + 2\dot{y} + y = 0$$ for values of tex:$$a = (0, 8]$$.


Figure 7. Solutions to the differential equation

tex:$$\ddot{y} + b\dot{y} + y = 0$$ for values of tex:$$b = [0, 4]$$.


Figure 8. Solutions to the differential equation tex:$$\ddot{y} + 2\dot{y} + cy = 0$$ for values of tex:$$c = [0, 4]$$.

Another possibility is the transition from a solution with no roots past tex:$$t = 0$$, to a solution with one real root past zero, to a solution which is oscillating. There do not exist solutions where there are two extreme points:

  • The solution will decay towards the zero solution,
  • The solution may pass the zero solution once and then decay towards it, or
  • The solution will oscillate infinitely many times around the zero solution.

This natural and smooth transition from one type of solution to another should be expected, for example, calculating the integral tex:$$\int_1^t \tau^p d\tau$$ is a polynomial for almost all values of tex:$$p$$ except when of tex:$$p = -1$$ in which case the integral is a logarithm, and yet, there is a smooth transition from one state to the other, as is shown in Figure 9.


Figure 9. The integral tex:$$\int_1^t \tau^p d\tau$$ for values of tex:$$p \in [-3, 1]$$.