Skip to content

General Solution of a Linear ODE


Proposition

Let a0,…,an−1a_0,\dots,a_{n-1} and gg be continuous on an interval II, write x′(t)=dxdt(t)x'(t)=\dfrac{\mathrm{d}x}{\mathrm{d}t}(t), and let

L[x]=x(n)+an−1(t)x(n−1)+⋯+a1(t)x′+a0(t)x.L[x]=x^{(n)}+a_{n-1}(t)x^{(n-1)}+\dots +a_1(t)x'+a_0(t)x.
  1. The solutions of the homogeneous equation L[x]=0L[x]=0 on II form a vector space S0S_0 of dimension nn.
  2. If xpx_p is a particular solution of L[x]=gL[x]=g, then the set of all solutions of L[x]=gL[x]=g is {xp}+S0\{x_p\}+S_0.

Hence, for any basis x1,…,xnx_1,\dots,x_n of S0S_0, the general solution of the linear ordinary differential equation (ODE) L[x]=gL[x]=g is

x(t)=xp(t)+c1x1(t)+⋯+cnxn(t),x(t)=x_p(t)+c_1x_1(t)+\dots+c_nx_n(t),

where c1,…,cn∈Rc_1,\dots,c_n\in\mathbb{R}, and nn initial conditions x(t0),x′(t0),…,x(n−1)(t0)x(t_0),x'(t_0),\dots,x^{(n-1)}(t_0) determine c1,…,cnc_1,\dots,c_n uniquely.


Interpretation

The map LL is linear, so S0S_0 is its kernel and the solution set of L[x]=gL[x]=g is a shifted copy of that kernel. This is the same structure as for homogeneous and inhomogeneous systems Ax=bA\boldsymbol{x}=\boldsymbol{b} in Math II, and the solution set is an affine subspace, not a subspace, when g≢0g\not\equiv0.

The solution x(t) of the example starting at 0 with zero slope, the dashed particular solution 2t - 3, and the homogeneous part 4e^(-t) - e^(-2t) decaying from 3 towards 0.

The figure plots the second-order example x′′+3x′+2x=4tx''+3x'+2x=4t with x(0)=x′(0)=0x(0)=x'(0)=0. The green solution x(t)=4e−t−e−2t+2t−3x(t)=4\mathrm{e}^{-t}-\mathrm{e}^{-2t}+2t-3 is the dashed particular solution xp=2t−3x_p=2t-3 plus the blue element 4e−t−e−2t4\mathrm{e}^{-t}-\mathrm{e}^{-2t} of S0S_0. The constants c1=4c_1=4, c2=−1c_2=-1 are fitted to the full sum, which is why xx starts at 00 with zero slope while xpx_p starts at −3-3. As the homogeneous part decays, x(t)x(t) approaches xp(t)x_p(t).

The proof of part 2 is one line: if L[x]=gL[x]=g then L[x−xp]=g−g=0L[x-x_p]=g-g=0, so x−xp∈S0x-x_p\in S_0. The dimension count in part 1 uses uniqueness of solutions: the map sending a solution to its initial data (x(t0),…,x(n−1)(t0))∈Rn\big(x(t_0),\dots,x^{(n-1)}(t_0)\big)\in\mathbb{R}^n is a linear bijection.

Common errors: fitting the initial conditions to the homogeneous part before adding xpx_p (the constants must be fitted to the full sum); and assuming the sum of two particular solutions is again a particular solution (it solves L[x]=2gL[x]=2g).


Key Results

  • nn solutions x1,…,xnx_1,\dots,x_n of L[x]=0L[x]=0 form a basis of S0S_0 if and only if their initial-data vectors (xi(t0),xi′(t0),…,xi(n−1)(t0))\big(x_i(t_0),x_i'(t_0),\dots,x_i^{(n-1)}(t_0)\big) are linearly independent for one (equivalently every) t0∈It_0\in I.
  • For constant coefficients, the roots of the characteristic equation supply such a basis.
  • The same structure holds for systems: all solutions of x′=Ax+b(t)\boldsymbol{x}'=A\boldsymbol{x}+\boldsymbol{b}(t) are xp\boldsymbol{x}_p plus the nn-dimensional solution space of x′=Ax\boldsymbol{x}'=A\boldsymbol{x}; see linear vector ODE.
  • For constant AA, the general solution is x(t)=eA(t−t0)x(t0)+∫t0teA(t−s)b(s) ds\boldsymbol{x}(t)=\mathrm{e}^{A(t-t_0)}\boldsymbol{x}(t_0)+\int_{t_0}^{t}\mathrm{e}^{A(t-s)}\boldsymbol{b}(s)\,\mathrm{d}s, using the matrix exponential.

Beyond the course

Many differential-equations textbooks test this independence with the Wronskian, the determinant of the matrix whose columns are the initial-data vectors at tt. Math V does not use it: checking the initial-data vectors at one t0t_0 is enough.


Examples

Second-order initial value problem. x′′+3x′+2x=4tx''+3x'+2x=4t, x(0)=0x(0)=0, x′(0)=0x'(0)=0. Homogeneous basis from r2+3r+2=(r+1)(r+2)r^2+3r+2=(r+1)(r+2): e−t\mathrm{e}^{-t}, e−2t\mathrm{e}^{-2t}. A particular solution is 2t−32t-3. So x=c1e−t+c2e−2t+2t−3x=c_1\mathrm{e}^{-t}+c_2\mathrm{e}^{-2t}+2t-3. The conditions give c1+c2=3c_1+c_2=3 and −c1−2c2+2=0-c_1-2c_2+2=0, hence c2=−1c_2=-1, c1=4c_1=4:

x(t)=4e−t−e−2t+2t−3.x(t)=4\mathrm{e}^{-t}-\mathrm{e}^{-2t}+2t-3.

Check: x(0)=4−1−3=0x(0)=4-1-3=0 and x′(0)=−4+2+2=0x'(0)=-4+2+2=0.

Independence check. At t0=0t_0=0 the initial-data vectors of e−t\mathrm{e}^{-t} and e−2t\mathrm{e}^{-2t} are (1,−1)(1,-1) and (1,−2)(1,-2), which are linearly independent, so e−t,e−2t\mathrm{e}^{-t},\mathrm{e}^{-2t} form a basis of S0S_0.

First order. x′=−2x+6x'=-2x+6: S0={Ce−2t}S_0=\{C\mathrm{e}^{-2t}\} has dimension 1 and xp=3x_p=3, so x(t)=3+Ce−2tx(t)=3+C\mathrm{e}^{-2t}.


Prerequisites



Sources

Aliases: general solution Keywords: superposition principle, x = x_p + x_h, fundamental set of solutions, solution space, Wronskian, homogeneous solution Symbols: element of, integral, real numbers

Last updated: 22 October 2026 19:04