Mathematics, Sciences, and Technologies

ODEs 2-2: Second-order Constant-coefficient Homogeneous ODEs (Part 1)

,

Definition, Motivation of the Test Solution

We will address the easiest type of second-order constant-coefficient homogeneous ODEs first. As the name suggests, they are ODEs in the form of

\begin{equation}
\frac{d^2y}{dx^2} + \alpha\frac{dy}{dx} + \beta y = 0 \tag{1}
\end{equation}

where the coefficients \(\alpha,\beta\) are some constants and the R.H.S. is zero. Inspired by the first-order counterpart:

\begin{equation}
\frac{dy}{dx} + ky = 0 \tag{2}
\end{equation}

which can be treated by Separation of Variables and is easily seen to have the solution of

\begin{align}
\frac{dy}{dx} &= -ky \\
\int \frac{dy}{y} &= \int -kdx \\
\ln |y| &= -kx + C \\
y &= Ae^{-kx} \tag{3}
\end{align}

we are motivated to make the similar guess \( e^{rx} \) as the test solution (or called ansatz) to (1), where \( r \) is some constant to be determined. Substituting this into (1) produces

\begin{align}
\frac{d^2}{dx^2}(e^{rx}) + \alpha\frac{d}{dx}(e^{rx}) + \beta(e^{rx}) &= 0 \\
r^2e^{rx} + \alpha re^{rx} + \beta e^{rx} &= 0 \\
e^{rx}(r^2 + \alpha r + \beta) &= 0 \\
\Rightarrow r^2 + \alpha r + \beta &= 0 \tag{4}
\end{align}

because the exponential is never zero. The relation \(r^2 + \alpha r + \beta = 0\) is known as the auxiliary equation. By the derivation above, provided that this auxiliary equation is satisfied, \( e^{rx} \) will be a valid solution to (1). The remaining problem is then to compute the roots \( r_1, r_2 \) of the auxiliary equation.

Three Cases for the Auxiliary Equation

The auxiliary equation is essentially a quadratic equation, which is well-known that the behavior can be categorized into three cases from high-school algebra. These three cases will lead to correspondingly different forms of the solutions.

Two Real Roots

The first scenario is the auxiliary equation having two distinct real roots \( r_1, r_2 \), when the discriminant is greater than zero, \( \alpha^2 -4\beta > 0\). Then as aforementioned, \( y_1 = e^{r_1x} \) and \( y_2 = e^{r_2x} \) will be two solutions. They are linearly independent by computing the Wronskian (see the last tutorial):

\begin{align}
W[y_1, y_2](x) &=
\begin{vmatrix}
e^{r_1x} & e^{r_2x} \\
(e^{r_1x})’ & (e^{r_2x})’
\end{vmatrix} \\
&= \begin{vmatrix}
e^{r_1x} & e^{r_2x} \\
r_1e^{r_1x} & r_2e^{r_2x}
\end{vmatrix} \\
&= e^{r_1x}(r_2e^{r_2x}) -e^{r_2x}(r_1e^{r_1x}) \\
&= (r_2 -r_1)e^{(r_1+r_2)x} \neq 0 && \text{($r_1 \neq r_2$)} \tag{5}
\end{align}

So by linearity, the general solution will be \( y = c_1e^{r_1x} + c_2e^{r_2x} \).

Example

Solve the second-order constant-coefficient ODE

\begin{equation}
\frac{d^2y}{dx^2} + 3\frac{dy}{dx} + 2y = 0 \tag{6}
\end{equation}

where the initial conditions are \( y(0) = 3\), \( y'(0) = -5 \).

The auxiliary equation is just proceeded as

\begin{align}
r^2 + 3r + 2 &= 0 \\
(r+1)(r+2) &= 0 \\
\Rightarrow r &= -1 \text{ or } {-}2 \tag{7}
\end{align}

So the general solution is \(y = c_1e^{-x} + c_2e^{-2x} \) with \(y’ = -c_1e^{-x} -2c_2e^{-2x} \). Substituting the I.C. gives

\begin{align}
&\left\{\begin{aligned}
3 &= c_1 + c_2 \\
-5 &= -c_1 -2c_2
\end{aligned}\right. \\
&\Rightarrow c_1 = 1, c_2 = 2 \\
&\Rightarrow y = e^{-x} + 2e^{-2x} \tag{8}
\end{align}

Exercise

Find the full solution for the ODE

\begin{equation}
\frac{d^2y}{dx^2} -6\frac{dy}{dx} + y = 0 \tag{9}
\end{equation}

with the initial conditions \( y(0) = 1 \), \( y'(0) = 3 \).

Answer

The auxiliary equation \( r^2 -6r + 1 = 0 \) has two real roots:

\begin{align}
r &= \frac{-(-6) \pm \sqrt{(-6)^2 – 4(1)(1)}}{2(1)} \\
&= \frac{6 \pm \sqrt{32}}{2} = 3 \pm 2\sqrt{2}
\end{align}

So the general solution takes the form of \(y = c_1e^{(3+2\sqrt{2})x} + c_2e^{(3-2\sqrt{2})x} \). The initial conditions suggest that

\begin{align}
&\left\{\begin{aligned}
c_1 + c_2 &= 1 \\
(3+2\sqrt{2})c_1 + (3-2\sqrt{2})c_2 &= 3
\end{aligned}\right. \\
&\Rightarrow c_1 = \frac{1}{2}, c_2 = \frac{1}{2}
\end{align}

and thus \( y = \frac{1}{2}e^{(3+2\sqrt{2})x} + \frac{1}{2}e^{(3-2\sqrt{2})x} \).

Leave a Reply

I’m Benjamin

Welcome to my Mathematical World! Here you can find posts and tutorials related to applied topics like Linear Algebra, Calculus, Differential Equations, and Programming. Feel free to leave comments and suggestions!

Discover more from Benjamin's Maths World

Subscribe now to keep reading and get access to the full archive.

Continue reading