maths2u
Tier
⌕ Search ⌘K
Theorem

Superposition for linear ODEs

T-064Home MU-205Threads change
Statement

Let \(I \subseteq \mathbb{R}\) be an interval and let \(a_0, a_1, \dots, a_{n-1} : I \to \mathbb{K}\) (with \(\mathbb{K} = \mathbb{R}\) or \(\mathbb{K} = \mathbb{C}\)) be continuous functions. Define the linear differential operator \(L : C^n(I,\mathbb{K}) \to C^0(I,\mathbb{K})\) by \[ L[y](x) = y^{(n)}(x) + a_{n-1}(x)y^{(n-1)}(x) + \cdots + a_1(x)y'(x) + a_0(x)y(x). \] Then \(L\) is a \(\mathbb{K}\)-linear map, and consequently: (i) the solution set \(\mathcal{N}(L) = \{ y \in C^n(I,\mathbb{K}) : L[y]=0 \text{ on } I \}\) of the homogeneous equation \(L[y]=0\) is a \(\mathbb{K}\)-vector subspace of \(C^n(I,\mathbb{K})\); and (ii) if \(y_1\) solves \(L[y]=f_1\) and \(y_2\) solves \(L[y]=f_2\) on \(I\), then for any scalars \(c_1,c_2 \in \mathbb{K}\), the function \(c_1y_1+c_2y_2\) solves \(L[y] = c_1f_1+c_2f_2\) on \(I\).

Why it matters

Superposition is the single fact that converts the study of linear ODEs from an analytic problem into a linear-algebraic one. Once the solution set of \(L[y]=0\) is known to be a vector space, questions of "how many independent solutions are there" and "how do I build the general solution" become questions about bases, dimension, and spanning sets — answerable with Wronskians, eigenvalue methods, and reduction of order, none of which make sense unless the solution set is closed under addition and scalar multiplication first.

It also underlies the standard strategy for inhomogeneous equations: solve the homogeneous equation for the "complementary function" \(y_c\), find any one "particular solution" \(y_p\) of \(L[y]=f\), and superposition guarantees \(y_c+y_p\) is again a solution — indeed the general solution, once dimension-counting is added (T-065, existence-uniqueness for linear ODEs).

Hypotheses
Linearity of \(L\) (no \(y^2\), \(yy'\), \(\sin y\), etc. terms). Counterexample: for the nonlinear equation \(L[y] = y'' - y^2 = 0\), both \(y_1(x)=0\) and a nontrivial solution \(y_2\) may solve \(L[y]=0\), but \(y_1+y_2\) generally does not: \(L[y_1+y_2] = y_2'' - (y_2)^2 - 2\cdot 0 \cdot y_2 \ne L[y_1]+L[y_2]\) in general because \((y_1+y_2)^2 \ne y_1^2+y_2^2\) unless one solution is zero. Superposition fails outright for the logistic-type equation \(y'' = y^2\).
Coefficients \(a_i\) depend only on \(x\) (or are constants), not on \(y\) or its derivatives. Counterexample: \(L[y] = y' + y\,y = y'+y^2\) looks additive in the derivative term but the \(y^2\) term is really a disguised nonlinearity coupling the coefficient to the unknown; the same additivity failure as above occurs.
Same interval \(I\) and same operator \(L\) for both solutions being combined. Counterexample: if \(y_1\) solves \(L_1[y]=0\) for one operator and \(y_2\) solves \(L_2[y]=0\) for a genuinely different operator \(L_2 \ne L_1\), there is no reason \(y_1+y_2\) solves anything related to \(L_1\) or \(L_2\); superposition is a statement about a single fixed operator, not "any two ODEs".
Domain of definition: solutions and coefficients must be considered on a common interval \(I\) where \(a_i\) are continuous. Counterexample: \(y_1 = x\) and \(y_2 = 1/x\) both solve the Euler equation \(x^2y''-xy'-y=0\)... wait, check on \(x\gt0\) — restricting to a smaller interval is harmless, but combining solutions defined on disjoint or non-overlapping intervals produces a "sum" that is not even a well-defined single function on a common domain, so the vector-space structure needs a fixed ambient \(I\).
Proof
1
Fix \(y_1,y_2 \in C^n(I,\mathbb{K})\) and \(c_1,c_2\in\mathbb{K}\). Since differentiation up to order \(n\) is a linear operation on \(C^n(I,\mathbb{K})\), \[ (c_1y_1+c_2y_2)^{(k)} = c_1y_1^{(k)} + c_2y_2^{(k)}, \qquad k=0,1,\dots,n. \]
Standard linearity of the derivative: \(\frac{d^k}{dx^k}\) is a linear map on \(C^k(I,\mathbb{K})\), proved by induction on \(k\) from the linearity of \(\frac{d}{dx}\) itself (sum rule and constant-multiple rule for derivatives). A
2
Hence, evaluating \(L\) at \(c_1y_1+c_2y_2\) and substituting the identity of Step 1 into each term \(a_k(x)\,(\cdot)^{(k)}\), \[ L[c_1y_1+c_2y_2] = \sum_{k=0}^{n} a_k(x)\big(c_1y_1^{(k)}+c_2y_2^{(k)}\big), \quad a_n \equiv 1. \]
Direct substitution into the definition of \(L\) given in the Statement. A
3
Distributing each \(a_k(x)\) over the bracket and regrouping by \(y_1\)- and \(y_2\)-terms, \[ L[c_1y_1+c_2y_2] = c_1\sum_{k=0}^n a_k(x)y_1^{(k)} + c_2\sum_{k=0}^n a_k(x)y_2^{(k)} = c_1L[y_1] + c_2L[y_2]. \]
Pointwise distributivity and commutativity of addition/multiplication in the field \(\mathbb{K}\), applied at each fixed \(x\in I\) — this is exactly the ring axioms for the field \(\mathbb{K}\) (or \(\mathbb{C}\)) applied termwise. B
4
Each side of the identity in Step 3 is a well-defined element of \(C^0(I,\mathbb{K})\): since \(a_k\) is continuous on \(I\) and \(y_j \in C^n(I,\mathbb{K})\) so \(y_j^{(k)} \in C^{n-k}(I,\mathbb{K}) \subseteq C^0(I,\mathbb{K})\), each product \(a_k y_j^{(k)}\) is continuous, and finite sums of continuous functions are continuous, so \(L : C^n(I,\mathbb{K}) \to C^0(I,\mathbb{K})\) is well-defined and the identity in Step 3 holds as an equality of continuous functions on \(I\), not merely pointwise almost everywhere.
Closure of \(C^0(I,\mathbb{K})\) under products and finite sums (standard fact from real/complex analysis: product and sum of continuous functions are continuous). This step certifies that "\(L[y]=0\) on \(I\)" is an honest, checkable equality of functions, needed before the vector-space claim in Step 5 is meaningful. C
5
Steps 1–3 show \(L(c_1y_1+c_2y_2) = c_1L(y_1)+c_2L(y_2)\) for all \(y_1,y_2\in C^n(I,\mathbb{K})\), \(c_1,c_2\in\mathbb{K}\): \(L\) is a \(\mathbb{K}\)-linear map.
Definition of a linear map between vector spaces (additivity + homogeneity, verified jointly above with arbitrary scalars). B
6
Take \(c_1=c_2=1\) with \(y_1,y_2 \in \mathcal{N}(L)\), i.e. \(L[y_1]=L[y_2]=0\): by Step 5, \(L[y_1+y_2]=L[y_1]+L[y_2]=0+0=0\), so \(y_1+y_2\in\mathcal{N}(L)\). Take \(c_2=0\) with \(y_1\in\mathcal{N}(L)\), \(c\in\mathbb{K}\): \(L[cy_1]=cL[y_1]=c\cdot 0=0\), so \(cy_1\in\mathcal{N}(L)\). Also \(L[0]=0\) by Step 5 with \(y_1=y_2=0\), so \(0\in\mathcal{N}(L)\), i.e. \(\mathcal{N}(L)\ne\varnothing\).
Definition of the kernel of a linear map, and the general fact that the kernel of any linear map between vector spaces is a subspace: closed under addition, scalar multiplication, and contains \(0\) (subspace criterion). B
7
\(\mathcal{N}(L)\) inherits the vector-space axioms (associativity, commutativity of \(+\), distributivity, existence of additive inverses \(-y=(-1)y\), etc.) from the ambient space \(C^n(I,\mathbb{K})\), since it is a subset closed under the same operations restricted from \(C^n(I,\mathbb{K})\). Hence \(\mathcal{N}(L)\) is itself a \(\mathbb{K}\)-vector space (a subspace of \(C^n(I,\mathbb{K})\)), proving part (i).
Subspace theorem: a nonempty subset of a vector space closed under addition and scalar multiplication is itself a vector space under the inherited operations, because all the remaining axioms (associativity, commutativity, distributivity, identity, inverses) are equalities that already hold in the ambient space and so hold a fortiori on the subset. A
8
For part (ii): suppose \(L[y_1]=f_1\) and \(L[y_2]=f_2\) on \(I\). By Step 5 (linearity of \(L\), with the same scalars \(c_1,c_2\)), \[ L[c_1y_1+c_2y_2] = c_1L[y_1]+c_2L[y_2] = c_1f_1+c_2f_2. \] So \(c_1y_1+c_2y_2\) solves \(L[y]=c_1f_1+c_2f_2\), which is exactly the claim.
Direct application of the linearity established in Step 5 to arbitrary (not necessarily zero) right-hand sides \(f_1,f_2\). A
Result
L \text{ linear} \;\Longrightarrow\; \mathcal{N}(L) \text{ is a vector space, and } L[c_1y_1+c_2y_2] = c_1L[y_1]+c_2L[y_2]

Reading. Because differentiation is linear and the coefficients \(a_k(x)\) only multiply (never square or compose with) \(y\) and its derivatives, plugging a linear combination of two candidate solutions into \(L\) gives exactly the same linear combination of what \(L\) does to each one separately. Zero solutions add to zero solutions; scaled solutions stay solutions; and mixed right-hand sides combine additively too.

Scope. Applies to any linear ODE (or linear system, or linear PDE with the analogous argument) of any order \(n\), with variable or constant, real or complex coefficients, provided the equation is genuinely linear in \(y\) and its derivatives — the coefficients \(a_k\) may depend on \(x\) but not on \(y\). It does not itself say anything about existence, uniqueness, or the dimension of \(\mathcal{N}(L)\) — that is the separate content of the existence–uniqueness theorem (T-065) and the Wronskian/independence machinery.

Corollaries & converses
  • Any \(\mathbb{K}\)-linear combination of finitely many solutions of \(L[y]=0\) is again a solution (immediate induction on the two-term case in Step 6).
  • If \(y_p\) is any particular solution of \(L[y]=f\) and \(y_h\) ranges over \(\mathcal{N}(L)\), then \(y_p+y_h\) ranges over all solutions of \(L[y]=f\): existence of a further solution \(\tilde y\) of \(L[y]=f\) gives \(L[\tilde y - y_p]=f-f=0\) by superposition, so \(\tilde y - y_p \in \mathcal{N}(L)\), i.e. \(\tilde y = y_p + (\tilde y-y_p)\) has the claimed form. This is the "general solution = particular + complementary" recipe.
  • Converse-type statement: the property "\(\mathcal{N}(L)\) is a vector space" does not conversely imply \(L\) is linear — e.g. some highly special nonlinear operators can accidentally have a solution set closed under addition on a restricted class, but this is not implied by, nor does it recover, full superposition \(L[c_1y_1+c_2y_2]=c_1L[y_1]+c_2L[y_2]\) for arbitrary scalars and arbitrary right-hand sides; the theorem is one-directional (linearity \(\Rightarrow\) superposition) and the converse is not a meaningful strengthening in general.
  • Superposition extends immediately to countable/finite linear combinations \(\sum_{j=1}^m c_jy_j\) of solutions to \(L[y]=f_j\), giving a solution of \(L[y]=\sum_j c_jf_j\); this is the basis of Fourier-series and eigenfunction-expansion solution methods for linear ODEs and PDEs.
Fails without
  • Nonlinearity in \(y\): for the Riccati-type equation \(y' = y^2\), both \(y\equiv 0\) and \(y(x) = -1/x\) (on \(x\gt0\)) solve the equation, but \(y_1+y_2 = -1/x\) trivially still works only because one term is zero; take instead \(y_1(x)=-1/x\) and \(y_2(x) = -1/(x-1)\) (each solving \(y'=y^2\) on suitable intervals): \((y_1+y_2)' = 1/x^2+1/(x-1)^2\) while \((y_1+y_2)^2 = 1/x^2+2/[x(x-1)]+1/(x-1)^2\), and these differ (the cross term \(2/[x(x-1)]\) has no counterpart in the derivative), so \(y_1+y_2\) does not solve \(y'=y^2\). Superposition fails.
  • Nonlinearity via a nonlinear function of \(y\): for \(y''+\sin y = 0\) (the pendulum equation), the constant solution \(y_1\equiv 0\) and any nontrivial oscillatory solution \(y_2\) both solve the equation, but \(y_1+y_2=y_2\) is not a new solution built by superposition in any useful sense once you try to combine two genuinely different nonlinear pendulum solutions \(y_2,y_3\): \(\sin(y_2+y_3)\ne \sin y_2+\sin y_3\) in general, so \((y_2+y_3)''+\sin(y_2+y_3) \ne 0\).
  • Coefficients secretly depending on \(y\): for \(y'+p(y)y=0\) where \(p\) genuinely depends on \(y\) (a disguised nonlinear equation dressed in linear-looking notation), the additivity argument of Step 2 breaks because \(a_k\) is no longer a fixed function of \(x\) alone when evaluated along \(y_1\) versus \(y_2\) versus \(y_1+y_2\).
Common errors
  • Applying superposition to add two solutions of different inhomogeneous equations without adjusting the right-hand side — forgetting that \(L[y_1+y_2]=f_1+f_2\), not \(f_1\) or \(f_2\) alone, so \(y_1+y_2\) solves \(L[y]=f_1+f_2\), which may not be the equation the student actually wants.
  • Assuming superposition holds for any ODE that "looks tidy", e.g. applying it to \(y'=y^2\) or \(yy''=1\) without checking linearity first — the theorem's hypothesis (linearity in \(y,y',\dots,y^{(n)}\) with coefficients depending only on \(x\)) is not optional.
  • Confusing superposition of solutions with superposition of initial conditions: adding two solutions \(y_1,y_2\) of the same linear IVP with different initial data gives a solution of the ODE with the sum of the initial data, not a new solution of the original IVP.
  • Forgetting the particular-plus-complementary structure and believing that any two solutions of \(L[y]=f\) (with the same nonzero \(f\)) can be added to get another solution of \(L[y]=f\): in fact \(L[y_1+y_2]=2f\ne f\) unless \(f=0\); only their difference stays in \(\mathcal{N}(L)\).
  • Treating "the coefficients are constants" as a hypothesis of the theorem — superposition needs only that the \(a_k(x)\) do not depend on \(y\); variable, non-constant coefficients are perfectly allowed.
Discussion

Superposition is really a one-line consequence of recognising \(L\) as a linear map between function spaces — the ODE-specific content is entirely in verifying that differentiation and pointwise multiplication by continuous functions preserve linearity, which is why the proof above is short but not vacuous: Step 4 is doing real work in confirming that the algebra of Steps 1–3 takes place inside a well-defined codomain \(C^0(I,\mathbb{K})\).

Historically, the recognition that solutions of linear differential equations could be combined goes back to the study of linear recurrences and the algebra of "operators" \(D=\frac{d}{dx}\) in the 18th and 19th centuries (Euler, Lagrange, and later the operational calculus of Heaviside), long before the formal language of vector spaces existed; the modern statement as "the kernel of a linear map is a subspace" is a 20th-century abstraction of what physicists and engineers had already been doing when they added two normal modes of a vibrating string or two solutions of a linear circuit equation.

The theorem is the entry point to an entire toolbox: once \(\mathcal{N}(L)\) is known to be a vector space, the natural next questions are its dimension (answered by the existence–uniqueness theorem for the associated IVP, giving \(\dim\mathcal{N}(L)=n\) for an \(n\)th-order equation on an interval where the \(a_k\) are continuous) and how to certify a spanning set is a basis (the Wronskian test). Superposition alone says nothing about dimension or independence — it only supplies the ambient linear structure in which those later theorems operate.

A subtlety worth flagging for more careful treatments: superposition as stated is a statement about the operator \(L\) acting on a fixed function space \(C^n(I,\mathbb{K})\); it says nothing about whether a particular linear combination \(c_1y_1+c_2y_2\) satisfies any auxiliary conditions (boundary conditions, initial conditions, integrability, decay at infinity) that may have been imposed alongside \(L[y]=f\). Superposition is compatible with linear boundary conditions (if \(B_j\) is a linear functional such as \(B_j[y]=y(a)\) or \(\int_a^b y\), then \(B_j[c_1y_1+c_2y_2]=c_1B_j[y_1]+c_2B_j[y_2]\) too), but fails immediately for nonlinear side conditions such as \(y(a)^2=1\), which is a common trap in boundary value problems.

Worked examples
1
Consider \(L[y]=y''+y=0\) on \(I=\mathbb{R}\). Verify directly that \(y_1(x)=\cos x\) and \(y_2(x)=\sin x\) are solutions.
Direct differentiation: \(y_1''=-\cos x=-y_1\) so \(y_1''+y_1=0\); \(y_2''=-\sin x=-y_2\) so \(y_2''+y_2=0\). A
2
By the Theorem (part (i), with \(c_1=3,c_2=-2\)), \(y(x)=3\cos x - 2\sin x\) solves \(L[y]=0\) without any further differentiation being necessary.
Direct application of superposition (Step 6 of the Proof) to \(y_1,y_2\in\mathcal{N}(L)\). A
3
Check by direct computation as a sanity test: \(y'=-3\sin x-2\cos x\), \(y''=-3\cos x+2\sin x\), so \(y''+y = (-3\cos x+2\sin x)+(3\cos x-2\sin x)=0\). Confirmed.
Direct verification (not required by the theorem, but shown to illustrate that no new computation was actually needed — the theorem replaced an explicit calculation with pure algebra of coefficients). A
y(x) = 3\cos x - 2\sin x \text{ solves } y''+y=0 \text{ on } \mathbb{R}
1
Consider the inhomogeneous equation \(L[y] = y'' - y = f(x)\) on \(I=\mathbb{R}\), and note \(y_1(x)=-x\) satisfies \(L[y_1] = 0-(-x) = x\), i.e. \(y_1\) solves \(L[y]=x\); also \(y_2(x)=e^x\) satisfies \(L[y_2]=e^x-e^x=0\), i.e. \(y_2\in\mathcal{N}(L)\).
Direct differentiation: \(y_1''=0\), so \(L[y_1]=0-(-x)=x\); \(y_2''=e^x\), so \(L[y_2]=e^x-e^x=0\). A
2
By the Theorem (part (ii), with \(c_1=1,c_2=5\), \(f_1=x\), \(f_2=0\)), \[ L[y_1+5y_2] = 1\cdot x + 5\cdot 0 = x, \] so \(y(x) = -x+5e^x\) solves \(L[y]=x\) on \(\mathbb{R}\) for any choice of the coefficient \(5\), because adding any multiple of a homogeneous solution to a particular solution keeps the right-hand side unchanged.
Direct application of superposition to an inhomogeneous right-hand side plus a homogeneous solution (special case of part (ii) with \(f_2=0\), matching the corollary "particular + complementary"). B
3
Verify: with \(y=-x+5e^x\), \(y''=5e^x\), so \(y''-y = 5e^x-(-x+5e^x) = x\). Confirmed for every choice of constant in place of \(5\), illustrating that the family \(\{-x+ce^x : c\in\mathbb{K}\}\) is an entire one-parameter family of solutions generated for free by superposition.
Direct verification, illustrating the corollary that the general solution of \(L[y]=f\) is \(y_p+y_h\) with \(y_h\) ranging over \(\mathcal{N}(L)\). A
y(x) = -x + c\,e^x \text{ solves } y''-y=x \text{ on } \mathbb{R} \text{ for every } c\in\mathbb{R}
Problems
  1. Show directly, without quoting the theorem, that if \(y_1,y_2\) solve \(y''+p(x)y'+q(x)y=0\) then so does \(y_1-y_2\).
    SolutionWrite \(y_1-y_2 = y_1+(-1)y_2\). Compute \((y_1-y_2)'' + p(x)(y_1-y_2)'+q(x)(y_1-y_2) = (y_1''+py_1'+qy_1) - (y_2''+py_2'+qy_2) = 0-0=0\), using linearity of differentiation to distribute the derivatives and the fact that both bracketed terms vanish by hypothesis. Hence \(y_1-y_2\) also solves the equation — the special case \(c_1=1,c_2=-1\) of superposition.
  2. Let \(L[y]=y''+4y\). Given that \(y_1=\cos 2x\) and \(y_2=\sin 2x\) both solve \(L[y]=0\), write down (without further differentiating) a solution satisfying \(y(0)=3\).
    SolutionBy superposition, \(y=c_1\cos 2x+c_2\sin 2x\) solves \(L[y]=0\) for any \(c_1,c_2\). Imposing \(y(0)=c_1\cos0+c_2\sin0=c_1=3\) forces \(c_1=3\); \(c_2\) is unconstrained by this single condition, e.g. \(y=3\cos 2x\) (taking \(c_2=0\)) works, and more generally \(y=3\cos 2x+c_2\sin 2x\) for any \(c_2\in\mathbb{R}\).
  3. Explain precisely why superposition does not apply to \(y'=y^2+x\), and exhibit two solutions \(y_1,y_2\) (numerically or qualitatively described) whose sum fails to solve the equation.
    SolutionThe equation is nonlinear because of the \(y^2\) term: writing \(L[y]=y'-y^2-x\), we get \(L[y_1+y_2] = y_1'+y_2' -(y_1+y_2)^2-x = (y_1'-y_1^2-x)+(y_2'-y_2^2-x) -2y_1y_2+x = L[y_1]+L[y_2] -2y_1y_2+x\), which differs from \(L[y_1]+L[y_2]\) by the leftover terms \(-2y_1y_2+x\) unless these vanish identically. Concretely if \(y_1,y_2\) are two distinct (non-constant, nonzero) solutions of this Riccati equation, \(-2y_1(x)y_2(x)+x\) is generically not the zero function, so \(y_1+y_2\) is not a solution. The failure traces directly to the hypothesis "linear in \(y\)" being violated.
  4. Let \(L[y]=y'''-2y''+y'\) and suppose \(y_1\) solves \(L[y]=e^x\) while \(y_2\) solves \(L[y]=x\). Find, in terms of \(y_1,y_2\), a solution of \(L[y]=3e^x-2x\), and justify using the theorem.
    SolutionBy part (ii) of the theorem with \(c_1=3,c_2=-2\), \(L[3y_1-2y_2] = 3L[y_1]-2L[y_2] = 3e^x-2x\), so \(y=3y_1-2y_2\) is a solution of \(L[y]=3e^x-2x\). No new integration is required — only linear combination of the already-known particular solutions with matching coefficients on the right-hand side.
  5. A student claims: "Since \(y=0\) always solves any homogeneous linear ODE \(L[y]=0\), and since \(y=0\) also 'solves' \(y'=\sqrt{y}\) trivially, superposition must apply to \(y'=\sqrt{y}\) too, because \(0+y_2=y_2\) for any other solution \(y_2\)." Identify the flaw in this reasoning.
    SolutionThe flaw is that superposition is a claim about every pair of solutions and every pair of scalars, not merely the trivial case where one of the two functions being added is the zero function (for which any operator, linear or not, satisfies \(L[0+y_2]=L[y_2]\) trivially — this says nothing about linearity). To test superposition properly one must add two nonzero, distinct solutions: e.g. \(y_1(x)=x^2/4\) solves \(y'=\sqrt y\) (for \(x\ge0\)), and so does any shifted version \(y_2(x) = (x-a)^2/4\) for \(x\ge a\); but \((y_1+y_2)' = x/2+(x-a)/2\) while \(\sqrt{y_1+y_2} = \sqrt{(x^2+(x-a)^2)/4}\), and these are not equal in general, so \(y_1+y_2\) fails to solve \(y'=\sqrt y\). The equation \(y'=\sqrt y\) is nonlinear, so the hypothesis of the theorem is violated regardless of the accidental zero solution.