# Introduction
In the last Media Reflection a single [equilibrium](https://en.wikipedia.org/wiki/Equilibrium_point_(mathematics)) disappeared in a [saddle-node bifurcation](https://en.wikipedia.org/wiki/Saddle-node_bifurcation) and the system slowed down on its way there. Here two of those bifurcations face each other, and something new happens. Between them the system has two stable states to choose from, and which one it is in depends on its past. Turn a parameter far enough and the state jumps. Turn the parameter back a little and nothing happens. This is [hysteresis](https://en.wikipedia.org/wiki/Hysteresis), and it is why a lake that has gone murky does not clear up when you stop polluting it, why a squealing brake keeps squealing when you ease off the pedal, and why some metals remember their shape.
The modeling point is that the present value of a parameter does not tell you the present state of the system. You also need its history. A model with [bistability](https://en.wikipedia.org/wiki/Bistability) can explain sudden changes that a smooth, one-equilibrium model never could, and it says something about how hard those changes are to undo.
> [!info]- Before you start
> **Instructions** *(TK)*
>
> 🎯 **[MR] [Media Reflection Questions](TK)** · **[Statement](TK)** · due **TK**
>
> Keep both quizzes open in other tabs while you work. The questions are in the boxes marked **Quiz** below. The multiple-choice ones go in the Questions quiz (unlimited attempts, highest score kept) and the free-response ones go in the Statement quiz (one attempt), each in the same order as on the page.
> [!abstract]- What this page is for
> This page builds directly on [[The Breakdown of Linear Stability Analysis and Critical Slowing Down]]. You will drive a system back and forth across two folds, watch it jump, and draw the hysteresis loop with your own hands before you see the equilibria that explain it. Then you will meet the same loop in a lake, a brake and a metal. Budget **about 90 minutes**. Parts 5 and 6 are short and stand on their own, so they are good places to take a break.
>
> The applets only run on **scottastrong.org**. If you see an empty box where an applet should be, you have landed on the publish.obsidian.md copy of the page, so switch to the scottastrong.org address.
>
> **How the applet works.** You move the parameter with its slider, or with **ramp up**, **ramp down** and **full loop**, and the state follows the actual differential equation, so it lags behind when it has to. The left panel is the phase line at the current parameter value (the state runs up the page, filled circle for a sink, open circle for a source). The right panel draws the path you take, red while the parameter is going up and purple while it is coming down, and a small triangle marks each jump. The strip at the bottom is the state over time.
---
## Part 0 · Drive it before you understand it
Here is a one-variable system with a parameter $h$,
$
\frac{dy}{dt} = h + y - y^{3}.
$
Do not solve anything yet. The equilibria are hidden, so all you have is the experiment.
<div class="applet" data-applet="hysteresis-loop" data-model="s-curve" data-models="s-curve"></div>
**Things to do.**
1. Leave the speed on **medium** and the noise on **none**. The system starts at $h = -0.6$ on its lower state. Press **ramp up** and watch the dot on the right. Note where it jumps.
2. When the ramp stops at $h = 0.8$, press **ramp down** and note where it jumps back.
3. Press **clear the path**, then **full loop**, and watch the whole loop draw itself.
4. Press **h = 0.6**, wait for the state to settle, then drag the slider slowly to $h = 0$. Now press **h = −0.6**, wait, and drag slowly to $h = 0$ again. Compare where the state ends up each time.
> [!question]- Quiz Q1 · multiple choice
> Ramping up from $h = -0.6$ on the lower state at medium speed, about where does the state jump?
> - about $h = -0.4$
> - about $h = 0$
> - about $h = 0.4$
> - It never jumps, it slides smoothly up to the upper state.
> [!question]- Quiz Q2 · multiple choice
> Ramping back down from $h = 0.8$ on the upper state, about where does the state jump back down?
> - about $h = -0.4$
> - about $h = 0.4$, the same place it jumped up
> - about $h = 0$
> - It never jumps back down.
> [!question]- Quiz Q3 · multiple choice
> You set $h = 0$ twice, once after coming down from $h = 0.6$ and once after coming up from $h = -0.6$. Where is the state each time?
> - On the lower state both times.
> - On the upper state both times.
> - On the upper state after coming down, and on the lower state after coming up.
> - At $y = 0$ both times, halfway between the two.
> [!question]- Quiz Q4 · free response
> Describe the loop you drew. Where does the system jump, in which direction, and why do the path up and the path down not lie on top of each other? In what sense does this system remember its past?
---
## Part 1 · What the loop is made of
Now find the equilibria. Setting $h + y - y^{3} = 0$ and solving for the parameter instead of the state gives the curve
$
h = y^{3} - y ,
$
an S turned on its side. For a value of $h$ in the middle there are three equilibria, and near the ends there is only one. The S turns around where $\dfrac{dh}{dy} = 3y^{2} - 1 = 0$, that is at
$
y = \pm\frac{1}{\sqrt 3}, \qquad h = \mp\frac{2}{3\sqrt 3} \approx \mp 0.385 .
$
Stability comes from $f'(y^{*}) = 1 - 3y^{*2}$, which is exactly $-\dfrac{dh}{dy}$ along the curve. So the stable equilibria are on the two outer arms of the S, where it rises, the unstable ones are on the middle arm, where it falls back, and the change happens precisely at the turning points, where $f'(y^{*}) = 0$. Each turning point is a **fold**, a sink and a source meeting and disappearing.
<div class="applet" data-applet="hysteresis-loop" data-model="s-curve" data-models="s-curve" data-equilibria="on"></div>
**Things to do.**
1. Press **full loop** and watch your path ride the green arms of the S and leave them at the folds.
2. Run the loop again at **slow** and at **fast**, pressing **clear the path** in between. Compare where the triangles land with the fold values printed in the readout.
3. Ramp up slowly and stop just before the right-hand fold, around $h = 0.37$. Read the relaxation time $\tau$ of the lower state in the readout and compare it with its value at $h = 0$.
> [!question]- Quiz Q5 · multiple choice
> Each jump happens where one of the stable states disappears. Which bifurcation from the previous Media Reflection is this?
> - A transcritical bifurcation, where two equilibria pass through each other and swap stability.
> - A saddle-node (fold), where a sink and a source collide and disappear.
> - A pitchfork, where one equilibrium splits into three.
> - It is not a bifurcation, because the number of equilibria does not change.
> [!question]- Quiz Q6 · multiple choice
> Switch the ramp from slow to fast. What happens to where the jumps happen?
> - They land closer to the folds.
> - They do not change, because the folds are fixed by the equation.
> - They land farther past the folds, because the state takes time to leave and the parameter keeps moving.
> - The jumps stop happening.
> [!question]- Quiz Q7 · free response
> Explain why the jump always comes a little after the fold, never before it (with no noise). Use what you learned about $f'(y^{*})$ and the relaxation time in the previous Media Reflection. If you were watching this system with no equation in hand, what would warn you that a jump was coming?
> [!note] Naming the window
> The stretch of $h$ between the two folds, $-0.385 < h < 0.385$, is a window of **bistability**, with two stable states at once separated by an unstable one. The lagging, history-dependent loop that bistability produces is **hysteresis**, from the Greek for "lagging behind".
---
## Part 2 · Kicks, noise, and supercooled water
Inside the window, the lower state is stable, but only so stable. The source on the middle arm is the edge of its basin, and the closer you get to the fold, the closer that edge comes.
<div class="applet" data-applet="hysteresis-loop" data-model="s-curve" data-models="s-curve" data-equilibria="on"></div>
**Things to do.**
1. Press **h = 0**. Use **kick up** with kick sizes of $0.5$ and then $1.05$, and watch whether the state comes back or crosses to the upper state.
2. Press **reset**, drag $h$ to $0.3$ and let the state settle on the lower state. Find, roughly, the smallest kick that sends it to the upper state for good. Compare the size of that kick with the distance between the lower state and the source in the readout.
3. Press **clear the path**, set the noise to **large** and the speed to **slow**, and run a **full loop**. Do it a couple of times. Where do the jumps happen now, compared with the folds?
> [!question]- Quiz Q8 · multiple choice
> At $h = 0.3$, with the system settled on the lower state, about how big an upward kick does it take to send the state to the upper state for good?
> - about $0.1$
> - about $0.45$
> - about $1.0$
> - No kick can do it, because the lower state is stable.
Water can stay liquid well below $0\,^{\circ}\text{C}$ if nothing gives it a place to start freezing. That [supercooled](https://en.wikipedia.org/wiki/Supercooling) liquid is a stable state, but only locally, a [metastable](https://en.wikipedia.org/wiki/Metastability) one. A tap or a seed crystal is a kick, and once it is over the edge of the basin the whole bottle freezes at once.

> [!quote] Attribution
> **"Supercooled Water - Explained!"**, YouTube, [youtube.com/watch?v=ph8xusY3GTM](https://www.youtube.com/watch?v=ph8xusY3GTM).
> [!question]- Quiz Q9 · free response
> Describe supercooled water in the language of this page. What plays the role of the parameter, what are the two states, which state is the bottle in before it is disturbed, and what plays the role of the kick? Why does a smaller disturbance do the job when the water is colder?
---
## Part 3 · Closing the loop
The system so far was the special case $a = 1$ of
$
\frac{dy}{dt} = h + a\,y - y^{3}.
$
The folds sit at $h = \pm 2\left(\dfrac{a}{3}\right)^{3/2}$, so the window has width $4\left(\dfrac{a}{3}\right)^{3/2}$, and it shrinks as $a$ does.
<div class="applet" data-applet="hysteresis-loop" data-model="s-curve" data-models="s-curve" data-equilibria="on"></div>
**Things to do.** Run a **full loop** at **a = 1**, then at **a = 0.5**, then at **a = 0**, clearing the path in between. Then try a negative value of $a$ with the slider.
> [!question]- Quiz Q10 · multiple choice
> Set $a = 0$ and run a full loop. What happens?
> - The loop gets wider.
> - The jumps happen at $h = 0$ in both directions.
> - The state stops moving.
> - The loop disappears. The state rises and falls along one curve with no jumps.
The two folds meet at $a = 0$, $h = 0$. In the $(a, h)$ plane the folds trace out a sharp point, called a [cusp](https://en.wikipedia.org/wiki/Cusp_bifurcation), and hysteresis lives only inside it.
---
## Part 4 · A lake that will not come back
Shallow lakes have two typical states, clear water with plants on the bottom, and murky green water full of algae. Phosphorus washing in from farms and towns pushes a lake toward murky water, and in murky water phosphorus is also released from the bottom mud, which makes things worse. A standard model of this, from [Carpenter, Ludwig and Brock (1999)](https://lternet.edu/biblio/management-of-eutrophication-for-lakes-subject-to-potentially-irreversible-change), is, in scaled form,
$
\frac{dx}{dt} = L - b\,x + \frac{x^{8}}{1 + x^{8}} ,
$
where $x$ is the phosphorus in the water, $L$ is the loading from the watershed (the parameter we control), $b\,x$ is phosphorus leaving through outflow and burial, and the last term is the release from the mud, which switches on sharply once $x$ is near $1$. The two stable states are **clear** (low $x$) and **turbid** (high $x$). This is [eutrophication](https://en.wikipedia.org/wiki/Eutrophication), and the lake is a classic example of [alternative stable states](https://en.wikipedia.org/wiki/Alternative_stable_state).
<div class="applet" data-applet="hysteresis-loop" data-model="lake" data-models="lake"></div>
**Things to do.**
1. With $b = 1$, press **ramp up** and watch where the lake turns turbid. Then press **ramp down** and watch where it turns clear again. Press **show equilibria** afterwards.
2. Press **reset**, then **b = 0.6**, and ramp $L$ up until the lake turns turbid. Now ramp all the way down to $L = 0$.
3. Try **b = 2.1** and run a full loop.
> [!question]- Quiz Q11 · multiple choice
> With $b = 1$, the lake turned turbid near $L = 0.69$. You cut the loading back to $L = 0.6$ and wait. What happens?
> - It goes back to clear water.
> - It stays turbid.
> - It settles halfway between clear and turbid.
> - It flips back and forth between clear and turbid.
> [!question]- Quiz Q12 · multiple choice
> With $b = 0.6$, you let the lake turn turbid and then ramp the loading all the way down to $L = 0$. What happens?
> - It turns clear near $L = 0.39$, as it did for $b = 1$.
> - It stays turbid, even with no loading at all.
> - It turns clear as soon as $L$ starts to fall.
> - It never turns turbid in the first place.
> [!question]- Quiz Q13 · free response
> A town is deciding whether to spend money now to keep phosphorus out of a clear lake, or to wait and clean the lake up later if it turns murky. Using what you saw in the applet, explain why waiting can cost far more than the same reduction made early. What did $b$ do to your answer?
---
## Part 5 · Brake squeal, a loop you can hear
A brake squeals when the friction between the pad and the disc feeds energy into a vibration faster than damping can remove it. The quiet brake is an equilibrium, and the squeal is a steady oscillation, the kind of state that played the role of the truck's sway in the last Media Reflection (a [limit cycle](https://en.wikipedia.org/wiki/Limit_cycle)). In many brakes the squeal begins suddenly at full volume through a [subcritical Hopf bifurcation](https://en.wikipedia.org/wiki/Hopf_bifurcation), and the simplest equation that captures that is one for the size $r$ of the vibration,
$
\frac{dr}{dt} = \mu\,r + r^{3} - r^{5}, \qquad r \ge 0 ,
$
where $\mu$ stands for how strongly friction wins against damping. This is a caricature, not a model of any particular brake, but it has the right shape. The quiet state $r = 0$ is stable for $\mu < 0$ and unstable for $\mu > 0$, and a large squealing state exists all the way down to $\mu = -\tfrac14$.

> [!quote] Attribution
> **"Subcritical Hopf Bifurcation of Brake Squeal"**, YouTube, [youtube.com/watch?v=zclp8vLKJzU](https://www.youtube.com/watch?v=zclp8vLKJzU).
<div class="applet" data-applet="hysteresis-loop" data-model="squeal" data-models="squeal"></div>
**Things to do.** Press **sound: on** if you like (it is quiet, but check your volume). Press **ramp up** and listen for the squeal to start, then **ramp down** and listen for where it stops. The strip at the bottom is the vibration itself. Press **show equilibria** afterwards and compare with the S-curve. The squeal starts a little after $\mu = 0$ because the quiet state is only barely unstable there and the tiny vibrations need time to grow.
> [!question]- Quiz Q14 · multiple choice
> Ramp $\mu$ up until the brake squeals, then ramp it back down at medium speed. About where does the squeal stop?
> - about $\mu = 0.1$, right where it started
> - about $\mu = -0.3$
> - about $\mu = -0.5$
> - It never stops once it starts.
> [!question]- Quiz Q15 · free response
> You are driving down a long hill and your brakes start to squeal. Based on this model, what happens if you ease off the pedal just a little, and what would you have to do to make the squeal stop? Why does the squeal start at full volume instead of growing gradually?
---
## Part 6 · A metal with a memory
[Nickel titanium](https://en.wikipedia.org/wiki/Nickel_titanium) (nitinol) is a [shape-memory alloy](https://en.wikipedia.org/wiki/Shape-memory_alloy). Its atoms can sit in two crystal arrangements, a soft one that is easy to bend at low temperature and a stiff one that snaps back to a remembered shape at high temperature. On heating it switches to the stiff arrangement at one temperature, and on cooling it switches back at a lower one, tens of degrees apart. Between them either arrangement is possible, depending on whether the metal is warming or cooling. A kitchen example of the same thing is [agar](https://en.wikipedia.org/wiki/Agar), which melts near $85\,^{\circ}\text{C}$ but does not set again until it has cooled to roughly $32$ to $40\,^{\circ}\text{C}$.

> [!quote] Attribution
> **"How a metal with a memory will shape our future on Mars"**, YouTube, [youtube.com/watch?v=Pn-6bGORy0U](https://www.youtube.com/watch?v=Pn-6bGORy0U). A shorter lab demonstration is **"Nitinol: The Shape Memory Effect and Superelasticity"**, [youtube.com/watch?v=wI-qAxKJoSU](https://www.youtube.com/watch?v=wI-qAxKJoSU).
> [!question]- Quiz Q16 · free response
> Pick nitinol or agar. Name the parameter, the two states, and the window where both are possible. Sketch in words what its hysteresis loop would look like if you heated it up and cooled it back down, in the same way you drew the S-curve's loop, and say where the jumps are.
---
## Part 7 · Tipping points
Ecologists and climate scientists call a fold that a real system is pushed across a [tipping point](https://en.wikipedia.org/wiki/Tipping_points_in_the_climate_system). The worry is exactly the lake's. Once a system has jumped, turning the parameter back a little does not bring it back, and the slowing down near the fold is one of the few warnings available before the jump. Thomas Bury gives a short tour of this idea, from lakes to the climate, in [The Mathematics of Tipping Points](https://www.ted.com/talks/thomas_bury_the_mathematics_of_tipping_points) (TEDxUofTSalon).
> [!question]- Quiz Q17 · free response
> You are studying a system you do not have an equation for. You turn a dial slowly, and at some point the system suddenly jumps to a very different behavior. You turn the dial back a little, and nothing happens. What does that tell you about the equilibrium structure of the system, and what could you have watched for before the jump?
>
> (If it helps, think about how many stable states there must be near the dial setting where it jumped, what happened to one of them, and what you learned about relaxation times in the previous Media Reflection.)
---
## What to carry forward
1. Two folds facing each other make a window of bistability. Inside it, the state of the system depends on its history, and the path up and the path down form a hysteresis loop.
2. A jump happens when the state's own equilibrium disappears at a fold. Turning the parameter back a little does not undo it. You have to go all the way back past the other fold, and sometimes that fold is out of reach.
3. Near a fold the state is slow to recover, and the basin it sits in is shallow, so small disturbances and noise can tip it early. Both are warnings that a jump is coming.