The Calculus of Explanations

Putting the fun in functionals


The Four Mice Problem

Four mice are initially sitting at the corners of a unit square. At the same time, each of the mice begin running with equal speed directly toward the mouse on their right. How far do the mice travel?

From the Wikipedia page

Consider the mouse beginning at the origin, which we chose to be bottom left corner of the square, once she has travelled some way along the path. At this point, the mouse to her right has travelled along the same path but rotated 90 degrees counter clockwise.

We can use the symmetry of the situation to find a derivative using some geometry, which will help us determine the shape of the mouse’s path.

The mouse at A runs directly towards the mouse on its right.

We will focus on the mouse at point A. The slope of the blue line is the rise over the run, so we find the derivative

\displaystyle  \frac{\mathrm{d}y}{\mathrm{d}x}=\frac{x-y}{1-x-y}

We can consider this a differential equation to solve for y(x), the path of the mouse. However, this looks like a slightly intractable non-linear equation.

We’ll perform the common maths trick of (seemingly) making the problem look harder in order to make progress. We can use the power of the chain rule to introduce a new variable, t, which we can consider to be the time after the mouse’s journey begins, and note that

\displaystyle \frac{\mathrm{d}y}{\mathrm{d}x}=\frac{\mathrm{d}y / \mathrm{d}t }{\mathrm{d}x / \mathrm{d}t}.

We can now break this into two separate equations,

\begin{aligned} \displaystyle \frac{\mathrm{d}y}{\mathrm{d}t} &= x-y \\ \displaystyle \frac{\mathrm{d}x}{\mathrm{d}t} &= 1-x-y \end{aligned}

This is a system of two equations in x and y, but crucially they are now first order linear differential equations.

Let’s use Laplace Transforms to solve this system of equations. Define the transforms Y(s) = \mathscr{L}\{y(t)\} and X(s) = \mathscr{L}\{x(t)\}, then the system transforms into

\begin{aligned} sY(s) - y(0)&= X(s)-Y(s) \\ sX(s) - x(0) &= \frac{1}{s}-X(s)-Y(s) \end{aligned}

Since this particular mouse begins at the origin, we have x(0)=0 and y(0)=0. Solving the system of now algebraic equations we find that

\begin{aligned} Y(s)&= \frac{1}{s(s^2+2s+2)} \\ X(s)&= \frac{s+1}{s(s^2+2s+2)} \end{aligned}

Performing some Partial Fraction Decomposition, we can write these as

\begin{aligned} Y(s)&= \frac{1}{2s} - \frac{1}{2} \, \frac{s+1}{(s+1)^2+1} - \frac{1}{2} \, \frac{1}{(s+1)^2+1}\\ X(s)&=  \frac{1}{2s} - \frac{1}{2} \, \frac{s+1}{(s+1)^2+1} + \frac{1}{2} \, \frac{1}{(s+1)^2+1} \end{aligned}

Inverting the transforms we obtain parametric equations for the mouse’s path

\begin{aligned} y(t)&= \frac{1}{2} - \frac{1}{2} \, \mathrm{e}^{-t}\cos{t} - \frac{1}{2} \, \mathrm{e}^{-t}\sin{t}\\ x(t)&= \frac{1}{2} - \frac{1}{2} \, \mathrm{e}^{-t}\cos{t} + \frac{1}{2} \, \mathrm{e}^{-t}\sin{t} \end{aligned}

While we could trace out the path as defined above, we know that the mice have velocity vectors that are perpendicular at any point in time, and so we can get an idea by simply looking at squares that have been scaled and rotated. These images are sometimes called “whirls”, curves created by a series of straight lines.

Edmund Harriss/Visions of Numberland

How far does the mouse travel? The journey will take an infinite amount of time, as our mice spiral towards the centre of the square, but we can still calculate the total distance using the arc-length formula,

S =\displaystyle \int_0^{\infty} \sqrt{\left(\frac{\mathrm{d}x}{\mathrm{d}t}\right)^2 + \left(\frac{\mathrm{d}y}{\mathrm{d}t}\right)^2} \, \mathrm{d}t

Since x'(t) = \mathrm{e}^{-t}\cos{t} \quad and \quad y'(t) = \mathrm{e}^{-t}\sin{t}, the total distance travelled is

S =\displaystyle \int_0^{\infty} \sqrt{\mathrm{e}^{-2t}\cos^2{t} + \mathrm{e}^{-2t}\sin^2{t}} \, \mathrm{d}t = \displaystyle \int_0^{\infty} \mathrm{e}^{-t} \, \mathrm{d}t = 1,

the same distance as the side length of the square.

The extension of this problem to other regular polygons is quite natural, and makes for some pretty animations, which I stole from Wolfram Mathworld.

In general, for a regular polynomial with n sides, the mice each travel a distance

d_n =\displaystyle \frac{1}{1 - \displaystyle \cos \left(\frac{2\pi}{n}\right)}

If you’re interested in these extensions and the use of Laplace transforms, here is a very thorough student report covering both.



Leave a comment

Hi there! I’m a creator with a background in maths education and a passion for making complicated ideas simple, with gorgeous animations and visual explanations.

Whether you’re just entering high school or you’re a post-grad student, or just have an interest in maths in general, I aim to make content that can appeal to everyone, in the form of videos and blog posts.

You can find all my previous posts here.

Check out my YouTube channel for more maths education content.