Differential Equations

Differential Equations (Overview)

Equations whose unknowns are functions, not numbers

A differential equation is an equation involving an unknown function and its derivatives. Solving one means finding the function. ODEs involve a single independent variable (typically time); PDEs involve several (typically space and time); SDEs add random noise; DDEs build in time delays. Together they encode most quantitative laws of physics, biology, chemistry and finance.

  • GoalFind the unknown function y(x) or u(x, t)
  • OrderHighest derivative present (1st, 2nd, …)
  • Linearityy, y′, y″ appear only to first power, no products
  • Initial-value vs boundary-valueConditions at one point vs at multiple points
  • Existence/uniquenessPicard–Lindelöf theorem for ODEs
  • Closed-form solutionsRare beyond a small zoo of textbook families

Watch the 60-second explainer

A condensed visual walkthrough — narrated, captioned, under a minute.

What a differential equation is

An algebraic equation like x² + 5x − 6 = 0 has unknown numbers; you solve it by finding the values of x that satisfy the relation. A differential equation has unknown functions; you solve it by finding the function y(x) (or u(x, t), or X(t), …) whose derivatives obey the relation.

The simplest interesting example is

y′ = k·y.

The equation says: at every point, the slope of y is proportional to its current value. The solution is y = A·ekx for any constant A. The equation does not pick A on its own — that requires an extra initial condition like y(0) = 7. Together they yield a unique solution y = 7·ekx.

This is the universal pattern. A differential equation determines a family of solutions; initial or boundary conditions select a specific member of the family. The number of conditions equals the order of the equation.

Worked example — solving y′ = ky by separation

Treat dy/dx as a ratio of differentials (a heuristic that can be made rigorous):

dy/dx = k·y   ⇒   dy/y = k·dx

Integrate both sides:

∫ dy/y = ∫ k·dx   ⇒   ln|y| = k·x + C

Exponentiate:

|y| = ek·x + C = eC·ek·x

Absorb the sign and the eC into a single constant A (allowed because the equation is linear in y):

y(x) = A·ek·x.

Apply y(0) = 7: A = 7. Final answer y(x) = 7·ek·x.

This same derivation models radioactive decay (k < 0), unconstrained population growth (k > 0), continuously compounded interest, RC circuit charging, and Newton's law of cooling — different physical labels on the same equation.

ODE vs PDE vs SDE vs DDE

ODEPDESDEDDE
Independent variablesOne (e.g. time t)Multiple (e.g. x, y, z, t)One, plus stochastic processOne, plus delay τ
Derivative typeOrdinary d/dtPartial ∂/∂x, ∂/∂t, …Itô / Stratonovich differentialOrdinary, but uses y(t − τ)
Canonical exampley' = k·y, F = m·aHeat eq u_t = α·u_xxdS = μS·dt + σS·dWy'(t) = a·y(t − τ)
Standard solution methodsSeparation, integrating factor, undetermined coefficients, Laplace transformSeparation of variables, Fourier series, Green's functions, finite elementItô calculus, Feynman–Kac, Monte CarloMethod of steps, characteristic equations
Closed-form solutionsCommon for linear; rare for nonlinearRare except for linear constant-coefficient on simple domainsRare; geometric Brownian motion is the famous caseRare; usually solved numerically
Existence/uniquenessPicard–Lindelöf (Lipschitz f)Lax–Milgram (linear elliptic), Hadamard well-posednessExistence under Lipschitz μ, σStep-method existence under regularity
Where it shows upMechanics, kinetics, controlHeat, wave, electromagnetism, fluidsFinance, population genetics, noisy physicsBiology with maturation lag, control with sensor delay

A quick ODE classification

Within ODEs, the main solvable families form a small zoo:

  • Separable. y' = f(x)·g(y). Rearrange dy/g(y) = f(x)·dx and integrate.
  • Linear first-order. y' + p(x)·y = q(x). Multiply by the integrating factor μ(x) = exp(∫p), then the left side becomes (μ·y)' and you integrate.
  • Exact. M(x, y)·dx + N(x, y)·dy = 0 with ∂M/∂y = ∂N/∂x. Solve by finding F such that ∂F/∂x = M, ∂F/∂y = N.
  • Linear constant-coefficient (any order). an·y(n) + … + a0·y = f(x). Substitute y = er·x into the homogeneous part to get the characteristic polynomial; combine with a particular solution (undetermined coefficients or variation of parameters) for the inhomogeneous part.
  • Bernoulli, Riccati, Euler equations. Special families with their own substitutions.

Beyond this zoo, most ODEs and almost all PDEs are studied qualitatively (phase portraits, stability, bifurcation), or numerically (Runge–Kutta, finite element).

Three canonical PDEs

Linear second-order PDEs split into three families by analogy with conic sections:

  • Elliptic — Laplace's equation: ∇²u = 0. Models steady-state heat, electrostatics, ideal fluid flow. Solutions are smooth and depend on boundary values everywhere at once.
  • Parabolic — heat equation: ∂u/∂t = α·∇²u. Diffuses sharp initial profiles into smooth ones; information propagates at infinite speed.
  • Hyperbolic — wave equation: ∂²u/∂t² = c²·∇²u. Propagates information at finite speed c with no smoothing — initial discontinuities travel along characteristics.

These three are the testbeds for almost every PDE technique you will learn: separation of variables, Fourier series, fundamental solutions, energy methods, finite differences, finite elements.

Classical applications

  • Newtonian mechanics. F = m·a is a second-order ODE; F = −k·x gives the harmonic oscillator y″ + ω²y = 0.
  • Population dynamics. Logistic equation y' = r·y·(1 − y/K), Lotka–Volterra predator–prey, SIR epidemic models — all ODE systems.
  • Maxwell's equations. Four PDEs whose combination yields the wave equation for electromagnetic radiation, predicting light's existence before it was measured.
  • Black–Scholes. A PDE for option prices derived from a geometric-Brownian-motion SDE for the stock; foundation of modern quantitative finance.
  • Navier–Stokes. Nonlinear PDEs governing fluid flow; smoothness in 3D is a Clay Millennium Prize Problem ($1M for proof or counterexample).
  • Schrödinger equation. A PDE whose solutions are quantum wavefunctions; entire chemistry is in principle a corollary.

Common mistakes

  • Forgetting the constant of integration. A first-order ODE has a one-parameter family of solutions; dropping C gives one specific curve, not the family.
  • Mistaking dy/dx for a quotient when it is not safe. Separation of variables works for separable equations; for non-separable ones, treating dy/dx as a ratio leads to wrong answers.
  • Applying ODE intuition to PDEs. PDEs almost never separate. Solutions live in function spaces of two or more variables; "constants of integration" become arbitrary functions.
  • Confusing initial-value and boundary-value problems. y″ + y = 0 with y(0) = 1 and y'(0) = 0 has a unique solution (cos x). The same equation with y(0) = 0 and y(π) = 0 has infinitely many (any A·sin x). Boundary problems can fail uniqueness or existence dramatically.
  • Treating SDEs with ordinary calculus. Itô's lemma adds an extra ½·σ²·∂²/∂x² term that classical calculus does not. Geometric Brownian motion has mean E[S(t)] = S(0)·eμt, but the typical path grows like e(μ − σ²/2)t.
  • Ignoring stability when integrating numerically. Explicit Euler diverges on stiff equations no matter how clever your initial condition. Implicit methods or adaptive step sizes are usually necessary.

Frequently asked questions

What is the order of a differential equation?

The order is the highest derivative that appears. y' = ky is first order; y'' + ω²y = 0 is second order; ∂²u/∂t² = c²·∂²u/∂x² (the wave equation) is second order in both variables. Order roughly determines how many initial conditions are needed: an n-th order ODE generally needs n conditions to pin down a unique solution.

What is the difference between linear and nonlinear?

Linear means the unknown function and its derivatives appear only to the first power, never multiplied together or inside nonlinear functions. y' + p(x)y = q(x) is linear. y' = y² or y' = sin(y) is nonlinear. Linear ODEs admit superposition (sum of two solutions is a solution), have well-developed solution machinery, and almost always have explicit solutions. Most nonlinear ODEs do not.

What does "separable" mean?

An ODE y' = f(x)·g(y) is separable — you can rearrange to dy/g(y) = f(x)·dx and integrate both sides independently. This is the simplest solvable family. Example: dy/dx = ky rearranges to dy/y = k·dx, integrates to ln|y| = kx + C, exponentiates to y = A·ekx.

Why is the heat equation parabolic and the wave equation hyperbolic?

The classification comes from the second-order coefficients, by analogy with conic sections Ax² + Bxy + Cy². The heat equation u_t = α·u_xx has discriminant 0 — parabolic; solutions smooth out instantly and propagate information at infinite speed. The wave equation u_tt = c²·u_xx has discriminant > 0 — hyperbolic; solutions propagate at finite speed c without smoothing. Laplace's equation u_xx + u_yy = 0 is elliptic — equilibrium states with no time direction.

What is an SDE?

A stochastic differential equation. The most common form is dX = μ(X, t)·dt + σ(X, t)·dW, where dW is the increment of a Wiener process (Brownian motion). Geometric Brownian motion dS = μS·dt + σS·dW is the basis of the Black–Scholes option pricing model. SDEs are solved using Itô calculus, which differs from ordinary calculus because (dW)² behaves like dt rather than 0.

When is a numerical method needed instead of an analytic solution?

Almost always in practice. Most nonlinear ODEs and almost all PDEs of interest cannot be solved in closed form. Numerical methods — Runge–Kutta for ODEs, finite differences and finite elements for PDEs, Monte Carlo for SDEs — discretise the equation and step a computer through it. The trade-off is between local accuracy (smaller steps) and computational cost.