# asdfgh 5

Elementary problems in physics often yield smooth curves as trajectories. [GIF of particle doing a smooth motion on a surface, another of a fired cannonball.]

Smooth solutions are commonplace, though they aren’t dictated by the laws of physics. The same rules that describe the flight of cannonballs, or the path of a bicycle can accommodate random motions as well. The determining factor is the form of the forces or, equivalently, the potential energies that govern the system.

Concretely, in the case of a particle near the surface of Earth, we have \(a = g\) which leads to the smooth velocity \(v = gt.\) Alternatively, for a car with smooth shifts in horsepower, we have the smooth velocity \(v = \int a(t) dt.\) In each case, a smooth force gives rise to smooth velocities and positions.

This is fine for a large slice of common dynamics like the orbits of the planets or the flight of a rocket, but falls flat for other common motions like the diffusion of a gas, the folding of proteins, or the formation of river morphology. Such problems generate trajectories that are continuous, but not smooth. Smooth dynamics are also ineffective for applying the methods of physics to non-physical problems like the stock market, or traffic systems.

# Stochastic dynamics

The fundamental distinction is that unlike the reliable strength of the Earth’s gravitational field, these dynamics are dominated by **stochastic** events like

- the thermal jostling of biomolecules by their fluid environment
- the unpredictable confluence of random timing and decision making in the stock market
- or the interaction of stream water with the random surface structure of rock

This means we have to find ways to represent uncertain events and incorporate them into the laws of motion. In this post, we’ll explore stochastic motion through the particular case of the Brownian particle—a small molecule that experiences random collisions with the fluid it's in.

At the macroscopic level, we might liken this to the position of a soccer ball as its passed around on the field. Of course it has some non-random features, like the fact that people are trying to put it through the goal, but the timing and directionality of the passes and shots are largely unpredictable and up to in-the-moment decisions by the players.

Without writing down a particular model, we know that the soccer ball's motion has several prominent features:

- Its current position and velocity depend only on its previous position and velocity.
- The timing and directionality of kicks are unpredictable (from the modeler’s perspective).
- Its trajectory is continuous though its velocity isn’t.

Let’s try to capture some of these features with a simple model in one dimension.

# One dimensional model—the random walk

To get started, we'll first consider a model in which the position of the soccer ball is confined to move along one spatial dimension. In this initial attempt at describing random motion, we’ll relax some of the features we listed above and employ a simpler set of assumptions:

- We discretize space and time so that the ball can reside at positions \(r_t \in \mathbb{Z},\) and its position is updated at discrete times \(t \in \mathbb{N}.\)
- We replace velocity with an
**update rule**: at each moment the particle can make a move \(m_i=\pm1\) that shifts one unit up or down the field with equal probability.

We can therefore represent the trajectory, \(\gamma,\) of the ⚽️ by the sequence of moves it takes from its starting position: \[\gamma = \{m_i\} = \{\uparrow, \uparrow, \downarrow, \uparrow, \downarrow, \downarrow, \downarrow,\downarrow\}.\] In this case, the ball ends up two units downfield of its starting position after eight time steps, i.e. \(r_8 \sum_i m_i = -2.\) For this trajectory, our ball ends up at \(r_8 = -2,\) but where do the rest of the balls go, and how likely are they to end up there?

Let’s enumerate all the two step trajectories \[\begin{array}{c|c} \text{Sequence} & \sum_i m_i \\ \hline \{\uparrow, \uparrow, \uparrow\} & 3 \\ \{\uparrow, \downarrow, \uparrow\} & 1 \\ \{\downarrow, \uparrow, \uparrow\} & 1 \\ \{\downarrow, \downarrow, \uparrow\} & -1 \\ \{\uparrow, \uparrow, \downarrow\} & 1 \\ \{\uparrow, \downarrow, \downarrow\} & -1 \\ \{\downarrow, \uparrow, \downarrow\} & -1 \\ \{\downarrow, \downarrow, \downarrow\} & -3 \\ \end{array}\]

We can see that the ball has one way to end up 3 positions upfield, three ways to end up 1 positions upfield, three ways to end up 1 position downfield, and one way to end up three positions downfield. We can average the displacement \(\sum_i m_i\) over all the trajectories and we find

\[\begin{align} \langle r_3 \rangle &= \langle\sum_i m_i\rangle \\ &= \langle m_1\rangle + \langle m_2\rangle + \langle m_3\rangle \\ &= 3\times\frac{1-1}{2} \\ &= 0 \end{align}\]

This is a little unsatisfying as it suggests that, on average, our ball goes nowhere when we know that the average ball does (in fact all of them do) move away from the origin. It suggests that a straight sum loses important information about our trajectories.

A direct approach is to average the absolute values of the displacements, i.e. to use \(\langle r_3\rangle = \lvert \sum_i m_i\rvert = \frac{3 + 1 + 1 + 1 + 1 + 1 + 1 + 3}{8} = 1.5.\) This is great, because it effectively captures the ball’s displacement, but in practice absolute values are awkward to work with and make analysis difficult.

## Random walk - calculation

Instead we can use a more tractable measure of displacement, the square of the sum \(\left(\sum_i m_i\right)^2.\) Writing this out for \(r_3\), we have

\[\begin{align} \langle r_3\rangle &= \left(m_1 + m_2 + m_3\right)^2 \\ &= m_1^2 + m_2^2 + m_3^2 + 2\left(m_1m_2 + m_2m_3 + m_3m_1\right) \end{align}\]

It might look like things just got more complicated since we have 9 terms that we have to average over all 8 possible trajectories. The squared terms \(m_i^2\) are just 1 since \(m_i = \pm 1.\)

For the cross terms like \(m_1m_2,\) we can average over all possibilities: \(\langle m_1m_2\rangle = \frac14\left(1\times1 + 1\times -1 + -1 \times 1 + -1\times-1\right) = 0.\) This is true about all of the cross terms, so we end up with \(\langle r_3^2\rangle = 1 + 1 + 1 = 3.\) We can use the square root of this quantity, \(\sqrt{\langle r_3^2\rangle} = \sqrt{3}\approx 1.732,\) as our measure of displacement.

In general, this calculation shows that \(\langle r_n^2\rangle = n.\) The more common notation is to change the step number \(n\) to time \(t\) so that \(\sqrt{\langle r_n^2\rangle} = \sqrt{t}.\) Playing loose with notation, we could say that the position scales like the square root of time: \(r \sim \sqrt{t}.\)

[GIF of a cloud of random walkers with expanding circle and a circle representing the sample mean]

This is a neat result—despite the fact that each soccer ball has its own trajectory, we can capture the average motion of any given soccer ball. Moreover, the motion doesn’t follow a usual function of \(t\) like \(r \sim t\) for constant velocity motion, or \(r \sim t^2\) in a gravitational field, it follows a fractional exponent of time \(r \sim t^{\frac12}.\)

## Random walk - recap

As cool as it is, the road ends there. It is difficult to use this modeling approach to extract much more about the system. Moreover, we know it’s missing some essential ingredients of realistic random motions.

In the random walk, our ball has no sense of ballistic momentum in that its current velocity is completely independent of its velocity at previous times. In reality, we know that even if a series of impulses are random in nature, it takes time to change momentum. This leads us to expect some signature of prior dynamics in the current dynamics; instead we have perfect independence.

Another shortcoming is that every random move has the same magnitude—one unit up or downfield. In reality, we know that the soccer ball (or our Brownian particle) can experience impulses of different strengths, resulting in different jump sizes.

There’s no easy way to incorporate these features into the discrete modeling strategy of the random walk. Let’s see if we can find a way to keep moving.