Chapter 3

The Language of Change

How do we describe how fast something is changing?

Chapter 3: The Language of Change ↗

Slope is speed

Theo: We keep saying "sluggish", "wiggly", "settles". June's right: those are vibes, not maths. I want a precise way to say how fast the drone is changing.

June: Let's replay our drone from Chapter 2 (Kp = 20 N/m) and look closely.

The blue curve is the drone's height over time. Speed is how much the height changes per second. On the graph, that's how steep the curve is at a given moment. Lay a ruler along the curve so it just touches it at one point. That ruler is the tangent line, and its slope is the speed.

Mika: Easy: the drone is going fastest at the very top of the bump, because that's where it's highest!

Chapter 3: The Language of Change ↗

Theo: Put the cursor on the top of the bump. The tangent is flat. The speed is zero there!

Mika: Oh. The drone climbs, runs out of upward speed, stops for an instant at the top, and falls back. High and fast are totally different things.

The fastest moment is actually in the middle of the climb, where the curve is steepest. And when the curve goes down, the slope is negative: the drone is falling.

This "slope at one instant" gets a name: the derivative. We write it like a tiny change in height divided by the tiny time it took. In symbols, Δh/Δt\Delta h / \Delta t reads "change in height over change in time": the Greek letter Δ (delta) is short for change in.

speed=dhdt≈change in heightchange in time(over a very short time)\begin{gathered}\text{speed} = \frac{d\out{h}}{dt} \\[1em] \approx \frac{\text{change in height}}{\text{change in time}} \\[1em] (\text{over a very short time})\end{gathered}

A rule for the speed

June: My coffee cools fast at first and then really slowly. It never quite gets to room temperature.

Theo: Because the speed of cooling depends on how far it still has to go. A very hot mug loses heat quickly. A barely-warm mug hardly loses any.

Let's write that down as a rule for the slope. The coffee temperature is T, the room is 20 °C:

dTdt=−T−Troomτ\frac{d\out{T}}{dt} = -\frac{\out{T} - \sp{T_{\text{room}}}}{\tau}

The minus sign says "cool down when hotter than the room". The number τ (tau, the time constant) says how sluggish the mug is. Picture it like this: τ is the time the coffee would take to reach room temperature if it kept cooling at its starting speed. For a normal mug, τ ≈ 10 minutes.

Here's the puzzle: the rule only tells us the slope right now. Can we get the whole curve out of it? Let's build it by hand: look at the slope, walk along it for a little while (Δt), look at the new slope, walk again…

Chapter 3: The Language of Change ↗

June: Twelve little steps is boring. I'll take 15-minute steps and be done in no time.

June: …Wait. The coffee is at −15 °C?! It froze in a warm room?

Theo: The rule is fine. The steps are the problem. In one giant step you keep using the steep slope from the start of the step, long after it stopped being true. You fly right past room temperature.

We can see exactly how much. Each step multiplies the gap to room temperature by the same number:

gapnext=(1−Δtτ)⋅gap\text{gap}_{\text{next}} = \left(1 - \frac{\Delta t}{\tau}\right) \cdot \text{gap}
  • Δt smaller than τ: the factor is between 0 and 1. The gap shrinks, no overshoot.
  • Δt exactly τ: the factor is 0. One step lands exactly on room temperature: that's the starting speed kept up for one whole τ.
  • Δt between τ and 2τ: the factor is negative. The coffee overshoots below the room, then above, swinging back and forth while the swings shrink.
  • Δt bigger than 2τ: the factor is less than −1. The swings grow every step. Nonsense coffee.

Mika: That's the shower! Acting on old information too boldly makes you swing.

Make Δt small and switch on the smooth curve. The hand-built dots land right on it. That smooth shape is called exponential decay. It gets its own chapter next.

The real coffee never keeps its starting speed: the slope shrinks as the gap shrinks. So after one τ it has closed only about 63% of the gap, not all of it. On the ruler below, the dashed line is the starting speed kept up; the curve is what really happens. Where does 63% come from? Chapter 4 builds it.

The time constant is a ruler

Predict first! After one time constant, the coffee has closed 63% of the gap to room temperature. After two time constants, how much of the gap is closed?

Chapter 3: The Language of Change ↗

After 1τ: 63%. After 2τ: 86%. After 3τ: 95%. It never gets exactly there, but after about 4–5 τ nobody can tell. Switch to the tank: it fills through a pipe from a big reservoir standing at 1.2 m, and the flow is pushed by the difference in level, so it slows down as the tank catches up. The rule is the same ("rate proportional to how far from full") and so is the shape.

June: So τ is a built-in ruler. Tell me τ and I know how sluggish a thing is, whether it's a mug, a tank or a drone.

New words

Derivative
The slope of a curve at one instant: how fast something changes. Written dhdt\frac{dh}{dt} or h˙\dot h.
First-order system
Something whose rate of change is proportional to how far it is from where it's heading (coffee, tanks). Its curve is an exponential.
Time constant τ
How long a first-order system would take to arrive if it kept its starting speed. Really it covers 63% of the remaining distance in that time.

Going backwards: adding up area

Theo: Slope turns height into speed. Can we go backwards? Suppose the drone's sensor only tells us its speed. Where is it?

If you fly at a constant 2 m/s for 3 s, you rise 6 m: speed × time. On a speed-vs-time graph that's the area of a rectangle. When the speed keeps changing, slice time into thin strips, treat each strip as a rectangle, and add them all up.

Sweep the cursor and watch the shaded area grow. The blue curve below is simply the area so far. Where the speed dips below zero (the drone falls), the area counts as negative and the height goes down.

Chapter 3: The Language of Change ↗

Mika: The accumulated area lands exactly on the real height. Slope takes you one way, area brings you back.

This "accumulate the area" operation is called the integral. Its sign ∫ is a stretched S, for sum: a sum of thin strips. The little dtdt is the width of each strip, and the 00 and tt say where to start and stop adding:

h(t)=h(0)+∫0tspeed  dt\out{h}(t) = \out{h}(0) + \int_0^{t} \text{speed}\;dt

The slope of a slope

Mika: Chapter 1 promised us something. The drone's equation had two dots over hh. One dot is the speed. What's the second one?

Speed is itself a curve, so it has a slope too: how fast the speed changes. That is the acceleration, the slope of a slope. Below, the same flight three times: height, its slope (speed), and that slope (acceleration), all on one time cursor.

Predict first! At the very top of the bump the speed is zero. What is the acceleration there?

Chapter 3: The Language of Change ↗

Mika: I said zero! But at the top the speed curve is at its steepest downhill. Zero speed doesn't mean zero push.

Two dots mean the slope of the slope. There is a third way to write slopes, with little marks called primes: h′h' for the slope, h′′h'' for the slope of the slope. Three spellings, one idea:

New words

h˙=h′=dhdt\dot h = h' = \frac{dh}{dt}
The slope of hh: its speed.
h¨=h′′=d2hdt2\ddot h = h'' = \frac{d^2 h}{dt^2}
The slope of the slope: the acceleration.
Δ\Delta
"Change in": Δt\Delta t is a step of time.
∫\int
A stretched S, for "sum": adding up area.

Now Chapter 1's equation reads like a sentence. Mass times acceleration equals everything pushing: thrust up, weight down, and drag against the speed. That's Newton's law, one term at a time:

0.5 h¨⏟mass×acceleration=T⏟thrust−4.9⏟weight−1.0 h˙⏟drag × speed\underbrace{0.5\,\ddot{\out{h}}}_{\text{mass}\times\text{acceleration}} = \underbrace{\eff{T}}_{\text{thrust}} - \underbrace{4.9}_{\text{weight}} - \underbrace{1.0\,\dot{\out{h}}}_{\text{drag}\,\times\,\text{speed}}

Theo: So the coffee's rule was about its speed, and the drone's rule is about its acceleration: one slope deeper. Is that why the drone can overshoot and swing, and the coffee never does?

June: Has to be. The coffee's speed just follows the gap. The drone's speed has to be built up and used up, so it can still be moving when it gets there.

What we know so far

What we figured out

  • The derivative is the slope of a curve at one instant: how fast it's changing. High and fast are different things.
  • A rule like "cool faster the hotter you are" pins down the whole curve: an exponential approach.
  • The time constant τ is a ruler: 63% of the way after τ, 86% after 2τ, 95% after 3τ.
  • Building curves with steps that are too big creates fake overshoot and swings, just like the shower.
  • The slope of the slope is the acceleration: h¨\ddot h, or h′′h''. Chapter 1's drone equation is a rule for it.
  • The integral accumulates area and undoes the derivative.

Theo: "The coffee curve had a funny property: its slope was always proportional to the gap still left. Is there a curve whose slope is proportional to itself?"

Chapter 3: The Language of Change ↗