Thinking in Waves Episode 1 / Part I · Building the tools
Start with sound, end with the physical constants
Differentiation is treble, integration is bass ──
first, let us measure it
Differentiate an audio signal and the highs come up; integrate it and the lows come up.
This is not a metaphor. It is exact: precisely ±6.02 dB per octave.
And physics does nothing but repeat this operation — position → velocity → acceleration.
This series starts from one observation ── audio is a wave; differentiation extracts the high frequencies, integration extracts the low ones.
So what happens if we read all of physics' calculus that way? First, let us check whether that foundation is really exact.
01Build a test signal and differentiate it
16384 points at 48 kHz, four sine waves spaced two octaves apart. Every one sits exactly on an FFT bin centre, so there is no leakage.
Frequency resolution \(\Delta f = 1/T = 2.93\) Hz
Differentiate it naively (central difference) and look at the spectrum.
| Frequency | Original amplitude | After differentiation | Ratio | \(\omega=2\pi f\) | Ratio / \(\omega\) |
|---|---|---|---|---|---|
| 93.75 Hz | 1.0000 | 589.0 | 589.0 | \(5.890\times10^{2}\) | 0.99997 |
| 375 Hz | 1.0000 | 2355.2 | 2355.2 | \(2.356\times10^{3}\) | 0.99960 |
| 1500 Hz | 1.0000 | 9364.3 | 9364.3 | \(9.425\times10^{3}\) | 0.99359 |
| 6000 Hz | 1.0000 | 33941.1 | 33941.1 | \(3.770\times10^{4}\) | 0.90032 |
Conclusion of §01
The last column lines up at 1 ── which says:
Differentiation multiplies the amplitude by \(\omega\).
Only 6000 Hz drops to 0.90, and that is the difference approximation, not physics (we track it down in §04).
02Integration is the reverse
| Frequency | After integration / original | \(1/\omega\) | Ratio × \(\omega\) |
|---|---|---|---|
| 93.75 Hz | \(1.698\times10^{-3}\) | \(1.698\times10^{-3}\) | 0.99999 |
| 375 Hz | \(4.243\times10^{-4}\) | \(4.244\times10^{-4}\) | 0.99980 |
| 1500 Hz | \(1.058\times10^{-4}\) | \(1.061\times10^{-4}\) | 0.99679 |
| 6000 Hz | \(2.515\times10^{-5}\) | \(2.653\times10^{-5}\) | 0.94806 |
In audio engineering this is an everyday tool
A first-order high-pass filter rolls at +6 dB/oct, a low-pass at −6 dB/oct. A differentiator and a high-pass are the same thing.
The RIAA equalisation curve on vinyl records is built the same way — lift the highs when cutting (differentiator-ish), put them back on playback (integrator-ish).
03Measure the phase too
Amplitude is only half the story. If the \(i\) in \(i\omega\) is doing its job, the phase must rotate by 90°.
| Frequency | Phase shift from differentiation | from integration |
|---|---|---|
| 93.75 Hz | \(+90.0°\) | \(-90.0°\) |
| 375 Hz | \(+90.0°\) | \(-90.0°\) |
| 1500 Hz | \(+90.0°\) | \(-90.0°\) |
| 6000 Hz | \(+90.0°\) | \(-90.0°\) |
The heart of §03 ── this explains everything
On the Fourier side, differentiation and integration are just multiplications:
$$\frac{d}{dt}\ \longrightarrow\ \times(i\omega),\qquad \int dt\ \longrightarrow\ \times\frac{1}{i\omega}$$
\(|i\omega|=\omega\) sets the amplitude; \(\arg(i)=90°\) sets the phase.
Both came out exactly as predicted.
04Where the discrepancy comes from ── approximation, not physics
At 6000 Hz the ratio fell to 0.90. Write the exact transfer function of the central difference and the cause is obvious.
| Frequency | \(\omega\Delta t\) | Predicted \(\mathrm{sinc}(\omega\Delta t)\) | Measured ratio/\(\omega\) |
|---|---|---|---|
| 93.75 Hz | 0.0123 | 0.999975 | 0.999975 |
| 375 Hz | 0.0491 | 0.999598 | 0.999598 |
| 1500 Hz | 0.1963 | 0.993587 | 0.993587 |
| 6000 Hz | 0.7854 | 0.900316 | 0.900316 |
Agreement to six decimal places. The discrepancy is the difference scheme, not the physics.
With this route, ratio/\(\omega\) is 1.000000000 at every frequency (round-off only)
05Physics is a chain of this one operation
| Quantity | Order relative to position | Spectral slope |
|---|---|---|
| Integral of position (absement) | \(-1\) | \(-6\) dB/oct |
| Position \(x\) | 0 | \(0\) |
| Velocity \(v=dx/dt\) | \(+1\) | \(+6\) dB/oct |
| Acceleration \(a=d^2x/dt^2\) | \(+2\) | \(+12\) dB/oct |
| Jerk | \(+3\) | \(+18\) dB/oct |
Conclusion of this episode
Repeating differentiation and integration in physics means tilting a signal's spectrum over and over.
Newton's law \(F=ma\) reads as "proportional to the input tilted by +12 dB/oct".
Not as a metaphor — on the Fourier side that is literally what it says.
One snag we will be living with from here on
The spectral-method code needs exactly one special line ──
if (ω === 0) { output = 0; continue; } // DC cannot be defined
At \(\omega=0\), \(1/\omega\) diverges, so integration cannot fix the DC component. Differentiation does the opposite — it crushes DC to zero.
That single line becomes the subject of Episode 3.
Exercises
- Why is "differentiation = +6 dB/oct"? One line.
Show answer
Differentiation multiplies the amplitude by \(\omega\). One octave doubles \(\omega\).
\(20\log_{10}2 = \mathbf{6.02}\) dB. That is the whole of it. - Integrating an accelerometer's output twice should give position, but in practice it drifts. Why?
Show answer
Integration multiplies by \(1/\omega\), so the lower the frequency, the more enormous the gain. Twice means \(1/\omega^2\).
A tiny DC offset in the sensor (a component at \(\omega\approx0\)) therefore blows up.
In practice one inserts a high-pass to kill DC — but that also throws away part of the "true" position. - Why do people say "differentiation adds noise"?
Show answer
Because it lifts high frequencies by \(\omega\).
Measurement noise is spread broadly up to high frequencies (nearly white), so differentiation selectively amplifies the noise.
Integration, conversely, smooths — both are obvious once you think of them as filters.
Summary Differentiation and integration were filters
We actually differentiated and integrated a 48 kHz synthetic audio signal and measured it. Differentiation multiplies the amplitude by \(\omega\) and rotates the phase by \(+90°\); integration multiplies by \(1/\omega\) and rotates by \(-90°\). That is ±6.02 dB per octave.
Even the small discrepancy at high frequency is explained to six decimal places by the central difference's \(\mathrm{sinc}(\omega\Delta t)\) ── approximation, not physics. Multiply by \((i\omega)\) directly in the FFT and the error disappears.
And physics does nothing but repeat this operation: position → velocity → acceleration. \(F=ma\) is "the thing tilted by +12 dB/oct".
Calculus in physics is the operation of tilting a spectrum, over and over.
Next time we move \(\alpha\) continuously. Does "differentiate by one half" mean anything?
The answer up front ── yes. And it is measured every day in battery laboratories.
This document is Episode 1 of the series "Thinking in Waves". The computation is in kenshou/nami.js (plain Node, no dependencies). On the numbers in this episode: the test frequencies (93.75, 375, 1500, 6000 Hz) were chosen as integer multiples of \(f_s/N=2.9297\) Hz, so there is no spectral leakage even without a window function. Move off those and the amplitudes wobble by several percent (indeed, the first attempt used 100/400/1600/6400 Hz and leaked). The numerical derivative is a central difference and the integral a trapezoidal rule, both assuming periodic boundaries. The mean is subtracted from the integrated signal ── without it the trapezoidal accumulation drifts and pollutes the low end of the spectrum. That very act of "subtracting the mean" is the subject of Episode 3 (the constant of integration). ── To print, use your browser's Print → Save as PDF.