Math for ME · Chapter 12 of 19 · Intermediate
Ordinary Differential Equations
Cooling parts, charging circuits, bouncing suspensions: when a rate depends on the state, you have an ODE. This is how engineers model anything that changes.
The thread: You can describe a rate of change. But in a real machine the rate depends on the state itself, mass pulling against spring, and that feedback loop is exactly what a differential equation captures.
Readiness check
From Derivatives, Integrals, and Eigenvalues and Modes. Tick only what you can do closed-notes.
- Differentiate and integrate exponentials and sinusoids fluently.
- Use the chain rule both directions (derivative and substitution).
- Solve a quadratic with complex roots without flinching.
- Sketch e−t and e−tsin(t) shapes from memory.
- Explain ω = √(k/m) from Eigenvalues and Modes.
The core idea
An ODE states a law about rates. Solving it predicts the future from now.
dT/dt = −k(T − T∞)mẍ + cẋ + kx = F(t)First-order systems (left) decay exponentially with a time constant. Second-order systems (right) can oscillate, and damping decides whether they ring or settle. An initial condition picks the one solution that matches reality at t = 0.
The skills, taught in order
12.1 What an ODE is, and what fixes the answer
A differential equation relates an unknown function to its own rates of change; its solution is a function, a predicted history, not a single number. A first-order equation needs one initial condition to pin down its arbitrary constant; a second-order equation needs two, typically position and velocity at t = 0.
12.2 First-order: separate, integrate, and the time constant
If the variables can be sorted to opposite sides, the equation is separable: gather the unknown on one side and integrate both. The linear decay law dX/dt = −X/τ is the workhorse case, with solution:
X(t) = X₀ e−t/τIts time constant τ sets the whole schedule: 63% of the change is done after one τ and 95% after three. Cooling parts, RC circuits, and draining tanks all share this curve.
12.3 Linear first-order with forcing: the integrating factor
When a first-order equation has a driving term, dy/dt + p(t)y = q(t), multiply through by the integrating factor μ = e∫p dt. That turns the left side into the derivative of a single product, (μy)′, which integrates directly. It is the standard recipe for any driven first-order system.
12.4 Second-order: the characteristic equation
The central equation of mechanical engineering is the mass-damper-spring:
mẍ + cẋ + kx = F(t)For free motion (F = 0), trying x = ert turns it into the characteristic equation mr² + cr + k = 0. The roots decide everything: real and distinct means overdamped, a repeated root means critically damped, and complex means underdamped, an oscillation inside a decaying envelope.
12.5 Damping, natural frequency, and forced response
Two numbers summarise a second-order system: the natural frequency ωₙ = √(k/m) and the damping ratio ζ = c/(2√(km)).
| ζ | Behaviour |
|---|---|
| ζ < 1 | underdamped: rings while decaying |
| ζ = 1 | critically damped: fastest return, no overshoot |
| ζ > 1 | overdamped: slow creep to rest |
A full response adds the transient (homogeneous) part, which dies out, to the steady particular part driven by F(t).
Engineering connection: Dynamics, Vibrations, Controls, Heat Transfer.
Worked example: how fast does the part cool?
A machined part leaves the oven at 95 °C into a 25 °C shop. Newton's law of cooling gives dT/dt = −k(T − 25) with k = 0.05 min⁻¹. Find T(t) and the temperature after 20 minutes.
- ProblemSolve the cooling law in Figure 1 and evaluate T(20 min).
- Given / finddT/dt = −0.05(T − 25), T(0) = 95 °C. Find T(t) and T(20).
- AssumptionsUniform part temperature (lumped), constant ambient and k.
- ModelSeparable first-order ODE in the excess temperature θ = T − 25: dθ/dt = −kθ.
- Equations∫dθ/θ = −k∫dt θ = θ₀e−kt
- Solveθ₀ = 70 °C, so T(t) = 25 + 70e−0.05t. At t = 20: T = 25 + 70e−1 = 25 + 25.75 = 50.8 °C.
- CheckSubstitute back: dT/dt = −3.5e−0.05t; and −k(T − 25) = −0.05·70e−0.05t = −3.5e−0.05t. Identical. Limits: T(0) = 95, T(∞) = 25, both physical.
- ConclusionThe time constant 1/k = 20 min sets the schedule: 63% of the cooling done at 20 min, 95% at 60 min. Every first-order system (RC circuit, tank draining, sensor lag) obeys this same curve with different labels.
Worked example 2: a suspension rings down
A 2 kg mass on a 50 N/m spring with damping c = 4 N·s/m is pulled to x₀ = 0.10 m and released from rest. Find the natural frequency, the damping ratio, and the motion x(t).
- Given / findm = 2 kg, k = 50 N/m, c = 4 N·s/m, x(0) = 0.10 m, ẋ(0) = 0. Find ωₙ, ζ, and x(t).
- Natural frequency and damping ratioωₙ = √(k/m) = √25 = 5 rad/s. Critical damping is 2√(km) = 2√100 = 20 N·s/m, so ζ = 4/20 = 0.2 (underdamped).
- Characteristic equation2r² + 4r + 50 = 0, or r² + 2r + 25 = 0. Roots: r = −1 ± √(1 − 25) = −1 ± 4.90i.
- Solution formComplex roots give x(t) = e−t(A cos 4.90t + B sin 4.90t), with damped frequency ω_d = 4.90 rad/s.
- Apply the initial conditionsx(0) = A = 0.10 m. From ẋ(0) = 0, B = A/ω_d = 0.10/4.90 = 0.0204.
- Resultx(t) = e−t(0.10 cos 4.90t + 0.0204 sin 4.90t) m.
- CheckAt t = 0 the formula gives x = 0.10 m and ẋ = 0, as required. The envelope e−t decays with a 1 s time constant while the mass oscillates near 4.9 rad/s, just below the undamped 5 rad/s, exactly as light damping predicts.
- ConclusionMass, damper, spring, then characteristic roots: this is the whole method behind suspension tuning, building sway, and instrument isolation. A damping ratio of 0.2 means a bouncy response that takes several cycles to settle.
Misconceptions and diagnostics
| Mistake | Symptom | Diagnostic question | Correction |
|---|---|---|---|
| Treating an ODE like an algebra equation | "Solving for T" without integrating | "Is the unknown a number or a function of time?" | The solution is a curve T(t), found by integration, pinned by the initial condition. |
| Forgetting the initial condition | Answers with a floating constant C | "What is the state at t = 0?" | Apply the initial condition to fix C. No IC, no prediction. |
| Expecting oscillation from first-order systems | Ringing sketched for a thermal lag | "How many energy stores does this system have?" | Oscillation needs two stores trading energy (mass and spring). One store can only decay. |
| Mixing natural and forced response | Steady-state missing or doubled | "Which part of my solution dies out, and which persists?" | Total = homogeneous (transient) + particular (steady). Solve them separately, add, then apply ICs. |
Practice ladder
Solve dy/dt = −2y with y(0) = 8, and find y at t = 1.
Show answer
y = 8e−2t; y(1) = 8e−2 = 1.083. Time constant 0.5 s.
Then find the steady-state value of the driven law dy/dt + 0.5y = 10 for large t.
Show answer
At steady state dy/dt = 0, so 0.5y = 10 and y = 20. The transient e−0.5t decays away, leaving the driven value 20.
A tank drains so that dh/dt = −0.1√h (h in m, t in min), h(0) = 4 m. Separate and solve for h(t), and find when the tank empties.
Show answer
∫h−1/2dh = −0.1∫dt gives 2√h = 4 − 0.1t, so h = (2 − 0.05t)². Empty when 2 − 0.05t = 0: t = 40 min. Nonlinear but separable: the tank empties in finite time, unlike exponential decay.
For mẍ + cẋ + kx = 0 with m = 1, c = 6, k = 9, find the characteristic roots and classify the damping.
Show answer
r² + 6r + 9 = (r + 3)² = 0, a repeated root r = −3. Critically damped: it returns to rest as fast as possible without overshoot.
A 2 kg mass on a 200 N/m spring with damping c = 8 N·s/m is released from rest at x = 0.05 m. Classify the damping and describe the motion (ωₙ, damping ratio).
Show answer
ωₙ = √(k/m) = 10 rad/s. Critical damping c_c = 2√(km) = 2√400 = 40. ζ = 8/40 = 0.2: underdamped. The mass rings at ω_d = 10√(1 − 0.04) = 9.8 rad/s inside a decaying envelope e−2t. It crosses zero many times before settling.
Measure a real first-order response: hot water cooling in a mug with a kitchen thermometer, readings every 2 minutes. Fit T∞ and the time constant, and compare your fitted k to the worked example's.
What good work looks like
A data table, a plot of ln(T − T∞) versus t showing a straight line, the slope reported as −k with units, and a sentence on why a mug's k differs from a steel part's.
Working with AI, and proving it yourself
Use AI as an examiner, not a solver
Portfolio task
Produce a one-page "Three Disguises" study: show that a cooling part, an RC circuit, and a draining tank all reduce to dX/dt = −X/τ. Give each system's τ in real units and one plotted curve with all three labeled.
Retrieval and spaced review
Closed notes. Answer out loud, then reveal.
1. What makes an equation a differential equation, and what is its solution?
It relates a function to its own rates of change. The solution is a function (a predicted history), not a number.
2. What is a time constant, and what happens after one of them?
τ = 1/k for first-order decay; after one τ, 63% of the gap to steady state is closed; after 3τ, 95%.
3. Write the standard second-order mechanical ODE and name its three terms.
mẍ + cẋ + kx = F(t): inertia, damping, stiffness, driven by the force.
4. Define underdamped, critically damped, overdamped.
ζ < 1: rings while decaying. ζ = 1: fastest settling without overshoot. ζ > 1: slow creep to rest. ζ = c/(2√(km)).
5. How do you verify any ODE solution?
Differentiate it and substitute into the original equation; both sides must match identically, and the initial condition must hold.
Textbook mapping
| Item | Mapping |
|---|---|
| Main source | Kreyszig, Advanced Engineering Mathematics, Ch 1 to 3 (first and higher-order ODEs) |
| Core topics | 12.1 Meaning · 12.2 Initial-value problems · 12.3 First order · 12.4 Separable · 12.5 Linear first order · 12.6 Second order · 12.7 Homogeneous and forced · 12.8 Damping and oscillation · 12.9 Mechanical, thermal, fluid examples |
| Engineering connection | Dynamics, Vibrations (the mẍ + cẋ + kx equation is the course), Controls, Heat Transfer transients. |
| Skip on first pass | Exact equations, series solutions, special functions. They are reference material, not foundations. |
| Read next | Systems of ODEs and State-Space Thinking. |