Why does the shower go hot, then cold?
Because you react to water that left the tap seconds ago. Turn the knob too eagerly and you keep correcting a problem that's already fixed, so the temperature swings. In Laplace terms, the delay is a factor e^(−sT), and one number, your adjusting speed times the delay, predicts whether it settles.
- Time until it’s right
- 63.7 s
- Hottest it gets
- 38 °C
- K × T
- 0.2
Challenge: Get to within half a degree in under 20 seconds without going over 39.5 °C.
More settings
Play
Crank up how fast you adjust until the water starts swinging. Then lengthen the pipe instead.
Challenge: Get to within half a degree in under 20 seconds without going over 39.5 °C. The box under the picture turns green when you get it.
Stuck? Pick one of the examples from the “Try an example” menu, or press “New example.”
Understand
You adjust the knob based on what you feel, but what you feel is delayed:
In the Laplace domain, a delay of seconds is just a factor . The whole loop becomes one equation:
Its roots decide everything, and they depend only on the product :
- : the water warms smoothly.
- : it overshoots and swings, then settles.
- : it never settles. The swings grow until the knob hits full hot and full cold.
The strip above the graph shows where your lands.
Use
Every input has a unit menu, so you can type values in the units you already have. Results follow your units.
Show the work
- You turn the knob by how wrong it feels
u'(t) = K\,\big(r - y(t)\big) - But you feel what left the valve T seconds ago
y(t) = u(t - T) - Laplace transform: a delay becomes a factor e^(−sT)
Y(s) = e^{-sT}\,U(s),\qquad s\,U(s) = K\,\big(R(s) - Y(s)\big) - The loop’s characteristic equation
s + 0.05\,e^{-4\,s} = 0 - One number decides it
KT = 0.05 \times 4 = 0.2\quad(\text{smooth} \le 1/e \approx 0.37,\ \text{stable} < \pi/2 \approx 1.57)
Export
Set how fast you adjust and the pipe delay. Open "More settings" for the target, cold, and hot temperatures.
- Real people aren't perfectly steady adjusters, but the pattern is the same.
For learning and estimation. Verify with applicable codes, standards, and a qualified professional before using in design, construction, or safety-critical work.
Cheat card
| Symbol | Meaning | Unit |
|---|---|---|
| how fast you adjust | /s | |
| delay before you feel the change | s | |
| the temperature you want, and what you feel | °C |
- Doubling the delay has the same effect as adjusting twice as fast. Only the product K·T matters.
- The fix for a long delay is patience. Make a change, then wait for it to arrive.
- Thermostats, cruise control, and autopilots all face the same trade-off.
Where it’s used
- Mechanical
Control engineers tune heating systems, cruise control, and autopilots around this same delay limit. - Physics
Any loop that reacts to old information can oscillate, from traffic jams to supply chains. - Home Projects
Hotel showers with long pipes are the classic case. Small turns and a few seconds of patience fix them.
Related exhibits
- Start here
Door closer: slam, bounce, or glide
One damping knob turns a slam into a glide. Where two dots (the poles) sit tells you which.
- Go further
When will my coffee wear off?
Each cup rises, then fades by half every few hours. Cups stack, and the Laplace transform says why they simply add.
- Also try
Cooling coffee: when is it drinkable?
Hot things cool fast, then slower and slower. Exponential decay predicts the sip.
Questions people ask
Why does the shower keep going from hot to cold?
The water you feel left the valve a few seconds ago. If you keep turning until it feels right, you've already turned too far by the time the change arrives. Then you correct back too far, and so on.
What does the Laplace transform have to do with it?
It turns the time delay into a simple factor e^(−sT) and the whole loop into one equation, s + Ke^(−sT) = 0. Solving it gives the thresholds. Above K·T = 1/e the water overshoots, and above π/2 it never settles.
How do I stop it?
Make smaller changes and wait a few seconds after each one. Lowering K is the only fix you control, since you can't shorten the pipe.