# Which way should you run from the lions?

This is a fun problem that I saw somewhere on the internet a long time ago:

Suppose you are at the center of an equilateral triangle with side length $s$. At each of its vertices, there is a lion which is determined to eat you. The lions start at a constant speed of $v_l$, and they are always running directly towards your current location. You start in the center, and can run at a constant speed $v_h$ (assume instantaneous acceleration for all parties). You are NOT enclosed in the triangle, you are free to try to run wherever you want. Which patch should you take in order to survive the longest time possible? How long can you survive?

At first, because everybody's speed is constant, I thought we can just work with functions of $x$ for the paths of the lions and the human, and try to maximize the arc length of the lions' paths. However, I think it's much easier to work with the functions in parametric form, because the tangent lines to the lions' path at $t=t_0$ should go trough your position at $t_0$. Also, I think it's reasonable to assume that at $t=0$ your direction is straight towards the midpoint of one of the sides, because any other direction would cause you to meet one of the lions faster.

• Wait - there are also tigers? :) – Hagen von Eitzen Jun 1 '16 at 5:39
• It was bad enough with the lions trying to eat you ... – Zubin Mukerjee Jun 1 '16 at 5:40
• @HagenvonEitzen Haha at first it was tigers but I decided to make it lions for extra motivation to increase $v_h$! – Ovi Jun 1 '16 at 5:41
• by path you mean straight line or any arbit path? – avz2611 Jun 1 '16 at 5:44
• If you are faster than the lions any direction except directly towards one of the vertices should lead to indefinite escape, right? – Zubin Mukerjee Jun 1 '16 at 5:44

For the case I mention above (the man and the lions have same speed, otherwise the answer is obvious), let us pick the person in the centre of the triangle and running towards the middle of one side, and the lion just above him starting to run towards the person with same speed. Using a reference frame in which the man is still, and complex numbers to describe the lion position, one can write for $z=\rho e^{I \phi}$: $$\dot z = -v e^{I \phi} -v$$ (where $v$ is the speed). We can rescale distances in units of the side of the triangle $L$ and time in units of $L/v$, to get the dimensionless $$\dot z=-1-e^{I \phi}$$, from where: $$\dot \rho =-(1+\cos \phi) \\ \rho \dot \phi =\sin \phi.$$
The solution to this equations are: $$\rho = \rho_0 ( \frac{\sin\frac{\phi}{2}}{\sin\frac{\phi_0}{2}} )^2$$ and $$\log\tan^2\frac{\phi}{2}-\frac{1}{\sin^2\frac{\phi}{2}} \Bigg\vert_{\phi_0}^{\phi}=\frac{2t}{\rho_0 \sin^2\frac{\phi_0}{2}},$$ where $t$ is the time (starting from $0$), $\rho_0=1/\sqrt 3$, and $\phi_0=\pi/3$.
Note from the last equation, that we need to solve for $\phi =\phi(t)$. This is possible if we notice that $\sin^2$ can be expressed as function of $\tan^2$ and we solve for $\tan$ using the Lambert W-function. With it, we can obtain $\rho=\rho(t)$ from the above solution $\rho=\rho(\phi)$.
The solution obtained using the above and validated by integrating the complex ODE equation with the Runge-Kutta method of order $4$ give for the trajectory of the lion (remember that the man sits still at the origin of the complex plane):