A second-order linear equation has the form $a(t)y'' + b(t)y' + c(t)y$ $= g(t)$. It is homogeneous when $g = 0$. Second-order equations describe springs, pendulums, circuits and beams, and their solutions have a structure you met in Linear Independence: they form a vector space.
Key idea
Superposition: if $y_1$ and $y_2$ solve a linear homogeneous equation, so does $c_1y_1 + c_2y_2$ for any constants. If $y_1$ and $y_2$ are independent, every solution has this form (the general solution). For the nonhomogeneous equation, every solution is $$y = y_p + c_1y_1 + c_2y_2,$$ where $y_p$ is any one particular solution.
Why it works
Write $L[y] = a y'' + b y' + c y$. Derivatives respect sums and constant multiples, so $L[c_1y_1 + c_2y_2]$ $= c_1L[y_1] + c_2L[y_2] = 0 + 0$. For the nonhomogeneous equation, if $y$ and $y_p$ both solve $L[y] = g$, then $L[y - y_p] = g - g = 0$: their difference is a homogeneous solution. Finally, two initial conditions $y(t_0), y'(t_0)$ pick out exactly one solution, and two independent solutions are enough to match any pair of initial values. So the solution set is two-dimensional, like the null space of a matrix.
Worked example: Fit two constants
$y_1 = e^{2t}$ and $y_2 = e^{-t}$ solve $y'' - y' - 2y = 0$. Find the solution with $y(0) = 1$, $y'(0) = 5$.
- Check $y_1$: $4e^{2t} - 2e^{2t} - 2e^{2t} = 0$. ✓ (Similarly for $y_2$.)
- By superposition, $y = c_1e^{2t} + c_2e^{-t}$, with $y' = 2c_1e^{2t} - c_2e^{-t}$.
- At $t = 0$: $c_1 + c_2 = 1$ and $2c_1 - c_2 = 5$.
- Add the equations: $3c_1 = 6$, so $c_1 = 2$ and $c_2 = -1$.
Answer: $y = 2e^{2t} - e^{-t}$
Worked example: Sines and cosines
$\cos 2t$ and $\sin 2t$ solve $y'' + 4y = 0$. Solve with $y(0) = 3$, $y'(0) = -2$.
- $y = c_1\cos 2t + c_2\sin 2t$, $y' = -2c_1\sin 2t + 2c_2\cos 2t$.
- $y(0) = c_1 = 3$ and $y'(0) = 2c_2 = -2$, so $c_2 = -1$.
Answer: $y = 3\cos 2t - \sin 2t$
Worked example: A nonhomogeneous equation
Check that $y_p = -2$ solves $y'' - y' - 2y = 4$, then solve with $y(0) = 0$, $y'(0) = 1$.
- $y_p'' - y_p' - 2y_p = 0 - 0 + 4$ $= 4$. ✓
- $y = -2 + c_1e^{2t} + c_2e^{-t}$.
- $y(0) = -2 + c_1 + c_2 = 0$ and $y'(0) = 2c_1 - c_2 = 1$, so $c_1 = c_2 = 1$.
Answer: $y = -2 + e^{2t} + e^{-t}$
Common mistake
Superposition is only for homogeneous linear equations. Adding two solutions of $L[y] = g$ gives $L[y_1 + y_2] = 2g$, not $g$; and for a nonlinear equation such as $y'' = -y^{2}$, sums of solutions are not solutions at all. Products like $y_1y_2$ are never covered.