By failing to prepare, you are preparing to fail, Benjamin Franklin.

A second-order linear homogeneous differential equation ODE with constant coefficients is a differential equation of the form: y'' + Ay' + By = 0, where A and B are constants.
To solve this ODE, we seek two linearly independent solutions $y_1(t)$ and $y_2(t)$. The general solution is then a linear combination of these two solutions: $c_1y_1 + c_2y_2$ where $c_1$ and $c_2$ are two arbitrary constants determined by the system’s initial conditions. The key to finding $y_1$ and $y_2$ is solving the characteristic equation ($r^2 + Ar + B = 0$), whose roots directly determine the behavior of the solutions.

We now shift our focus to finding particular solutions to inhomogeneous second-order linear differential equations with constant coefficients. These equations take the form: $y'' + Ay' + By = f(x)$
This equation is termed “inhomogeneous” because of the non-zero forcing term (or input function) $f(x)$. Our goal is to find a single particular solution, denoted as $y_p(x)$, that satisfies this equation.
Once we find $y_p(x)$, the general solution to the entire ODE is simply the sum of the particular solution and the complementary (homogeneous) solution: $y(x) = y_p(x) + y_c(x) = y_p(x) + c_1y_1(x) + c_2y_2(x)$
We are particularly interested in finding $y_p$ when the forcing term $f(x)$ takes common functional forms, such as:
To make the process clearer, we rewrite the original ODE using differential operator notation. Let D represent the derivative with respect to x, i.e., $D = \frac{d}{dx}$, $D^2 = \frac{d^2}{dx^2}$.
The original ODE: y’’ + Ay’ + By = f(x) becomes $(D^2 + AD + B)y = f(x)$
We can introduce the characteristic polynomial operator $p(D)$ defined as: $p(D) = D^2 + AD + B$
p(D) can be understood as a linear operator (it acts on functions by applying derivatives and combining terms linearly) and also as a formal polynomial where D is a variable (it behaves like a polynomial where D is treated as an algebraic symbol).
This allows us to write the ODE extremely compactly as: $p(D)y = f(x)$
A key result for solving these equations is the Substitution Rule for exponentials.
Theorem: For any complex number $\alpha$, $\boxed{p(D)e^{\alpha x} = p(\alpha)e^{\alpha x}}$
Proof:
The Exponential Input Theorem provides a direct formula for the particular solution when the forcing term is an exponential function.
Theorem: If $f(x) = e^{\alpha x}$ and $p(\alpha) \neq 0$, the inhomogeneous ODE $p(D)y = e^{\alpha x}$ has a particular solution of the form: $\boxed{y_p = \frac{e^{\alpha x}}{p(\alpha)}}$
Proof.
Find the particular solution for the equation: $y'' - y' + 2y = 10e^{-x}\sin(x)$
Step 1: Convert to Complex Form To handle the trigonometric function $\sin(x)$, we express it as the imaginary part of Euler’s formula ($e^{ix} = \cos(x) + i\sin(x)$).
Therefore, the forcing term becomes: $f(x) = 10e^{-x}\sin(x) = Im(10e^{-x}e^{ix}) = Im(10e^{(-1+i)x})$
Let $\tilde{y}(x)$ be the complex solution to the ODE: $(D^2-D+2)\tilde{y} = 10e^{(-1+i)x}$
Step 2: Apply the Exponential Input Theorem
The characteristic polynomial is $p(\alpha) = \alpha^2 - \alpha + 2$.
We evaluate this characteristic polynomial at our complex exponential root $\alpha = -1+i$: $p(-1+i) = (-1+i)^2 - (-1+i) + 2 = (1 - 2i - 1) + 1 - i + 2 = -2i + 3 - i = 3 - 3i \ne 0$
Since $p(\alpha) \neq 0$, we apply the Exponential Input Theorem to find the complex particular solution (Recall: $\tilde{y_p} = \frac{e^{αx}}{p(α)}$) $\tilde{y}_p$: $\tilde{y}_p = \frac{10e^{(-1+i)x}}{3 - 3i} = \frac{10}{3(1 - i)} e^{(-1+i)x}$
Multiply the numerator and denominator by the complex conjugate $(1+i)$: $\tilde{y}_p = \frac{10(1+i)}{3(1^2 + 1^2)} e^{-x}(\cos(x) + i\sin(x)) = \frac{5}{3}(1+i)e^{-x}(\cos(x) + i\sin(x))$
Step 3. Extract the imaginary part:
Since our original forcing term was the imaginary part of the complex input, our real particular solution $y_p$ is the imaginary part of $\tilde{y}_p$: $y_p = \text{Im}(\tilde{y}_p) = \frac{5}{3}e^{-x}(\cos(x) + \sin(x))$
$y_p = Im(\tilde{y_p}) = \frac{5}{3}e^{-x}(cos(x)+sin(x))$
We can combine the sine and cosine terms into a single phase-shifted cosine wave. Recall that $\boxed{A\cos(x) + B\sin(x) = R\cos(x - \phi)}$, where amplitude $R = \sqrt{A^2 + B^2}$ and $\phi = \arctan(B/A)$.
In our particular case, $A=1$ and $B=1$, so $R = \sqrt{2}$ and $\phi = \frac{\pi}{4}$.
Therefore, we get $y_p = \frac{5\sqrt{2}}{3}e^{-x}\cos\left(x - \frac{\pi}{4}\right)$
When $p(\alpha) = 0$, the Exponential Input Theorem fails because we cannot divide by zero. Physically, this occurs when the frequency of the external forcing term perfectly matches the natural frequency of the homogeneous system, causing resonance. We must modify our approach using the Exponential Shift Rule.
The Exponential Shift Rule If $p(\alpha) = 0$, the rule states that $p(D)[e^{\alpha x}u(x)] = e^{\alpha x}p(D + \alpha)u(x)$
Proof:
For the first derivative ($p(D) = D$): $D[e^{\alpha x}u(x)] =[\text{Product Rule}] e^{\alpha x}u'(x) + \alpha e^{\alpha x}u(x) =[\text{Factor } e^{\alpha x}] e^{\alpha x}(u' + \alpha u) = e^{\alpha x}(D + \alpha)u(x)$
For the second derivative ($p(D) = D^2$): $D^2[e^{\alpha x}u(x)] =[\text{Previous result}] D\left[ e^{\alpha x}(D + \alpha)u \right] =[\text{Previous result, but u is in this case (D + a)u}] e^{\alpha x}(D + \alpha)(D + \alpha)u = e^{\alpha x}(D + \alpha)^2 u$
This logic extends to any polynomial operator $p(D)$.
Let $y'' + Ay' + By = e^{\alpha x}$. If $\alpha$ is a root of the characteristic equation ($p(\alpha) = 0$), we use the following modified particular solutions:
Simple Root: If $\alpha$ is a simple root ($p(\alpha) = 0$ but $p'(\alpha) \neq 0$), then: $\boxed{y_p = \frac{x e^{\alpha x}}{p'(\alpha)}}$
Double Root: If $\alpha$ is a double root ($p(\alpha) = 0$ and $p'(\alpha) = 0$), then: $\boxed{y_p = \frac{x^2 e^{\alpha x}}{p''(\alpha)}}$
Proof (Simple root case)
Problem: Find a particular solution to the inhomogeneous second-order linear differential equation: $y'' - 3y' + 2y = e^x$
Our ultimate goal is to find the general solution to the ODE, which is the sum of the complementary (homogeneous) solution $y_c(x)$ and a specific particular solution $y_p(x)$: $y(x) = y_c(x) + y_p(x)$
Step 1: Find the Complementary Solution ($y_c$)
First, we determine the characteristic equation associated with the homogeneous part of the ODE: $y'' - 3y' + 2y = 0$.
To do this, we assume the solution takes the form $y = e^{rx}$, where $r$ is a constant to be determined. Substituting $y = e^{rx}$ into the homogeneous equation yields: $r^2e^{rx} - 3re^{rx} + 2e^{rx} = 0$
Dividing both sides by $e^{rx}$ (which is valid since $e^{rx} > 0$ for all real $x$) gives the characteristic equation: $r^2 - 3r + 2 = 0$
We can also express this using the differential operator $D$, where $p(D) = D^2 - 3D + 2 = 0$. Factoring the quadratic polynomial gives: $(r - 1)(r - 2) = 0$
The roots are $r_1 = 1$ and $r_2 = 2$. Since we have two distinct real roots, the general solution to the homogeneous equation is: $y_c(x) = c_1e^x + c_2e^{2x}$ (where $c_1$ and $c_2$ are arbitrary constants determined by initial conditions).
Step 2: Identify the Resonance Problem
Now we look at the right-hand side of our inhomogeneous ODE, which is the forcing term $f(x) = e^x$.
Normally, using the standard Exponential Input Theorem, we would guess a particular solution of the form $y_p = \frac{e^{\alpha x}}{p(\alpha)}$, where $\alpha = 1$.
However, let’s evaluate the characteristic polynomial at $\alpha = 1$: $p(1) = 1^2 - 3(1) + 2 = 0$
Because $p(1) = 0$, the standard formula fails (we cannot divide by zero). This happens because $\alpha = 1$ is a root of the characteristic equation. Physically and mathematically, this represents resonance: the forcing term $e^x$ is already a natural part of the system’s unforced behavior (notice that $e^x$ appears in $y_c$). If we simply guessed $Ae^x$ for our particular solution, plugging it into the left side of the equation would yield $0$, not $e^x$.
Step 3: Find the Particular Solution ($y_p$)
To bypass the resonance issue, we use the modified rule derived from the Exponential Shift Method.
The rule states that when the forcing term is $e^{\alpha x}$ and $\alpha$ is a root of the characteristic equation, we must multiply our guess by $x$.
Simple Root: If $\alpha$ is a simple root (it appears only once in the factorization), the particular solution is given by: $y_p(x) = \frac{x e^{\alpha x}}{p'(\alpha)}$
Double Root: If $\alpha$ is a repeated root (multiplicity 2), the formula becomes $y_p(x) = \frac{x^2 e^{\alpha x}}{p''(\alpha)}$.
In our case, $\alpha = 1$ is a simple root because it only appears once in the factorization $(D-1)(D-2)$. Therefore, we use the first formula.
First, differentiate the characteristic polynomial $p(D) = D^2 - 3D + 2$ with respect to $D$: $p'(D) = 2D - 3$. Then, evaluate this derivative at $\alpha = 1$: $p'(1) = 2(1) - 3 = -1$
Finally, substitute this into the modified formula: $y_p(x) = \frac{x e^x}{p'(1)} = \frac{x e^x}{-1} = -xe^x$
Step 4: Write the General Solution
The general solution to the differential equation is the sum of the complementary solution and the particular solution we just found: $\boxed{y(x) = y_c(x) + y_p(x) = c_1e^x + c_2e^{2x} - xe^x}$
This final equation describes all possible behaviors of the system, where $c_1$ and $c_2$ are arbitrary constants determined by specific boundary or initial conditions.