Differential equations

Laws written as rates of change, and how to solve them — exactly when possible, numerically always. Every simulation, from a game engine to a climate model, is a differential equation being integrated.

10 topics

Nature rarely tells us where things are; it tells us how they change: force determines acceleration, the number of infected determines new infections, the error determines the controller's correction. A differential equation states that law; solving it predicts the future from the present. Traditionally a separate course, it is included here in full because it is where calculus becomes simulation.

Topics

Ordinary differential equations

An equation relating an unknown function to its derivatives, y′=f(t,y)y' = f(t, y). Its solutions are trajectories: given where you start, the equation says where you go next — the mathematical model of anything that evolves in time.

University

Initial value problems: existence and uniqueness

Picard–Lindelöf: if ff is Lipschitz in yy, then y′=f(t,y)y' = f(t, y), y(t0)=y0y(t_0) = y_0 has exactly one solution near t0t_0. Determinism, mathematically: the present determines the future — and a simulation has a single right answer to approximate.

UniversityTheorem

Separable equations

y′=g(t) h(y)y' = g(t)\,h(y): put all the yy on one side and integrate, ∫dyh(y)=∫g(t) dt\int\frac{\dd y}{h(y)} = \int g(t)\,\dd t. Exponential growth and the logistic curve are solved this way.

UniversityMethod

First-order linear equations

y′+p(t) y=q(t)y' + p(t)\,y = q(t), solved with an integrating factor e∫pe^{\int p}. The response of every first-order system (thermometer, RC filter, simple capacitor charging) is an exponential approach to equilibrium.

UniversityMethod

Second-order linear equations (oscillations)

mx¨+cx˙+kx=F(t)m\ddot x + c\dot x + kx = F(t): springs, pendulums, circuits, suspensions. The roots of the characteristic equation mr2+cr+k=0m r^2 + c r + k = 0 decide whether the system oscillates (complex roots), returns smoothly (real roots) or resonates.

University

Systems of ODEs

Several coupled unknowns, 𝐱′=F(𝐱)\mathbf x' = F(\mathbf x). For linear systems 𝐱′=A𝐱\mathbf x' = A\mathbf x the solution is eAt𝐱0e^{At}\mathbf x_0 and the eigenvalues of AA decide growth, decay and oscillation.

University

Euler's method

The simplest numerical ODE solver: follow the tangent for a small time step, yk+1=yk+h f(tk,yk)y_{k+1} = y_k + h\,f(t_k, y_k). First order (error O(h)O(h)), easy to destabilize — and, in its semi-implicit form, the default integrator of game physics.

UniversityMethod

Runge–Kutta methods

Sample the slope at several points inside the step and combine them to cancel error terms. The classic RK4 has error O(h4)O(h^4): halve the step, divide the error by 16. Adaptive pairs (Dormand–Prince, ode45, solve_ivp) adjust hh automatically.

AdvancedMethod

Stiffness and implicit methods

Systems with very different time scales (a stiff spring on a slow body) force explicit methods to take tiny steps just to stay stable. Implicit methods, yk+1=yk+hf(yk+1)y_{k+1} = y_k + h f(y_{k+1}), are stable for any step at the price of solving an equation each step.

Advanced

Partial differential equations

Equations for fields that depend on space and time, involving partial derivatives: heat diffusion, waves, fluid flow, electromagnetism, quantum mechanics. Solved numerically by discretizing space (finite differences, finite volumes, finite elements, spectral methods).

Advanced

Where this area leads in computing

↑ ↓ to navigate · ↵ · Esc