Hodgkin & Huxley
The original mathematical modellers of the action potential
In 1952 Alan Hodgkin and Andrew Huxley published a series of five papers on the squid giant axon. The last one is the famous one. They had measured how the membrane’s permeability to sodium and potassium changes when you hold it at a fixed voltage, fitted some deliberately empirical equations to those measurements, and then asked whether the equations would predict a nerve impulse on their own. They did. The paper shows the expected shape of the action potential, its threshold, its refractory period, and the speed it travels down the fibre, and none of that was put in by hand.
It is the same year Turing published his morphogenesis paper, which is a coincidence I enjoy more than I should. Both take a handful of local rules and let them run until something structured falls out.
The arithmetic is the part worth pausing on. They had the equations settled by the spring of 1951 and meant to solve them on the Cambridge computer, then learned it was going off the air for six months for a major rebuild. So Huxley did it by hand, on a Brunsviga, a mechanical calculator you crank, stepping the equations forward in intervals of about a hundredth of a millisecond. One run, five milliseconds of trace, took something like eight hours. The propagated action potential took about three weeks, because the speed of the wave is not something you can solve for directly: you guess it, integrate, watch the answer diverge, and guess again. Everything below recomputes in a few milliseconds, which is a poor tribute but a fast one.
This live demo reproduces the Hodgkin-Huxley action potential in your browser. It is not traced from the figures in the paper, every curve is integrated from the equations on p. 519 using the constants in Table 3, and the result matches what they published to three significant figures. The 15 mV shock at 6.3 °C gives a spike of 105.4 mV against their 105.4 mV, a maximum rate of rise of 311 V/sec against their 311, and a falling phase of 2.21 msec against their 2.21. The conduction velocity is not entered either: the app searches for the one value of the constant K that lets the wave equation settle back to rest instead of running away to infinity, which is exactly what they did by hand, and lands on 18.7 m/sec where they got 18.8. The Constants & checks tab shows all of it side by side.
One thing to know before you start. Hodgkin and Huxley measured potential as a displacement from rest with depolarization negative, and treated inward current as positive. Both are the opposite of the modern convention, and their rate equations are only correct in it, so the model uses it throughout and plots −V upward the way the paper does. There is a toggle on the first tab if you would rather read absolute membrane potential.
Start with the action potential and drag the sodium conductance down until the spike fails. Then look at the gating variables underneath: m opens fast, h shuts slowly, n opens slower still, and the whole impulse is that separation of timescales. The Excitation tab is the one I find hardest to stop playing with, because the threshold is not a parameter anywhere in the model. It simply appears.
A note on the two gaps that verification leaves open, from the paper rather than in the code. The time constant of sodium inactivation in Table 2 settles at 0.67 msec under a large depolarization, while eqn. 24 sends it to 1.00; and the activation time constant at the two smallest depolarizations is off by half. Both come from a single axon, and Figs. 7 and 9 show the smooth curves drawn through a visible scatter of points. Hodgkin and Huxley were fitting something simple enough to compute by hand, not something exact. They said as much: the equations have “no evidence in favour” of the mechanism they had in mind, and the point they considered established was only that permeability changes of this rough shape are enough to account for everything a nerve does.
If you want the original, the PDF is here.