Differential Equations

One Polynomial Solves Them All — When They Are Linear

Target Audience: Anyone comfortable differentiating and integrating who wants to solve equations whose unknown is a function.

Prerequisites: Limits and Derivatives for the product and chain rules; The Riemann Integral for the Fundamental Theorem; and Eigenvalues and Canonical Forms for Sections 7 onwards.

How to Read This Page

Every equation so far on this site has had a number for its unknown. Here the unknown is a function, and the equation relates it to its own derivatives. That sounds harder, and in general it is — most differential equations have no formula for their solutions at all. But one large family is completely solvable, and solvable by algebra you already have: linear equations with constant coefficients, where the whole problem collapses to the roots of one polynomial.

Sections 1 to 5 handle first-order equations and say what “solving” can and cannot mean. Section 6 is the heart: the solution set is the kernel of a linear operator, its dimension is the order of the equation, and a basis is read off the characteristic polynomial. Section 7 recasts that as linear algebra, where a repeated root turns out to be a Jordan block. Section 9 collects the equations earlier units had already solved without calling them differential equations.

The explorer in Section 6 derives a solution from the characteristic polynomial and then checks it three ways that share no code with the derivation — exact substitution, the Wronskian, and an independent numerical integration.

1. What a Differential Equation Is

Definitions

A differential equation relates an unknown function to its derivatives. Its order is the highest derivative that appears. A solution is a function that satisfies it on an interval.

\(y'' + 4y' + 13y = 0\) has order \(2\). It is linear, because \(y\) and its derivatives appear only to the first power and are not multiplied together, and it has constant coefficients.

General and particular solutions

A differential equation normally has infinitely many solutions. \(y' = 3y\) is satisfied by \(y = Ce^{3t}\) for every constant \(C\), and that family is the general solution. Adding an initial condition such as \(y(0) = 2\) picks out one member: the particular solution \(y = 2e^{3t}\). An equation of order \(n\) needs \(n\) conditions.

Most equations have no formula

Solving a differential equation is not like solving \(x^2 = 2\), where an answer always exists once you allow the right numbers. For \(y' = \sin(ty)\) no formula for the solution in terms of the usual functions is known, and that is the normal case. Section 8 is about what to do instead, and Section 5 is about what can be known without a formula.

2. The Equation You Already Solved

Theorem

The only solutions of \(y' = ky\) are

\[ y = y_0 e^{kt}, \qquad y_0 = y(0). \]

Proof. Each such \(y\) works, since \(\frac{d}{dt}\,y_0e^{kt} = ky_0e^{kt}\). For the converse, let \(y\) be any solution and put \(u = y\,e^{-kt}\). Then \(u' = y'e^{-kt} - ky e^{-kt} = (y' - ky)e^{-kt} = 0\), so \(u\) is constant, and \(y = u e^{kt}\).

This is the site’s exponential material, named

“Rate of change proportional to amount” is exactly \(y' = ky\), and it is what The Story of e is about: \(e\) is the number whose exponential is its own derivative. The exponential and logarithmic functions chapter uses the same equation for compound interest, cooling and decay.

Doubling time and half-life

From \(y_0e^{kt} = 2y_0\), the doubling time is \(t = \frac{\ln 2}{k}\) — about \(0.693/k\), and independent of \(y_0\). A decay with \(k \lt 0\) has half-life \(\frac{\ln 2}{|k|}\): a substance with \(k = -\frac{\ln 2}{5}\) halves every \(5\) units of time, whatever the starting amount.

3. Separable Equations

The method

If the equation can be written

\[ \frac{dy}{dx} = f(x)\,g(y), \]

then divide by \(g(y)\), integrate both sides in their own variable, and solve for \(y\).

Why that is legitimate. It is the chain rule read backwards. If \(G\) is an antiderivative of \(1/g\), then \(\frac{d}{dx}G(y(x)) = \frac{y'}{g(y)} = f(x)\), so \(G(y(x))\) and any antiderivative of \(f\) differ by a constant — which is the Fundamental Theorem doing the work. The separated form is bookkeeping for that argument, and it needs \(g(y) \neq 0\).

Newton’s law of cooling

A body at temperature \(T\) in surroundings at \(A\) cools at a rate proportional to the difference: \(T' = -k(T - A)\). Separating, \(\int \frac{dT}{T - A} = -\int k\,dt\), so \(\ln|T - A| = -kt + c\) and

\[ T(t) = A + (T_0 - A)e^{-kt}. \]

The difference decays exponentially: the body approaches room temperature, never quite reaching it. Substituting back confirms it, and \(T(0) = T_0\).

The logistic equation

Exponential growth cannot continue for ever. Let the growth rate fall to zero as the population approaches a capacity \(K\):

\[ P' = rP\left(1 - \frac{P}{K}\right). \]

It is separable, and the integral of \(\frac{1}{P(1 - P/K)}\) splits by partial fractions into \(\frac{1}{P} + \frac{1/K}{1 - P/K}\). The result is

\[ P(t) = \frac{K}{1 + \left(\frac{K - P_0}{P_0}\right)e^{-rt}}, \]

which starts at \(P_0\), grows like \(e^{rt}\) while \(P\) is small, and tends to \(K\). Unlike the linear equations later on, this one is solvable only because it separates.

4. First Order Linear: the Integrating Factor

The trick

For \(y' + a(x)\,y = b(x)\), multiply by

\[ \mu(x) = e^{\int a(x)\,dx}. \]

Since \(\mu' = a\mu\), the product rule gives \((\mu y)' = \mu y' + a\mu y = \mu b\). So \(\mu y\) is an antiderivative of \(\mu b\), and

\[ y = \frac{1}{\mu(x)}\left(\int \mu(x)b(x)\,dx + C\right). \]

Worked example

For \(y' + \frac{2}{t}y = t\) with \(t \gt 0\): here \(\int \frac{2}{t}dt = 2\ln t\), so \(\mu = e^{2\ln t} = t^2\). Multiplying, \((t^2y)' = t^3\), hence \(t^2 y = \frac{t^4}{4} + C\) and

\[ y = \frac{t^2}{4} + \frac{C}{t^2}. \]

Differentiating confirms it. Note the shape: a particular solution \(\frac{t^2}{4}\) plus a multiple of the solution \(t^{-2}\) of the homogeneous equation \(y' + \frac{2}{t}y = 0\). That structure recurs everywhere in linear problems, and Section 6 explains why.

5. Existence, Uniqueness and Two Warnings

The Picard–Lindelöf theorem

If \(f(t, y)\) is continuous near \((t_0, y_0)\) and satisfies a Lipschitz condition in \(y\) there — \(|f(t, y_1) - f(t, y_2)| \leq L|y_1 - y_2|\) — then \(y' = f(t, y)\) with \(y(t_0) = y_0\) has exactly one solution on some interval around \(t_0\). The proof builds the solution as the limit of successive approximations, and rests on the completeness of the space they live in; this page states it without proof.

Warning 1: “some interval” can be short

\(y' = y^2\) with \(y(0) = 1\) is as well behaved as could be asked, and its solution is

\[ y = \frac{1}{1 - t}, \]

which runs off to infinity as \(t \to 1\). Nothing in the equation hints at the time \(1\); the solution exists only for \(t \lt 1\). A theorem that promised solutions for all time would be false.

Warning 2: without Lipschitz, uniqueness fails

\(y' = 3y^{2/3}\) with \(y(0) = 0\) has the solution \(y \equiv 0\), and also, for \(t \geq 0\),

\[ y = t^3. \]

Both satisfy the equation and the initial condition. The right-hand side is continuous everywhere, but its \(y\)-derivative blows up at \(y = 0\), so no Lipschitz constant works there — and uniqueness is exactly what fails.

Why linear equations are the comfortable case

For a linear equation with continuous coefficients, the Lipschitz condition holds automatically and the solution exists for as long as the coefficients do. The pathologies above are the price of non-linearity, and the reason the rest of this page is about linear equations.

6. Second Order Linear, Constant Coefficients

The solution set is a kernel

Write \(L[y] = y'' + py' + qy\). Differentiation is linear, so \(L[c_1y_1 + c_2y_2] = c_1L[y_1] + c_2L[y_2]\): the map \(L\) is a linear map on functions. The solutions of \(L[y] = 0\) are therefore its null space — a vector space. That is the superposition principle: sums and multiples of solutions are solutions, and it is linear algebra, not calculus.

The characteristic polynomial

Try \(y = e^{rt}\). Then \(L[e^{rt}] = (r^2 + pr + q)e^{rt}\), which vanishes exactly when

\[ r^2 + pr + q = 0. \]

Three cases, by the roots:

  • Distinct real \(r_1, r_2\): basis \(e^{r_1t}, e^{r_2t}\).
  • A repeated root \(r\): basis \(e^{rt}, te^{rt}\) — the second one is forced, and Section 7 says where the \(t\) comes from.
  • A complex pair \(\alpha \pm \beta i\): basis \(e^{\alpha t}\cos\beta t,\; e^{\alpha t}\sin\beta t\), which are the real and imaginary parts of \(e^{(\alpha + \beta i)t}\) by Euler’s formula.

Dimension equals order

Two conditions \(y(0)\) and \(y'(0)\) determine a solution uniquely, so the solution space has dimension \(2\) — and an equation of order \(n\) has an \(n\)-dimensional solution space. To check that a proposed basis really is one, evaluate the Wronskian, the determinant of the matrix of values and derivatives at a point: if it is non-zero the functions are independent, and the initial conditions can always be met.

Interactive: The Linear ODE Explorer

Choose an equation. The explorer factors its characteristic polynomial exactly, builds the basis, and solves for the initial conditions in exact rational arithmetic. Then it checks the answer three independent ways: it differentiates each basis function symbolically and requires the equation to come out zero, it computes the Wronskian at \(0\), and it integrates the original equation numerically with Runge–Kutta and compares.

Characteristic polynomial, roots and basis
    The particular solution for these initial conditions
      Checks the explorer runs on its own output

        Compare the repeated root with the distinct ones: the same order, but one basis function carries a factor \(t\).

        7. Systems, Companion Matrices and Jordan Blocks

        A system of first-order equations

        For a vector unknown, \(\mathbf{x}' = A\mathbf{x}\) with \(A\) a constant matrix. If \(A\mathbf{v} = \lambda\mathbf{v}\), then

        \[ \mathbf{x} = \mathbf{v}e^{\lambda t} \]

        is a solution, since both sides differentiate to \(\lambda \mathbf{v}e^{\lambda t}\). So each eigenvector gives a solution, and with \(n\) independent eigenvectors the general solution is their combination — which is the claim the eigenvalues page makes when it says the system decouples in an eigenbasis.

        Any single equation is a system

        Set \(x_1 = y\), \(x_2 = y'\). Then \(y'' + py' + qy = 0\) becomes

        \[ \begin{pmatrix} x_1 \\ x_2 \end{pmatrix}' = \begin{pmatrix} 0 & 1 \\ -q & -p \end{pmatrix} \begin{pmatrix} x_1 \\ x_2 \end{pmatrix}. \]

        That matrix is the companion matrix, and its characteristic polynomial is \(\lambda^2 + p\lambda + q\) — the characteristic polynomial of the differential equation. The two uses of the phrase are the same object, checked here for the second and third-order examples in the explorer.

        Where the factor \(t\) comes from

        A repeated root with only one eigenvector is a Jordan block. Take \(A = \begin{pmatrix} \lambda & 1 \\ 0 & \lambda \end{pmatrix}\). Then \(x_2' = \lambda x_2\) gives \(x_2 = c_2e^{\lambda t}\), and

        \[ x_1' = \lambda x_1 + c_2 e^{\lambda t} \]

        is a first-order linear equation whose integrating factor \(e^{-\lambda t}\) turns it into \((x_1e^{-\lambda t})' = c_2\). So \(x_1 = (c_1 + c_2t)e^{\lambda t}\): the \(te^{\lambda t}\) of Section 6 is the off-diagonal \(1\) of the Jordan block, integrated once.

        8. When You Cannot Solve It

        Euler’s method

        The equation \(y' = f(t, y)\) gives the slope at every point, so follow it in small steps:

        \[ y_{n+1} = y_n + h\,f(t_n, y_n), \qquad t_{n+1} = t_n + h. \]

        This is the definition of the derivative used forwards. Halving \(h\) roughly halves the error at a fixed time: the method is first order, and that is usually too slow to be useful.

        Runge–Kutta, and why the explorer uses it

        The classical fourth-order Runge–Kutta method samples the slope four times per step and combines the samples so that the error shrinks like \(h^4\). Halving the step divides the error by about \(16\), which is what makes it practical.

        The explorer above uses it as an independent witness. Its closed-form solution comes from algebra on the characteristic polynomial; the Runge–Kutta run knows nothing about that and only ever evaluates the equation itself. When the two agree to nine decimal places at several times, an error in the algebra would have to be matched by an identical error in the integrator.

        A numerical solution is not a proof

        It gives numbers at sample times, not a formula, and it cannot tell you that a solution blows up at \(t = 1\) rather than merely growing quickly. The \(y' = y^2\) example of Section 5 is exactly where a numerical run, taken alone, would mislead.

        9. The Equations This Site Already Solved

        \(y'' - k^2y = 0\), on the hyperbolic page

        The hyperbolic functions page states the general solution twice over:

        \[ y = A\cosh kt + B\sinh kt = Ce^{kt} + De^{-kt}. \]

        Section 6 explains both: the roots are \(\pm k\), so \(e^{kt}, e^{-kt}\) is a basis, and \(\cosh kt, \sinh kt\) is another. They are related by a change of basis, with \(C = \frac{A + B}{2}\) and \(D = \frac{A - B}{2}\) — two bases of one two-dimensional space, which is why the page could give either.

        \(y'' = -y\), on the sine and cosine page

        The derivatives of sine and cosine page notes that both functions satisfy \(y'' = -y\), the equation of simple harmonic motion. The roots are \(\pm i\), the basis is \(\cos t, \sin t\), and the initial conditions pick out which combination.

        \(\mathbf{x}' = A\mathbf{x}\), on the eigenvalues page

        That page says a diagonalisable system decouples into \(n\) copies of \(y' = \lambda y\). Section 7 is the derivation, and adds the case it leaves out: when \(A\) is not diagonalisable, the Jordan blocks contribute the \(t^je^{\lambda t}\) terms.

        10. What the Abstraction Buys

        On the site As differential equations
        Exponential growth and decay \(y' = ky\), with a uniqueness proof in two lines
        Newton’s law of cooling A separable equation whose solution approaches the room temperature
        The null space of a linear map The solution space, of dimension equal to the order
        The characteristic polynomial of a matrix The characteristic polynomial of the equation, via the companion matrix
        Jordan blocks The factors \(t^j\) beside a repeated root
        \(\cosh\) and \(\sinh\), and \(\cos\) and \(\sin\) Bases for \(y'' = k^2y\) and \(y'' = -y\)
        The Fundamental Theorem What makes separation of variables legitimate

        One polynomial, two subjects

        For constant coefficients, everything about the solutions — growth or decay, oscillation, the stray factors of \(t\) — is already present in the roots of a polynomial of degree equal to the order. That is the same polynomial the eigenvalues unit attaches to a matrix, and the correspondence is exact: roots are eigenvalues, and multiplicities are Jordan block sizes.

        11. Summary

        Where this sits in the plan

        The fourth Tier 5 unit, and the first outside abstract algebra. It uses the calculus of Tiers 2 and 3 and the linear algebra of Unit 11, and it is where the site’s exponential, hyperbolic and eigenvalue material turns out to have been solving differential equations all along.

        12. Quick Reference

        Equation Method Solution
        \(y' = ky\) Differentiate \(ye^{-kt}\) \(y_0e^{kt}\), and nothing else
        \(\frac{dy}{dx} = f(x)g(y)\) Separate and integrate \(\int \frac{dy}{g(y)} = \int f(x)\,dx\)
        \(y' + a(x)y = b(x)\) Integrating factor \(\mu = e^{\int a}\) \(y = \mu^{-1}\left(\int \mu b + C\right)\)
        \(T' = -k(T - A)\) Separable \(A + (T_0 - A)e^{-kt}\)
        \(P' = rP(1 - P/K)\) Separable, partial fractions \(\dfrac{K}{1 + \frac{K - P_0}{P_0}e^{-rt}}\)
        \(y'' + py' + qy = 0\) Characteristic polynomial \(r^2 + pr + q\) Basis from the roots; dimension \(2\)
        Repeated root \(r\) Jordan block \(e^{rt}, te^{rt}\)
        Complex pair \(\alpha \pm \beta i\) Euler’s formula \(e^{\alpha t}\cos\beta t,\; e^{\alpha t}\sin\beta t\)
        \(\mathbf{x}' = A\mathbf{x}\) Eigenvectors, Jordan form \(\mathbf{v}e^{\lambda t}\), plus \(t^j\) terms
        No formula available Runge–Kutta Numbers at sample times, error \(O(h^4)\)

        Review Material for This Page