Mathematics / Pure Mathematics Differential Equations I 100% Free Open Access
Chapter 7 โ€ข Theory & Derivations

Non-Homogeneous Linear Equations: Undetermined Coefficients & Variation of Parameters

Complete theory of non-homogeneous linear differential equations: complementary and particular integrals, the method of undetermined coefficients, the modification rule, differential annihilator operators, and Lagrange's method of variation of parameters for arbitrary continuous forcing.

ยง7.1 Structure of the General Solution & Principle of Superposition

1. Theorem on the Non-Homogeneous Solution Structure

Let $L[y] = g(x)$ be an $n$-th order linear differential equation, and let $L[y] = 0$ be its associated homogeneous equation. If $y_p(x)$ is any particular solution of $L[y] = g(x)$, and $\{y_1, y_2, \dots, y_n\}$ is a fundamental solution set of $L[y] = 0$, then the complete general solution is:

$$y(x) = y_c(x) + y_p(x) = \sum_{k=1}^n c_k y_k(x) + y_p(x)$$

where $y_c(x)$ is the complementary function and $y_p(x)$ is the particular integral.

2. Extended Superposition for Multiple Forcing Functions

If $g(x) = g_1(x) + g_2(x) + \dots + g_m(x)$, and $y_{p,i}(x)$ is a particular solution to $L[y] = g_i(x)$ for each $i = 1, \dots, m$, then by linearity of $L$:

$$L[y_{p,1} + \dots + y_{p,m}] = L[y_{p,1}] + \dots + L[y_{p,m}] = g_1(x) + \dots + g_m(x) = g(x)$$

Hence, the total particular solution is the sum $y_p(x) = \sum_{i=1}^m y_{p,i}(x)$.

ยง7.2 The Method of Undetermined Coefficients & The Annihilator Operator

1. Scope and Trial Forms for Undetermined Coefficients

The method of undetermined coefficients applies to constant-coefficient linear ODEs where the forcing function $g(x)$ is a linear combination of polynomials, exponentials, sines, and cosines:

Forcing Term $g(x)$ Trial Form for $y_p(x)$ (Basic)
Polynomial: $a_m x^m + \dots + a_0$ $A_m x^m + A_{m-1} x^{m-1} + \dots + A_0$
Exponential: $e^{\alpha x}$ $A e^{\alpha x}$
Harmonic: $\sin(\beta x)$ or $\cos(\beta x)$ $A \cos(\beta x) + B \sin(\beta x)$
Product: $x^m e^{\alpha x} \cos(\beta x)$ $x^s e^{\alpha x} [(A_m x^m + \dots + A_0)\cos\beta x + (B_m x^m + \dots + B_0)\sin\beta x]$

2. The Modification Rule

The Modification Rule: If any term in the trial form of $y_p(x)$ is a solution of the associated homogeneous equation (i.e., appears in $y_c(x)$), that trial form must be multiplied by $x^s$, where $s$ is the smallest positive integer such that no term in $x^s y_p(x)$ belongs to $y_c(x)$. In other words, $s$ is the multiplicity of the root in the characteristic equation.

3. The Annihilator Operator Method

Let $D = \frac{d}{dx}$ denote the differential operator. An operator $A(D)$ is an annihilator for $g(x)$ if $A(D)[g(x)] \equiv 0$.

  • $D^n$ annihilates $1, x, x^2, \dots, x^{n-1}$.
  • $(D - \alpha)^n$ annihilates $e^{\alpha x}, x e^{\alpha x}, \dots, x^{n-1} e^{\alpha x}$.
  • $[(D - \alpha)^2 + \beta^2]^n$ annihilates $x^k e^{\alpha x}\cos\beta x$ and $x^k e^{\alpha x}\sin\beta x$ for $k = 0, 1, \dots, n-1$.

If $L(D)[y] = g(x)$ and $A(D)[g] = 0$, applying $A(D)$ to both sides gives the higher-order homogeneous equation $A(D)L(D)[y] = 0$. Solving this homogeneous equation immediately reveals both $y_c(x)$ and the exact required trial form for $y_p(x)$.

ยง7.3 Lagrange's Method of Variation of Parameters

1. Motivation and Scope

The method of undetermined coefficients is restricted to polynomials, exponentials, and sinusoidal forcing. When $g(x)$ is any general continuous function (e.g., $\tan x, \sec x, \frac{1}{x}, \ln x$), Lagrange's Method of Variation of Parameters provides a universal, exact integral formula.

2. Rigorous Derivation for Second-Order Equations

Consider $y'' + P(x) y' + Q(x) y = g(x)$, with known complementary solution $y_c(x) = c_1 y_1(x) + c_2 y_2(x)$. We replace the constants $c_1, c_2$ with functions $u_1(x), u_2(x)$:

$$y_p(x) = u_1(x) y_1(x) + u_2(x) y_2(x)$$

Differentiating with respect to $x$:

$$y_p' = (u_1 y_1' + u_2 y_2') + (u_1' y_1 + u_2' y_2)$$

To avoid second derivatives of $u_1, u_2$, we impose Lagrange's first constraint:

$$u_1'(x) y_1(x) + u_2'(x) y_2(x) = 0 \quad \text{(Constraint 1)}$$

Then $y_p' = u_1 y_1' + u_2 y_2'$, and differentiating again:

$$y_p'' = u_1' y_1' + u_2' y_2' + u_1 y_1'' + u_2 y_2''$$

Substituting $y_p, y_p', y_p''$ into $y'' + P y' + Q y = g(x)$:

$$u_1[y_1'' + P y_1' + Q y_1] + u_2[y_2'' + P y_2' + Q y_2] + (u_1' y_1' + u_2' y_2') = g(x)$$

Since $y_1$ and $y_2$ satisfy the homogeneous equation, the bracketed terms vanish, leaving:

$$u_1'(x) y_1'(x) + u_2'(x) y_2'(x) = g(x) \quad \text{(Constraint 2)}$$

3. Solution via Cramer's Rule

Constraints 1 and 2 form a linear algebraic system for the derivatives $u_1'$ and $u_2'$:

$$\begin{pmatrix} y_1 & y_2 \\ y_1' & y_2' \end{pmatrix} \begin{pmatrix} u_1' \\ u_2' \end{pmatrix} = \begin{pmatrix} 0 \\ g(x) \end{pmatrix}$$

The coefficient matrix determinant is precisely the Wronskian $W(y_1, y_2)(x)$. By Cramer's Rule:

$$u_1'(x) = -\frac{y_2(x) g(x)}{W(y_1, y_2)(x)}, \qquad u_2'(x) = \frac{y_1(x) g(x)}{W(y_1, y_2)(x)}$$

Integrating $u_1'$ and $u_2'$ yields the universal particular integral:

$$y_p(x) = -y_1(x) \int \frac{y_2(x) g(x)}{W(y_1, y_2)(x)} dx + y_2(x) \int \frac{y_1(x) g(x)}{W(y_1, y_2)(x)} dx$$
TIERED UNIVERSITY HONORS PROBLEMS

Step-by-Step Solved Examination Problems

Comprehensive analytical derivations, multi-tier solutions (Foundational, Intermediate Exam, and Honors/Proof Challenge) with complete line-by-line verification.

Tier 1 โ€ข Foundational Example 7.1: Undetermined Coefficients with Resonance Multiplication

Find the general solution of the differential equation:

$$y'' - 4y' + 4y = (x + 1) e^{2x}$$

Step 1: Solve the homogeneous equation
Characteristic equation: $r^2 - 4r + 4 = 0 \implies (r - 2)^2 = 0 \implies r = 2$ (double root).

$$y_c(x) = (c_1 + c_2 x) e^{2x}$$



Step 2: Determine trial form for $y_p(x)$
The basic trial form for $(x + 1)e^{2x}$ is $(A x + B) e^{2x}$.
However, both $e^{2x}$ and $x e^{2x}$ appear in $y_c(x)$ (multiplicity $s = 2$).
By the modification rule, we multiply by $x^2$:

$$y_p(x) = x^2 (A x + B) e^{2x} = (A x^3 + B x^2) e^{2x}$$



Step 3: Differentiate and substitute
Let $u(x) = A x^3 + B x^2$, so $y_p = u e^{2x}$.
By Leibniz formula for $(D - 2)^2[u e^{2x}] = e^{2x} D^2[u] = e^{2x} u''$.

$$u''(x) = \frac{d^2}{dx^2}(A x^3 + B x^2) = 6A x + 2B$$

Thus $(D - 2)^2[y_p] = (6A x + 2B) e^{2x}$.
Equating to the RHS $(x + 1) e^{2x}$:

$$6A x + 2B = x + 1 \implies 6A = 1 \implies A = \frac{1}{6}, \quad 2B = 1 \implies B = \frac{1}{2}$$



Step 4: Form the general solution

$$y_p(x) = \left(\frac{1}{6} x^3 + \frac{1}{2} x^2\right) e^{2x}$$


$$y(x) = (c_1 + c_2 x) e^{2x} + \left(\frac{1}{6} x^3 + \frac{1}{2} x^2\right) e^{2x}$$
Final Answer & Physical Insight

$y(x) = \left(c_1 + c_2 x + \frac{1}{2} x^2 + \frac{1}{6} x^3\right) e^{2x}$.

Tier 2 โ€ข Analytical University Exam Example 7.2: Variation of Parameters for Secant Forcing Function

Solve the non-homogeneous differential equation:

$$y'' + y = \sec x, \quad - rac{\pi}{2} < x < \frac{\pi}{2}$$


using Lagrange's method of variation of parameters.

Step 1: Homogeneous complementary solution
$r^2 + 1 = 0 \implies r = \pm i$.

$$y_1(x) = \cos x, \quad y_2(x) = \sin x \implies y_c(x) = c_1 \cos x + c_2 \sin x$$



Step 2: Wronskian computation

$$W(y_1, y_2)(x) = \begin{vmatrix} \cos x & \sin x \\ -\sin x & \cos x \end{vmatrix} = \cos^2 x + \sin^2 x = 1$$



Step 3: Compute $u_1(x)$ and $u_2(x)$
Here $g(x) = \sec x$.

$$u_1'(x) = -\frac{y_2 g(x)}{W} = -\frac{\sin x \sec x}{1} = -\tan x \implies u_1(x) = -\int \tan x dx = \ln|\cos x|$$


$$u_2'(x) = \frac{y_1 g(x)}{W} = \frac{\cos x \sec x}{1} = 1 \implies u_2(x) = \int 1 dx = x$$



Step 4: Formulate particular and general solution

$$y_p(x) = u_1 y_1 + u_2 y_2 = (\ln|\cos x|) \cos x + x \sin x$$


$$y(x) = c_1 \cos x + c_2 \sin x + \cos x \ln(\cos x) + x \sin x$$
Final Answer & Physical Insight

$y(x) = c_1 \cos x + c_2 \sin x + \cos x \ln(\cos x) + x \sin x$ (for $|x| < \pi/2$).

Tier 3 โ€ข Honors Challenge Example 7.3: Non-Homogeneous Cauchy-Euler Equation via Variation of Parameters

Solve the non-homogeneous Cauchy-Euler differential equation:

$$x^2 y'' - 2x y' + 2y = x^3 \ln x, \quad x > 0$$

Step 1: Homogeneous solution
Indicial equation: $m(m - 1) - 2m + 2 = 0 \implies m^2 - 3m + 2 = 0 \implies (m - 1)(m - 2) = 0$.

$$y_1(x) = x, \quad y_2(x) = x^2 \implies y_c(x) = c_1 x + c_2 x^2$$



Step 2: Normalize the ODE to standard form
Divide by $x^2$:

$$y'' - \frac{2}{x} y' + \frac{2}{x^2} y = x \ln x \implies g(x) = x \ln x$$



Step 3: Wronskian computation

$$W(y_1, y_2) = \begin{vmatrix} x & x^2 \\ 1 & 2x \end{vmatrix} = 2x^2 - x^2 = x^2$$



Step 4: Integrate parameter derivatives

$$u_1'(x) = -\frac{y_2 g(x)}{W} = -\frac{x^2 (x \ln x)}{x^2} = -x \ln x$$
$$\int -x \ln x dx = -\left[\frac{x^2}{2} \ln x - \int \frac{x^2}{2} \cdot \frac{1}{x} dx\right] = -\frac{x^2}{2} \ln x + \frac{x^2}{4}$$


$$u_2'(x) = \frac{y_1 g(x)}{W} = \frac{x (x \ln x)}{x^2} = \ln x$$
$$\int \ln x dx = x \ln x - x$$



Step 5: Formulate $y_p(x)$

$$\begin{aligned} y_p(x) &= u_1 y_1 + u_2 y_2 = x\left(-\frac{x^2}{2}\ln x + \frac{x^2}{4}\right) + x^2(x \ln x - x) \\ &= -\frac{x^3}{2}\ln x + \frac{x^3}{4} + x^3 \ln x - x^3 = \frac{x^3}{2}\ln x - \frac{3}{4}x^3 \end{aligned}$$



Step 6: General solution

$$y(x) = c_1 x + c_2 x^2 + \frac{1}{2}x^3 \ln x - \frac{3}{4}x^3$$
Final Answer & Physical Insight

$y(x) = c_1 x + c_2 x^2 + \frac{1}{2} x^3 \ln x - \frac{3}{4} x^3$ (or absorb $-3x^3/4$ into $y_p$).