A constant coefficient Second Order Linear Homogeneous ODE can be written as follows:
$$ y''(x) + a y'(x) + b y(x) = 0 $$
The solution to the constant coefficient equation is of the form \(y(x)=e^{λx}\). Substitution gives
$$ λ^2 e^{λx} + a λ e^{λx} + b e^{λx} = 0$$
which can be satisfied if the characteristic equation is satisfied:
$$ λ^2 + a λ + b = 0$$
which is a quadratic algebraic equation for \(λ\) with two roots.
If the roots are distinct, then we have two linearly independent
solutions
$$ y_1(x)=e^{λ_1 x}, \; y_2(x)=e^{λ_2 x} $$
where \(λ_1 \ne λ_2\). The general solution to the homogeneous problems is
$$ y(x) = c_1 e^{λ_1 x} + c_2 e^{λ_2 x} $$
Example 1
Solve the following ODE $$ y'' - y' = 0 $$
solution:
Let \(u = y'\) then equation becomes \(u' - u = 0\) which is a separable: \( du/u = dx\).
Integration gives: \(log(u) = x + c\) after exponentiation \(y' = u = c_1 e^{x}, c_1=e^c\) and integration:
$$ y(x) = c_1 e^{x} + c_2 $$
Solution can be also found by assuming \(y(x)=e^{λx}\). Then the characteristic equation is
$$ λ^2 - λ= 0$$
with two distinct roots
$$ λ_1 = 1, \; λ_2 = 0 $$
which gives us two linearly independent basis functions
$$ y_1 = e^{x}, \; y_2 = e^{0} = 1 $$
Example 2
Find the general solution of $$ y'' + y = 0 $$
solution:
The characteristic equation is
$$ λ^2 + 1= 0$$
with two distinct imaginary roots
$$ λ_1 = i, \; λ_2 = -i $$
which gives us two linearly independent basis functions
$$ y_1 = e^{ix}, \; y_2 = e^{-ix} $$
with general solution
$$ y(x) = c_1 e^{ix} + c_2 e^{-ix} $$
Using Euler's identity \( e^{iwx} = \cos{wx} + i\sin{wx}\) it can be written as follows
$$ y(x) = k_1 \cos{x} + k_2 \sin{x} $$
where
$$ k_1 = c_1+c_2, k_2 = i(c_1-c_2)$$
Repeating roots
If the roots are not distinct \(λ_1 = λ_2 = λ = -\frac{a}{2}\), then we have one linearly independent solution
$$ y_1(x)=e^{λ x} $$
The second solution can be obtained by the method of reduction of order.
Assume
$$ y_2(x) = u(x) e^{λ x} $$
and substitute
$$ (u y_1)'' + a (u y_1)' + b u y_1 = 0 $$
$$ (u' y_1 + u y_1')' + a (u' y_1 + u y_1') + b u y_1 = 0 $$
$$ u'' y_1 + 2 u' y_1' + u y_1'' + a u' y_1 + a u y_1' + b u y_1 = 0 $$
Since \(y_1\) is a solution,
$$ u y_1'' + a u y_1' + b u y_1 = 0 $$
the equation becomes
$$ u'' y_1 + 2 u' y_1' + a u' y_1 = (u'' + 2λ u' + a u')e^{λ x} = 0 $$
which is a second order linear ODE for \(u(x)\). Reduce the order by \(u'=v\)
$$ v' + (2λ + a)v = 0 $$
Since \(λ = -\frac{a}{2}\)
$$ v' = 0 \rightarrow u'' = 0$$
which has the general solution
$$ u = c_1 x + c_2 $$
A solution that makes \(y_2\) linearly independent is
$$ u = x $$
$$ y_2(x) = x e^{λ x} $$
The general solution to problems is
$$ y_h(x) = c_1 e^{λ x} + c_2 x e^{λ x} $$
Example 1
Solve the following ODE $$ y'' - 2y' + y = 0 $$
solution:
Assuming \(y(x)=e^{λx}\). Then the characteristic equation is
$$ λ^2 - 2λ + 1= (λ-1)^2 = 0$$
with two identical roots
$$ λ_1 = λ_2 = 1 $$
which gives us two linearly independent basis functions
$$ y_1 = e^{x}, \; y_2 = x e^{x} $$
with general solution
$$ y(x) = c_1 e^{x} + c_2 x e^{x} $$