TactivergeLite

Lite / Independent Engineering Research / Week 6

Linear ODEs you can solve by hand

Tap a wine glass, pluck a guitar string, release a car's suspension: one second-order equation describes them all. What does it predict?

About 50 min · 3 goals · Checked by automated tests · Full interactive version

Why should I care?

Linear ODEs with constant coefficients are the workhorses of engineering dynamics. Knowing their exact solutions gives you benchmarks to test every numerical integrator you will write.

Predict

A 1 kg mass on a 4 N/m spring with damping c = 0.8 N·s/m is released. What does it do?

  1. Creeps back without overshooting
  2. Oscillates with slowly shrinking amplitude
  3. Oscillates for ever at constant amplitude
Guess first, then reveal

ζ = 0.8/(2·√4) = 0.2 < 1: underdamped. It oscillates at about ω_d = 2√(1 − 0.04) ≈ 1.96 rad/s while the envelope decays like e^{−0.4t}.

Discover

In 'Mass–spring–damper' mode, set k = 4 and sweep c from 0 to 6. Watch the trajectories change from circles (c = 0) to spirals to straight-in curves. Note the value of c where the eigenvalues become real, and compare with 2√k.

What the interactive shows (text version)

The phase-portrait diagram plots velocity against position with direction arrows and six trajectories. Sliders set stiffness and damping; text gives the eigenvalues, the critical damping value and the type of equilibrium (centre, spiral or node).

You can also open the interactive on the full site when you have a faster connection.

Watch (optional)

Watch for: Watch the phase-space picture of the pendulum: position and velocity together form the state.

Introduces differential equations through a pendulum and shows why engineers so often solve them by stepping forward in time.

“Differential equations, a tourist's guide | DE1” by 3Blue1Brown (opens YouTube; streaming video uses a lot of data)

The video is optional. Everything you need is in this lesson's text.

Understand

First order

dx/dt = −kx has solution x(t) = x₀ e^{−kt}. The time constant τ = 1/k is the time to fall to about 37%. After 5τ it is under 1%. RC circuits, cooling and many sensor lags are first-order.

Second order

m x″ + c x′ + k x = 0 needs two initial conditions (position and velocity). Its behaviour is set by ω_n (how fast it wants to oscillate) and ζ (how strongly it is damped). Engineers often design for ζ around 0.6–0.7: quick, with little overshoot.

Benchmarks for numerics

With c = 0, m = k = 1 and x(0) = 1, x′(0) = 0, the exact solution is x = cos t and the energy ½x′² + ½x² stays at 0.5 for ever. That exact answer is what week 7 uses to measure integrator errors.

Explain it another way

Intuitive

Stiffness wants to bring the mass back; inertia makes it overshoot; damping drains energy. ζ is the referee: below 1 the mass swings past, above 1 it creeps home.

Technical

The roots r of the characteristic equation are exactly the eigenvalues of the state matrix A = [[0, 1], [−k/m, −c/m]] (next lesson).

Mathematical

Underdamped log decrement: ln(xₙ/xₙ₊₁) = 2πζ/√(1 − ζ²), a way to measure ζ from successive peaks.

Applied

Car suspensions are tuned to about ζ = 0.2–0.4 for comfort; precision instrument mounts and door closers aim near critical damping.

Derivation: Solving m x″ + c x′ + k x = 0
  1. Try x = e^{rt}. Then x′ = r e^{rt}, x″ = r² e^{rt}, and the equation becomes (m r² + c r + k) e^{rt} = 0.

  2. So r solves the characteristic equation m r² + c r + k = 0: r = (−c ± √(c² − 4mk)) / (2m).

  3. Write ω_n = √(k/m) and ζ = c/(2√(km)). Then r = −ζω_n ± ω_n√(ζ² − 1).

  4. ζ > 1 (overdamped): two negative real roots, x = A e^{r₁t} + B e^{r₂t}. ζ = 1 (critical): x = (A + Bt) e^{−ω_n t}.

  5. ζ < 1 (underdamped): r = −ζω_n ± iω_d with ω_d = ω_n√(1 − ζ²), so x = e^{−ζω_n t}(A cos ω_d t + B sin ω_d t).

  6. A and B come from the initial position and velocity. By linearity, any combination of solutions is a solution (week 1).

Worked example 1

m = 2 kg, k = 50 N/m, c = 4 N·s/m. Find ω_n, ζ and ω_d.

ω_n = √(50/2) = 5 rad/s. ζ = 4/(2√100) = 0.2. ω_d = 5√(1 − 0.04) ≈ 4.90 rad/s. Underdamped; the envelope decays like e^{−1·t}.

Common mix-ups

Practice

Practice, not a test. Answers are checked on our server; a wrong answer gets a hint and another try. Nothing is saved.

s

rad/s

Practice 5. For m = 1 kg and k = 9 N/m, what damping gives critical damping?

Apply it

In the Code Lab, plot the exact solutions for ζ = 0.1, 0.7, 1 and 2 with ω_n = 2 rad/s and x(0) = 1, x′(0) = 0. Mark the 2% settling time on each and say which you would choose for a camera gimbal.

Reflect

Where in daily life have you felt an underdamped system ring?

Write your answer on paper or in your own notes. Lite never stores what you write.

← Least squares and the normal equationsMass–spring systems in state space →