General Form of Second-order Linear ODEs
Second-order ODEs are those in which the highest order of ordinary derivatives appearing is of second-order \( d^2y/dx^2 \) (or \( d^2y/dt^2, y^{\prime\prime} \)). For arbitrary second-order ODEs, the solutions are usually hard to find analytically. However, if we focus on Second-order Linear ODEs, which take the general form of
\begin{equation}
\frac{d^2y}{dx^2} + p(x) \frac{dy}{dx} + q(x) y = f(x) \tag{1}
\end{equation}
where \( p(x), q(x) \) and \( f(x) \) are some functions of the independent variable \(x\) only. Then, they possess some convenient properties and arriving at some satisfactory solutions becomes possible. When \( f(x) = 0 \), the equation is known as homogeneous, just as described in the very first tutorial. \( f(x) \) on R.H.S. will often be considered as a source/forcing term which induces a response in \( y(x) \) via the structure of the differential equations on L.H.S. For example, in Atmospheric Sciences, the external forcing by sea surface temperature (SST) can produce a response in the atmospheric circulation above.
As the order of equations increases to \(2\), there will now be two possible, “different” solutions accompanied by respective integration constants. How we define “different” in this case will be explained in the later part. This also means that we need at least two initial conditions for \(y\) and \(y’\) to specify the full solution.
Existence and Uniqueness of Solutions
The most essential thing to do before we get our hands on solving second-order ODEs is to establish the existence and uniqueness of the solutions. For simplicity, we assume that the second-order ODEs are linear as in (1), then we can easily rewrite it into a system of two first-order ODEs by letting \(z = dy/dx\):
\begin{align}
\left\{\begin{aligned}
\frac{dy}{dx} &= z \\
\frac{dz}{dx} &= \frac{d^2y}{dx^2} = -p(x)z -q(x)y + f(x)
\end{aligned}\right.
\tag{2}
\end{align}
The Picard–Lindelöf Theorem from the last tutorial can be extended for a first-order ODE system with multiple unknowns, and provided that the modified Lipschitz condition still holds, will immediately lead to the existence and uniqueness of solutions of (2) and hence equivalently (1).
Furthermore, if \( y_1(x) \) and \( y_2(x) \) are two solutions to the homogeneous version of (1) with \(f(x) = 0 \), then
- The combination of \( y_1(x) \) and \( y_2(x) \) is still a solution;
- The constant multiple of a solution is still a solution. (and is regarded to be the same solution)
These two properties are collectively known as linearity, where \( ay_1(x) + by_2(x) \) is always a valid solution for a linear homogeneous ODE with \( a,b \) being constants:
\begin{align}
&\frac{d^2}{dx^2}(ay_1 + by_2) + p(x) \frac{d}{dx}(ay_1 + by_2) + q(x) (ay_1 + by_2) \\
={}& a\Bigl(\frac{d^2y_1}{dx^2} + p(x) \frac{dy_1}{dx} + q(x) y_1\Bigr) \\
&+ b\Bigl(\frac{d^2y_2}{dx^2} + p(x) \frac{dy_2}{dx} + q(x) y_2\Bigr) \\
={}& a(0) + b(0) && \text{(By (1))} \\
\equiv{}& 0 \tag{3}
\end{align}
Wronskian for Testing Linear Independence
As suggested in the beginning, we require two “different” solutions to complete the problem. By “different” we mean that they are linearly independent so that each of them cannot be expressed as a constant multiple of another. For example, \( \sin x \) and \( \cos x \) are linearly independent as it is not possible to write \( \sin x \) as \( k \cos x \) with a constant \( k \); but \( 2e^x \) and \( -3e^x \) will be linearly dependent because \( -\frac{3}{2} (2e^x) = -3e^x \). To test linearly independent between two functions \( y_1(x) \) and \( y_2(x) \), we can calculate the Wronskian determinant:
\begin{equation}
W[y_1, y_2](x) =
\begin{vmatrix}
y_1(x) & y_2(x) \\
{y_1}'(x) & {y_2}'(x)
\end{vmatrix} \tag{4}
\end{equation}
If the Wronskian is not identically equal to zero, then the two functions must be linearly independent. To show that, we can prove the contrapositive: Linearly dependent functions \( y_1(x) \) and \(y_2(x) = ky_1(x) \) always have a Wronskian of \( 0 \):
\begin{align}
W[y_1, ky_1](x) &=
\begin{vmatrix}
y_1(x) & ky_1(x) \\
{y_1}'(x) & [ky_1]'(x)
\end{vmatrix} =
\begin{vmatrix}
y_1(x) & ky_1(x) \\
{y_1}'(x) & k{y_1}'(x)
\end{vmatrix} \\
&= k
\begin{vmatrix}
y_1(x) & y_1(x) \\
{y_1}'(x) & {y_1}'(x)
\end{vmatrix} \\
&= k(0) \equiv 0 \tag{5}
\end{align}
as a determinant that contains two identical columns will yield zero. Using the sine and cosine example above, their Wronskian is
\begin{align}
W[\sin, \cos](x) &=
\begin{vmatrix}
\sin x & \cos x \\
(\sin x)’ & (\cos x)’
\end{vmatrix} \\
&=
\begin{vmatrix}
\sin x & \cos x \\
\cos x & -\sin x
\end{vmatrix} \\
&= -\sin^2 x -\cos^2 x = -1 \neq 0 \tag{6}
\end{align}
so they are indeed linearly independent.
General and Particular Solutions
Assume that we have found two linearly independent complementary solutions \(y_1(x)\) and \( y_2(x) \) that satisfy the homogeneous part of (1), then by (3)
\begin{equation}
y_c(x) = c_1 y_1(x) + c_2 y_2(x) \tag{7}
\end{equation}
will be a valid general solution where \( c_1, c_2 \) are constants to be determined as follows. Given two initial conditions at some reference location \(x_0\):
\begin{equation}
\left\{\begin{aligned}
y(x_0) = A &= c_1 y_1(x_0) + c_2 y_2(x_0) \\
y'(x_0) = B &= c_1 {y_1}'(x_0) + c_2 {y_2}'(x_0)
\end{aligned}\right. \tag{8}
\end{equation}
Then by Cramer’s Rule from Linear Algebra, we have
\begin{equation}
\begin{aligned}
c_1 &= \frac{A{y_2}'(x_0) -B{y_2}(x_0)}{W[y_1, y_2](x_0)} \\
c_2 &= \frac{B{y_1}(x_0) -A{y_1}'(x_0)}{W[y_1, y_2](x_0)}
\end{aligned} \tag{9}
\end{equation}
As long as we possess a choice of \( y_1 \) and \( y_2 \), we can determine the unique solution of \( y \) that satisfies the initial conditions via (9), which is non-trivial as we have required that the Wronskian in the denominator be non-zero.
Now let’s consider the non-homogeneous case. Everything is still the same as before except that we also have a particular solution \( y_p(x) \) that satisfies (1) with the source term \( f(x) \) present. Then the general solution will be the sum of the complementary part \( y_c(x) \) and particular part \( y_p(x) \):
\begin{equation}
y = y_c(x) + y_p(x) = c_1 y_1(x) + c_2 y_2(x) + y_p(x) \tag{10}
\end{equation}
Substituting this into the L.H.S. of (1) indeed gives
\begin{align}
&\frac{d^2}{dx^2}(y_c + y_p) + p(x) \frac{d}{dx}(y_c + y_p) + q(x) (y_c + y_p) \\
={}& \Bigl(\frac{d^2y_c}{dx^2} + p(x) \frac{dy_c}{dx} + q(x) y_c\Bigr) \\
& + \Bigl(\frac{d^2y_p}{dx^2} + p(x) \frac{dy_p}{dx} + q(x) y_p\Bigr) \\
={}& (0) + f(x) && \text{(By (1))} \\
={}& f(x) \tag{11}
\end{align}
showing that (10) will be the required form of the full solution. Note that we have to take into account the particular part and determine a new appropriate set of integration constants.
Exercise
Show that \( y_1 = 1 \) and \( y_2 = x \) are two linearly independent solutions to the rather simple second-order ODE
\begin{equation}
\frac{d^2y}{dx^2} = 0 \tag{12}
\end{equation}
Answer
Direct substitution of either \( y_1 \) and \( y_2 \) into the second-order derivative on L.H.S. of (12) gives \( 0 \) so they solve the equation. The more important issue is to verify their linear independence by calculating the Wronskian:
\begin{align}
W[1, x] &=
\begin{vmatrix}
1 & x \\
1′ & x’
\end{vmatrix} \\
&=
\begin{vmatrix}
1 & x \\
0 & 1
\end{vmatrix} \\
&= 1 \neq 0
\end{align}
which is non-zero. By linearity, the general solution of (12) will be \( y = Ax + B \) where \(A,B\) are some constants. (This can also be deduced by integrating directly twice.)








Leave a Reply