← Back to Math Roadmap

ODEs

Ordinary Differential Equations: relationships between functions and their derivatives — modeling change over time.

What Are ODEs?

▼
An Ordinary Differential Equation relates a function to its derivatives. It describes HOW systems evolve over time. The order is the highest derivative: dy/dx is first-order; d²y/dx² is second-order. ODEs model: population growth (exponential decay/growth), spring-mass-damper (harmonic oscillation), RLC circuits (second-order electrical dynamics), predator-prey (Lotka-Volterra), and epidemic spread (SIR model). When closed-form solutions do not exist, numerical methods provide approximate solutions.

What Are Ordinary Differential Equations?

▼
An Ordinary Differential Equation (ODE) is an equation involving an unknown function of a single variable and its derivatives. ODEs are the language of dynamics — they describe how things change over time. The order of an ODE is the highest derivative that appears. First-order ODEs involve only first derivatives. Second-order ODEs involve second derivatives (like acceleration in Newton's second law). ODEs model countless phenomena: population growth, radioactive decay, spring oscillations, electrical circuits, chemical reactions, and the spread of diseases.
First-order linear ODE and its solution via an integrating factor mu. The integrating factor makes the left side an exact derivative.

Second-Order Linear ODEs

▼
Second-order linear ODEs with constant coefficients are the workhorses of physics and engineering. Their behavior is determined entirely by the characteristic equation: a times r squared plus b times r plus c equals zero. If the roots r are real and distinct, the solution is a sum of two exponentials. If the roots are complex conjugates (alpha plus or minus i times beta), the solution involves oscillations — an exponential envelope times a sine-cosine combination. If there is a repeated root, the solution gains a factor of x. This pattern appears in the mass-spring-damper system, RLC circuits, and vibrating beams.
Characteristic equation for a second-order linear ODE with constant coefficients. The roots r determine the form of the solution.

Physical Applications

▼
The RLC circuit in electrical engineering is a perfect second-order ODE example. The inductor L stores energy in a magnetic field, the capacitor C stores energy in an electric field, and the resistor R dissipates energy as heat. The system can be overdamped (returns slowly to equilibrium without oscillating), critically damped (returns to equilibrium in the fastest possible time without oscillating), or underdamped (oscillates while decaying). The damping ratio determines which regime applies. The same mathematics governs a car's shock absorbers, a building's response to earthquakes, and the ringing of a bell.

Solution Methods for ODEs

▼
  • Separation of variables: rearrange so all x terms are on one side and all y terms on the other, then integrate both sides.
  • Integrating factor: for linear first-order ODEs. Multiply by an exponential to make the left side exact.
  • Characteristic equation: for linear ODEs with constant coefficients. Solve a polynomial equation for the exponential rates.
  • Undetermined coefficients: guess the form of the particular solution based on the forcing function.
  • Variation of parameters: a general method for finding particular solutions when the forcing function is complicated.
  • Laplace transforms: convert the ODE into an algebraic equation in the s-domain, solve algebraically, then transform back.

Worked Examples

▼
Worked Examples
Example 1: Solve y' = y (exponential growth).
Separate: dy/y = dx. Integrate: ln|y| = x + C. So y = Ceˣ.

Example 2: Solve y'' − 5y' + 6y = 0.
Characteristic equation: r² − 5r + 6 = 0. Roots: r = 2, 3. Solution: y = c₁e²ˣ + c₂e³ˣ.

Example 3: The RLC circuit equation: Lq'' + Rq' + q/C = V(t). For R=2, L=1, C=0.2: r²+2r+5=0. Roots: r = −1±2i. Underdamped oscillation with frequency 2.

ODE Solution Plotter

▼
Watch how different parameters change the behavior of the solution. Underdamped systems oscillate; overdamped systems smoothly decay.