1. Home
  2. Explore
  3. Mathematics
  4. Differential Equations Overview

Study methods

Flashcards
Quiz
Fill in the blanks
Written test
Lesson
Notes
Podcast
Content

Differential Equations Overview

Differential Equations: A Guided Tour

Introduction: The Language of Change

Since Newton, mankind has come to realize that the laws of physics are always expressed in the language of differential equations.

Differential equations arise whenever it is easier to describe change than absolute amounts. For example, it is easier to state why a population grows or shrinks than to explain its exact size at a given moment. Similarly, describing why affection for someone is changing is often simpler than quantifying the current level of love. In Newtonian mechanics, motion is described in terms of force, and force determines acceleration — a statement about how velocity changes.

These equations come in two fundamental flavors:

  • Ordinary Differential Equations (ODEs): Involve functions with a single independent variable, often time. They describe the evolution of a finite collection of values.

  • Partial Differential Equations (PDEs): Involve functions with multiple independent variables. They govern continuous fields — temperature at every point of a solid, velocity of a fluid at every location in space — and will be explored more in later study.

Solving a Simple ODE: Projectile Motion

A warm-up example: an object thrown vertically near Earth’s surface experiences constant downward acceleration due to gravity, g≈9.8 m/s2g \approx 9.8 \text{ m/s}^2g≈9.8 m/s2.

Let y(t)y(t)y(t) be the vertical position. Its first derivative y˙\dot{y}y˙​ gives vertical velocity, and the second derivative y¨\ddot{y}y¨​ gives vertical acceleration. The differential equation is:

y¨=−g\ddot{y} = -gy¨​=−g

This is solved by integrating — working backward from the rate of change.

  1. Velocity: Find a function whose derivative is −g-g−g:
    y˙(t)=−gt+v0\dot{y}(t) = -g t + v_0y˙​(t)=−gt+v0​
    where v0v_0v0​ is the initial velocity (constant of integration).

  2. Position: Find a function whose derivative is y˙(t)\dot{y}(t)y˙​(t):
    y(t)=−12gt2+v0t+y0y(t) = -\frac{1}{2} g t^2 + v_0 t + y_0y(t)=−21​gt2+v0​t+y0​
    where y0y_0y0​ is the initial position.

This demonstrates the essential pattern: given information about rates of change, integration yields the original function, with constants determined by initial conditions.

Second-Order ODEs: The Two-Body Problem

When forces depend on position (not just constant), the equations become more intertwined. For two celestial bodies (stars, planets, moons), gravitational force on one body points toward the other, with strength inversely proportional to the square of the distance.

The rate of change of position is velocity; the rate of change of velocity (acceleration) is a function of position. This creates a feedback loop between the two variables — a dance reminiscent of the bodies’ motion. Such equations involve finding a function where its derivative (and possibly higher derivatives) are defined in terms of the function itself.

In physics, second-order differential equations (highest derivative is second order) are most common. Higher-order equations involve third, fourth, or more derivatives.

Meditating on such an equation reveals a kind of infinite continuous jigsaw puzzle: one must find infinitely many numbers (one for each time ttt) constrained by how values intertwine with their own rate of change and higher rates.

The Pendulum: A Deceptively Simple Example

Setting Up the Equation

Consider a pendulum of length LLL with a mass at its end. Let θ(t)\theta(t)θ(t) be the angle from the vertical. The position along the arc is x=Lθx = L\thetax=Lθ (with θ\thetaθ in radians). Gravity pulls downward with acceleration ggg, but the pendulum constrains motion. The component of gravitational acceleration along the direction of motion is −gsin⁡θ-g \sin \theta−gsinθ (the minus sign indicates acceleration opposite to displacement). Check:

  • When θ=0\theta = 0θ=0, sin⁡0=0\sin 0 = 0sin0=0, so no tangential acceleration.

  • When θ=90∘\theta = 90^\circθ=90∘ (π/2\pi/2π/2 rad), sin⁡θ=1\sin \theta = 1sinθ=1, acceleration equals freefall.

The second derivative of xxx is acceleration: x¨=−gsin⁡θ\ddot{x} = -g \sin \thetax¨=−gsinθ. Since x=Lθx = L\thetax=Lθ, we have:

θ¨=−gLsin⁡θ\ddot{\theta} = -\frac{g}{L} \sin \thetaθ¨=−Lg​sinθ

The Small-Angle “Lie”

Introductory physics often treats this as simple harmonic motion: θ(t)\theta(t)θ(t) approximates a sine wave with period T=2πL/gT = 2\pi \sqrt{L/g}T=2πL/g​. However, this formula is an approximation valid only for small angles. For a real pendulum, pulling it out to larger angles yields a longer period, and the θ(t)\theta(t)θ(t) graph no longer resembles a sine wave. The presence of sin⁡θ\sin \thetasinθ in the equation prevents an exact sine wave solution — the sine here is an input, not the shape of the output.

Adding Damping

To model reality more closely, include air resistance proportional to velocity:

θ¨=−gLsin⁡θ−μθ˙\ddot{\theta} = -\frac{g}{L} \sin \theta - \mu \dot{\theta}θ¨=−Lg​sinθ−μθ˙

where μ\muμ is a constant capturing air resistance and friction. This is a juicy differential equation — not easy to solve exactly, but rich in insight.

Analytic Solution Challenges

If damping is removed (μ=0\mu = 0μ=0), an exact analytic solution exists but is hilariously complicated, involving special functions (Jacobi elliptic functions) and integrals that most people have never heard of. With damping included, no known exact analytic solution exists. This illustrates a harsh reality: differential equations are really freaking hard to solve.

Instead of seeking exact solutions, the study of differential equations often short-circuits the solution process and goes straight to building understanding and making computations from the equation itself.

Phase Space and Vector Fields

Converting to a First-Order System

Instead of a single second-order equation, we can break it into a system of two first-order equations by defining a state vector s=(θ,θ˙)\mathbf{s} = (\theta, \dot{\theta})s=(θ,θ˙). Its derivative is:

s˙=(θ˙,θ¨)=(θ˙,−gLsin⁡θ−μθ˙)\dot{\mathbf{s}} = (\dot{\theta}, \ddot{\theta}) = \left(\dot{\theta}, -\frac{g}{L}\sin\theta - \mu\dot{\theta}\right)s˙=(θ˙,θ¨)=(θ˙,−Lg​sinθ−μθ˙)

The first component is just θ˙\dot{\theta}θ˙ (a coordinate itself), and the second is expressed entirely in terms of θ\thetaθ and θ˙\dot{\theta}θ˙. This trick — converting higher-order equations to first-order vector equations — is common.

Visualizing Dynamics

The state space (or phase space) is a two-dimensional plane with θ\thetaθ on the horizontal axis and θ˙\dot{\theta}θ˙ on the vertical axis. Each point fully describes the pendulum at an instant. The differential equation defines a vector field: at every point (θ,θ˙)(\theta, \dot{\theta})(θ,θ˙), we draw a vector s˙\dot{\mathbf{s}}s˙ indicating the direction and speed the state will move.

  • Higher points (larger θ˙\dot{\theta}θ˙) tend to move right; lower points move left.

  • The vertical component is θ¨\ddot{\theta}θ¨, which points downward when θ>0\theta>0θ>0 (restoring force).

Drawings scale vectors to avoid clutter, using color to indicate magnitude. This vector field gives a geometric picture: solving the equation means tracing trajectories that follow the field at every moment, like a particle carried by a fluid.

Phase Flow and Fixed Points

The collection of all possible trajectories is called phase flow. Special points where the vector field is zero are fixed points (equilibria):

  • The origin (θ=0,θ˙=0)(\theta=0, \dot{\theta}=0)(θ=0,θ˙=0) corresponds to the pendulum hanging straight down.

  • Another fixed point is (θ=π,θ˙=0)(\theta=\pi, \dot{\theta}=0)(θ=π,θ˙=0) representing the pendulum balanced upright.

A natural question is stability: will a small nudge send the state back toward the fixed point (stable) or away (unstable)? Physical intuition says hanging down is stable, upright is unstable. Future work will cover computing stability by linearizing the system near fixed points and examining whether the flow contracts or expands.

Beyond Two Dimensions

Any system of ODEs can be described by a vector field in its phase space, but dimensions can be huge. Example: the three-body problem (three masses in 3D space interacting via gravity). Each mass has three position coordinates and three momentum coordinates, giving 18 degrees of freedom — an 18-dimensional phase space. Though unvisualizable, the concept remains: a single point meanders through this abstract space, following the vector field at each instant, encoding all physical positions and momenta.

"Phase space [is] one of the most powerful inventions of modern science." — James Gleick, Chaos

Beyond Physics: The Romance Equation

Differential equations model far more than physics. Consider a romantic relationship:

  • Your affection changes at a rate proportional to their affection: y˙=ax\dot{y} = a xy˙​=ax.

  • Their affection changes oppositely — they are attracted when you seem uninterested, but turned off when too keen: x˙=−by\dot{x} = -b yx˙=−by.

This system produces a phase portrait very similar to the center of the pendulum diagram — endless cycles of mutual affection and repulsion. Adding a friction-like term (e.g., they slow down when too in love) yields a spiral toward mutual ambivalence.

The point: two very different systems (pendulum vs. romance) share a similar phase space structure, even if the equations differ (no sine in romance). Studying one case yields transferable tools.

Numerical Methods: Simulating Solutions

When analytic solutions are unavailable, numerical methods approximate the evolution by simulating discrete time steps.

Euler’s Method

The simplest approach: from a state (θ,θ˙)(\theta, \dot{\theta})(θ,θ˙), take a step of size Δt\Delta tΔt in the direction of the vector field:

  • θnew=θ+θ˙⋅Δt\theta_{\text{new}} = \theta + \dot{\theta} \cdot \Delta tθnew​=θ+θ˙⋅Δt

  • θ˙new=θ˙+θ¨⋅Δt\dot{\theta}_{\text{new}} = \dot{\theta} + \ddot{\theta} \cdot \Delta tθ˙new​=θ˙+θ¨⋅Δt
    where θ¨=−gLsin⁡θ−μθ˙\ddot{\theta} = -\frac{g}{L}\sin\theta - \mu\dot{\theta}θ¨=−Lg​sinθ−μθ˙

Repeating this many times approximates the continuous trajectory. With Δt\Delta tΔt too large, accuracy suffers; with Δt=0.01\Delta t = 0.01Δt=0.01, results become good but require many steps (1000 steps for t=10t=10t=10).

Python Implementation

def pendulum_theta(L=1.0, g=9.8, mu=0.1, theta0=pi/3, theta_dot0=0, T=10, dt=0.01):
    theta = theta0
    theta_dot = theta_dot0
    t = 0.0
    while t < T:
        theta_double_dot = -g/L * sin(theta) - mu * theta_dot
        theta += theta_dot * dt
        theta_dot += theta_double_dot * dt
        t += dt
    return theta

This loop encodes the differential equation. More sophisticated numerical methods exist (Runge-Kutta, adaptive step sizes), but the core idea remains: simulate the future step-by-step using the local rate of change.

The Limits of Predictability: Chaos

Even with powerful numerical methods and exact solutions where available, chaos theory revealed fundamental limits. For some systems, tiny variations in initial conditions (due to unavoidable measurement error) lead to wildly different trajectories. Chaos is not just randomness; it’s deterministic unpredictability.

The three-body problem contains seeds of chaos. So it seems cruel that the universe’s language is full of riddles we either cannot solve or whose solutions are useless for long-term prediction. Yet this is also reassuring: the complexity we observe in nature can be studied within mathematics — it is not hidden in the mismatch between model and reality.

This interplay between solvability and chaos continues to drive modern research in differential equations, offering tools to describe everything from pendulums to planetary orbits to the ebb and flow of human relationships.

Ask anything

We've read this whole study set, so questions about it get the best answers.

FlashcardsQuizFill in the blanksWritten testLessonNotesPodcastContent