Case Study 1 — The Derivative and Integral as Operators: Solving Differential Equations with Linear Algebra

Field: signals, control, and applied calculus. This case study takes the chapter's anchor — differentiation as a linear map — and follows it to its most consequential payoff: the recognition that a linear differential equation is a linear operator equation, so the entire apparatus of kernel, image, and rank–nullity governs the solutions. By the end you will see why a second-order linear ODE has a two-dimensional solution space, why "particular plus homogeneous" is just "a preimage plus the kernel," and why engineers think of differentiation as a matrix.

From a calculus rule to an operator

Every student of calculus learns two rules so early they become reflex: the derivative of a sum is the sum of the derivatives, and a constant slides out of a derivative. Chapter 35 reframed those reflexes as the definition of a linear transformation, applied to $D=\frac{d}{dx}$. Once $D$ is an operator, you can do operator algebra with it — add operators, scale them, compose them, and form polynomials in $D$. That last move is the key that unlocks differential equations.

Consider the differential operator $$ L = D^2 - 3D + 2I, $$ where $I$ is the identity operator (it leaves a function unchanged) and $D^2$ means "differentiate twice." Applied to a function $y$, this operator produces $L(y) = y'' - 3y' + 2y$. So the differential equation $$ y'' - 3y' + 2y = f(x) $$ is exactly the operator equation $L(y) = f$. Solving the differential equation is finding the preimage of $f$ under the linear map $L$ — every $y$ that $L$ sends to $f$. This is no longer a problem about "antidifferentiating cleverly"; it is a problem about the structure of a linear map, and the four-subspaces machinery of Chapter 13, lifted to operators in Chapter 35, applies in full.

The homogeneous solutions are the kernel

Set $f=0$ and you get the homogeneous equation $L(y)=0$ — which, in the operator language, asks for the kernel of $L$. A function is a homogeneous solution exactly when $L$ annihilates it. For $L=D^2-3D+2I$, you find the kernel by the standard trick: guess $y=e^{rx}$, compute $L(e^{rx}) = (r^2-3r+2)e^{rx}$, and demand it vanish. Since $e^{rx}$ is never zero, this forces the characteristic equation $r^2-3r+2=0$, whose roots are $r=1$ and $r=2$. So $e^{x}$ and $e^{2x}$ are in the kernel, and the kernel of $L$ is $$ \ker L = \operatorname{span}\{e^{x},\,e^{2x}\}, $$ a two-dimensional space. That two-dimensionality is the deep reason a second-order linear ODE has exactly two independent solutions, and it is no accident: it is a theorem of differential equations that an $n$-th order linear operator has an $n$-dimensional kernel (on a suitable space of smooth functions). The "two arbitrary constants" you were told to expect are nothing but the dimension of the kernel — a coordinate count for the null space of an operator.

Notice the connection to the chapter's recurring observation about the differentiation operator's nontrivial kernel. There, the kernel of $D$ was the constants, and it explained the "$+C$" of integration. Here, the kernel of the second-order operator $L$ is two-dimensional, and it explains the "$+c_1 e^x + c_2 e^{2x}$" that every ODE solution carries. The arbitrary constants of calculus are kernels of linear operators, every time.

The general solution is a coset: particular plus kernel

Now the inhomogeneous problem $L(y)=f$ with $f\neq 0$. Suppose you find, by any means, a single particular solution $y_p$ with $L(y_p)=f$. Then the complete set of solutions is $$ y = y_p + y_h, \qquad y_h \in \ker L, $$ because $L(y_p + y_h) = L(y_p) + L(y_h) = f + 0 = f$, and conversely any two solutions differ by a kernel element ($L(y_1-y_2)=f-f=0$). This is precisely the Chapter 13 structure of the solution set of $A\mathbf{x}=\mathbf{b}$: one particular solution plus the entire null space. The "particular plus homogeneous" recipe drilled into every differential-equations student is the operator version of "$\mathbf{x}_p + N(A)$" — the same geometry, the same proof, transported from matrices to differential operators by Chapter 35's generalization.

This is the unifying insight the chapter was built to deliver. A linear system $A\mathbf{x}=\mathbf{b}$ and a linear ODE $L(y)=f$ are the same kind of problem: find the preimage of a target under a linear map. The solution set is empty if the target is outside the image, and otherwise it is a translate of the kernel by any one solution. Whether the linear map is a finite matrix or a differential operator changes the computational details but not one word of the structural story.

Differentiation as a finite matrix: a numerical experiment

On the infinite-dimensional space of all smooth functions, $L$ has no finite matrix. But we can restrict and approximate. Restrict $L$ to the polynomials $\mathbb{P}_4$ — a finite-dimensional space — and it becomes an honest matrix, built from the differentiation matrix of §35.5.

# L = D^2 - 3D + 2I restricted to P_4, in the monomial basis.
import numpy as np
n = 4
D = np.zeros((n + 1, n + 1))
for j in range(1, n + 1):
    D[j - 1, j] = j                      # differentiation matrix on P_4
I = np.eye(n + 1)
L = D @ D - 3 * D + 2 * I                # polynomial in the operator D
print(np.linalg.matrix_rank(L), (n + 1) - np.linalg.matrix_rank(L))  # 5 0 -> rank 5, nullity 0
print(round(np.linalg.det(L), 4))        # 32.0 -> invertible on P_4

The output 5 0 says $L$ restricted to $\mathbb{P}_4$ has rank $5$ and nullity $0$: on polynomials it is invertible. That seems to contradict the two-dimensional kernel we just found — until you remember which space we are on. The kernel $\operatorname{span}\{e^x,e^{2x}\}$ consists of exponentials, not polynomials, so none of it lives in $\mathbb{P}_4$. On the polynomial subspace the kernel is trivial, and rank–nullity reads $5+0=5=\dim\mathbb{P}_4$. The discrepancy is a lesson, not an error: the kernel depends on the space the operator acts on. Restricting $L$ to polynomials throws away the very functions that solve the homogeneous equation. This is exactly the infinite-dimensional subtlety the chapter flagged — injective-equals-surjective holds on the finite-dimensional $\mathbb{P}_4$ (where $L$ is invertible), but on the full function space $L$ is surjective with a two-dimensional kernel, and the two pictures are reconciled only by tracking the domain carefully.

The invertibility on $\mathbb{P}_4$ has a practical use: if $f$ happens to be a polynomial of degree $\le 4$, then $L^{-1}f$ (computed by solving the linear system) is the unique polynomial particular solution $y_p$, after which you add the exponential kernel for the general solution. The method of undetermined coefficients, which guesses a polynomial particular solution for a polynomial forcing term, is literally the matrix solve $y_p = L^{-1}f$ on $\mathbb{P}_4$.

# Particular polynomial solution of y'' - 3y' + 2y = f for f(x) = 2x^2 (a P_4 forcing term).
import numpy as np
f = np.array([0, 0, 2, 0, 0.])           # 2x^2 as a coefficient vector over {1,x,x^2,x^3,x^4}
y_p = np.linalg.solve(L, f)              # unique polynomial particular solution
print(np.round(y_p, 4))                  # [3.5 3.  1.  0.  0. ] -> y_p = 7/2 + 3x + x^2
# Verify L(y_p) = f by re-applying the operator:
print(np.round(L @ y_p, 4))              # [0. 0. 2. 0. 0.] -> recovers 2x^2

The particular solution comes out $y_p = x^2 + 3x + \tfrac{7}{2}$, and re-applying $L$ recovers $2x^2$ exactly. (Check by hand: with $y_p'=2x+3$ and $y_p''=2$, we get $y_p'' - 3y_p' + 2y_p = 2 - 3(2x+3) + 2\big(x^2+3x+\tfrac{7}{2}\big) = 2 - 6x - 9 + 2x^2 + 6x + 7 = 2x^2$. It works — the linear terms cancel and the constants $2-9+7$ sum to zero.) The complete solution to $y''-3y'+2y=2x^2$ is therefore $$ y(x) = \underbrace{x^2 + 3x + \tfrac{7}{2}}_{\text{particular } = L^{-1}f} + \underbrace{c_1 e^{x} + c_2 e^{2x}}_{\text{kernel of } L}, $$ a particular solution from a matrix solve plus the two-dimensional kernel — Chapter 13's geometry, executed on a differential operator.

Why engineers think in operators

This operator viewpoint is not a mathematician's affectation; it is how control and signals engineers actually compute. A linear time-invariant system — an amplifier, a suspension, a filter — is described by a linear differential (or difference) operator relating output to input. Engineers replace $D$ with a variable $s$ (the Laplace transform) or, in discrete time, the shift $L$ with $z$ (the $z$-transform), turning the operator polynomial into an ordinary polynomial whose roots — the eigenvalues of the operator — decide everything about the system's behavior. A system is stable exactly when those roots sit in the correct half-plane (or inside the unit circle); it resonates at the frequencies where the operator's "gain" blows up. All of this is eigen-analysis of a linear operator, and it is the direct sequel to this chapter: once differentiation is an operator with a matrix, its eigenvalues become the engineering quantities that matter, and Chapter 37's matrix exponential $e^{At}$ will give the explicit time evolution.

The throughline is the chapter's first theme. We began with a humble pair of calculus rules, recognized them as the axioms of a linear transformation, and rode that recognition all the way to the structure of differential-equation solutions and the stability of engineered systems. The derivative was a linear operator the whole time; seeing it that way turns "solve this ODE" into "find the preimage under a linear map," and the kernel, image, and rank–nullity you learned for matrices answer the question without a single new idea. That is what it means for linear algebra to be the mathematics of everything: the same structure, recognized in a new place, brings its entire toolkit with it.