Differential Equations for Engineers
First- and second-order ODEs, the systems that obey them and how to solve them.
What a differential equation is
A differential equation relates a quantity to its own rate of change. Whenever a rate depends on the current state (a hot part cooling, a capacitor charging, a tank filling, a mass on a spring) the model is a differential equation. Two types cover most of engineering: first-order (one energy store: a time constant) and second-order (two stores that exchange energy: oscillation and damping).
First-order systems
τ dy/dt + y = y∞ y(t) = y∞ + (y₀ − y∞) e−t/τ
Worked example: a cooling part
Worked example: a part cooling in a 20 °C room
- A part at 90 °C cools with τ = 300 s (5 minutes). T(t) = 20 + 70 e−t/300.
- After 5 minutes: T = 45.8 °C; after 10 minutes 29.5 °C; after 25 minutes (5τ) 20.47 °C.
- Time to reach 30 °C: t = −τ ln((30 − 20) ÷ 70) = 584 s (9.7 min). The half-way time is τ ln 2 = 208 s. The heat-transfer coefficient behind τ is covered in Heat Transfer.
Second-order systems
m x″ + c x′ + k x = F(t) ωn = √(k ÷ m) ζ = c ÷ (2 √(k m)) ωd = ωn √(1 − ζ²)
Worked example: mass, spring and damper
Worked example: m = 2 kg, k = 800 N/m, c = 20 N·s/m
- Natural frequency ωn = √(800 ÷ 2) = 20.0 rad/s (3.18 Hz). Critical damping cc = 2√(k m) = 80 N·s/m, so ζ = 20 ÷ 80 = 0.25.
- Damped frequency ωd = 19.36 rad/s. Step overshoot 44.4 percent; 2 percent settling time ≈ 0.80 s.
- Doubling the damper to c = 40 gives ζ = 0.5, overshoot 16.3 percent and a faster settle (0.40 s). The vibration side of this system is in Vibration, Isolation and Noise.
Solving numerically
Most real equations cannot be solved by hand, so we step them forward in time. Euler: yn+1 = yn + h f(yn), simple but inaccurate. Heun (improved Euler) averages two slopes; Runge–Kutta 4 uses four and is the usual workhorse. The error shrinks with the step h, and an unstable step size can make the numerical answer blow up.
| Method (h = 0.5, y′ = −y, y(0) = 1) | y at t = 2 | Error |
|---|---|---|
| Exact e⁻² | 0.13534 | — |
| Euler | 0.06250 | -53.8 percent |
| Heun | 0.15259 | 12.7 percent |
| Runge–Kutta 4 | 0.13555 | 0.16 percent |
Code for these methods is in Programming Languages.
The Laplace transform in one paragraph
The Laplace transform turns calculus into algebra: d/dt becomes multiplication by s, so a linear differential equation becomes a polynomial in s and the system is described by a transfer function G(s) = output ÷ input. The roots of the denominator (the poles) tell you the behavior: real negative poles are decaying exponentials, complex poles are oscillations, and any pole with a positive real part is unstable. The control guide builds on this: Control Systems.
Related
- Previous: Engineering Mathematics Essentials. Next: Statistics and Probability for Engineers.
- Control Systems for transfer functions and stability.
- Engineering Fundamentals: the whole guide.
FAQ
Why does 5τ mean “settled”?
Because e⁻⁵ = 0.0067: the response is within 0.7 percent of its final value.
What does the damping ratio tell me?
How oscillatory the system is. Around 0.7 gives about 5 percent overshoot and quick settling, a common design target.
Which numerical method should I use?
RK4 with a step small enough to see the fastest dynamics (a fraction of the shortest time constant) is a good default.
References
- Kreyszig, E., Advanced Engineering Mathematics, Wiley.
- Ogata, K., System Dynamics, Pearson.
- Rao, S. S., Mechanical Vibrations, Pearson.
Last reviewed: October 2026. Examples are linear models; real systems have friction, saturation and other nonlinearities.
