Can the boy escape the teacher for a regular $n$-gon? This is related to Prove that the boy cannot escape the teacher
Suppose there is a boy in the center of a regular $n$-gon. The teacher is on the edge of the $n$-gon (but cannot leave the edge) and wants to capture the boy. At the beginning he is on a vertex. The teacher is $v(n)$ times faster than the boy. Which is the maximum $v(n)$ such that the boy can escape? (By escaping means he reaches the edge of the $n$-gon and the teacher is not there)
From the linked question we know $3 \le v(4) < 6$, and for $n= \infty$ (a circle) then I know a strategy such that $v(\infty) = \pi + 1$ suffice; I don't know if this is optimal. I also put convergence in the tags because my wild hypothesis is that the maximum $v(n)$ will converge to some value and it would be interesting to know which one!
Any cool way to solve this?
 A: This is an interesting question! I thought I would get the ball rolling by looking first at the case for the square pool (4-gon). 
A diagram:
 
The teacher is located at point $A$, the boy is in the center of the pool at point $E$. The square has the size $2x2$, the speed of the boy is arbitrarily set at $1$ and the speed of the teacher is $K > 1$. 
It is easy to check that if the boy swims directly to the corner furthest from the teacher (point $C$), $K=2 \sqrt2 \approx 2.83$ is sufficient for the teacher to catch the boy. A slightly better strategy for the boy is to swim perpendicular to the nearest pool side (furthest from $A$) which requires $K=3$. 
A much better strategy (although not quite the optimal, as I will show later) is the one illustrated in green in the diagram. The boy starts off by heading for the point furthest from the teacher (point $C$). The teacher must now also head for $C$ and can either go left towards $D$ or down towards $B$. Both paths are equally long. Let's assume he goes down (red line in diagram). The boy continues heading for $C$ until the teacher reaches point $G$. At this time, the boy and the teacher are equidistant from the horizontal centerline of the pool. More importantly, the teacher is now at the maximum distance from the point $H$ (mirror point of $G$). The boy now heads for $H$. It doesn't matter at this time whether the teacher turns around or continues in the direction he was going. The point $H$ is equally far away. 
Let us set up the equations for this scenario. Let $d_1$ be the distance to the horizontal centerline at the moment the boy heads for $H$. Let $t_1$ be the time since start. Then, for the teacher $$t_1 = \frac{1-d_1}{K}$$
and for the boy $$t_1= \frac{d_1}{\frac{1}{\sqrt2}}= \sqrt2d_1$$
Let the time for the boy to swim from $F$ to $H$ be $t_2$. Then $$t_2 = 1-d_1$$
For the teacher, the time to reach $H$ from $G$ would be $$t_2 = \frac{4}{K}$$
Solving these equations for $d_1$ and $K$, we find that $$K=2+\sqrt{2+2\sqrt2}\approx4.61$$
A substantial improvement of $K=3$. However, as I mentioned earlier, a further improvement exists. 
Suppose the boy doesn't wait for the teacher to reach $G$ before changing direction, but changes his direction as soon as he sees whether the teacher moves left towards $D$ or down towards $B$. Suppose he changes his direction (continuously) such that he is always heading towards the point on the square furthest from the teacher. The boy thus starts heading for the point $C$ but then heads more and more towards the pool side $CD$. What can the teacher do? He can turn around and head for the pool side $CD$ as well, but if he does, the boy will again change direction and head for the pool side $CB$, always aiming for the point on the square furthest from the teacher. The teacher gains nothing and is best served continuing his progress towards $B$. 
It was not intuitively clear to me what form the boy's curve would take in this scenario, so I simulated it. A close-up of the new path of the boy is shown below:

The green curve is the same as the green curve in the first diagram, while the purple curve is the new scenario. 
The result of the simulation is that in this scenario, $K\approx4.782$. 
The above is not a proof that no better scenario is possible and I invite suggestions on how such a proof could be made. And if anyone can work out what the analytical form of the curve is (it doesn't seem to be a circle or a parabola) that would also be much appreciated. 
The above scenario, by the way, would be directly applicable to all regular polygons with an even number of sides. 
EDIT
An old question revived! 
After reading the link provided by @David K in the comments, I think I can improve on my answer above.
Suppose we make an inner square in the pool with side length $\frac{2}{K}-\epsilon$, where $\epsilon$ approaches $0$. The boy's angular speed along the perimeter of this inner square will slightly outpace the teacher's angular speed along the perimeter of the outer square. Suppose further that the boy swims to the midpoint of a side on this inner square. The teacher will then run to the matching midpoint on the outer square and thus be as close to the boy as possible. If the boy now starts swimming along the perimeter of the inner square, he will slightly outpace the teacher as the teacher attempts to match the boy's position on the outer square. In fact, the boy can make shortcuts within the inner square which are not available to the teacher on the outer square. It therefore seems clear that the boy can eventually position himself wherever he wants on the perimeter of the inner square, in relation to where the teacher is. Let us now consider two scenarios for the teacher's position:


*

*The teacher is at the midpoint of side


The boy then positions himself at the midpoint of the inner square's side which is furthest from the teacher. The boy then swims straight for the nearest poolside. The time it takes him to reach this is: $$t_3 = 1-\frac{1}{K}$$
The time it takes for the teacher to reach the boy is: $$t_3= \frac{4}{K}$$
Setting these two equal gives: $$K=5$$
An improvement of my previous answer!


*The teacher is at a corner


The boy then positions himself at the opposite corner on the inner square. He then uses the basic strategy I gave in my old answer, i.e. he swims straight for the corner until the teacher reaches a position which is equidistant from the boy's nearest poolside, and then the boy swims straight for this poolside. Looking at the equations from my old answer, only one needs to be changed, namely the one for $t_1$: $$t_1=\frac{d_1-\frac{1}{K}}{\frac{1}{\sqrt{2}}}$$
which results in $$K^2-5K-\frac{4}{\sqrt{2}}=0$$
which gives a value of $K\gt 5$. The teacher will therefore not position himself at a corner. 
Summing up, the optimal answer for a square pool appears to be $$K = 5$$
A: See all the details here; they are too long for a MSE answer. In summary, suppose the pool occupies a regular $n$-gon $P$. Let $\theta=\pi/n$, and let
$K$ be the largest integer between $0$ and $n$ such that
$$
  \sin(K\theta)-(K+n)\tan\theta\cos(K\theta)
$$
is negative. Equivalently, $K$ is the floor of the unique root of
$\tan(x\theta)-(x+n)\tan\theta$ in $[1,n/2)$. Then
$$
  \cos((K+2)\theta)\leq\frac{2\sin(K\theta)}{(K+n)\tan\theta}-\cos(K\theta)<\cos(K\theta)
$$
so we can define
$$
  \alpha=\frac12\left(K\theta+\cos^{-1}\left(
    \frac{2\sin(K\theta)}{(K+n)\tan\theta}-\cos(K\theta)\right)\right),
$$
Then the cutoff speed is $\lambda=1/\cos\alpha$. Explicitly, for speeds
$<\lambda$ the student wins regardless of starting positions. For speeds
$>\lambda$ the teacher wins provided the student starts in a regular
$n$-gon $Q$, where $Q$ is obtained from $P$ by rotating by $K\theta$ and
scaling by
$$
  s=\frac{\cos\alpha}{\cos(\alpha-K\theta)}
$$
about the center of $P$.
As for a circular pool, the student must consider two cases in which the
teacher chases clockwise or anti-clockwise, and find the optimal path in
each. In fact from each vertex of $Q$ there are two equally optimal paths in each direction, as shown below (follow the link for other values of $n$).

For a square we have $K=1$, $\alpha\approx1.397$ and $\lambda\approx5.789$.
For large $n$, $\theta$ is small and $n\tan\theta\approx\pi$.
Thus $\alpha\approx K\theta\approx\mu$, where $\mu$ satisfies
$$
  \tan\mu=\mu+\pi.
$$
This agrees with the cutoff for a circular pool.
A: For convenience in notation I will write $v_n$ instead of $v(n).$
Let the teacher be able to run $v$ times as fast as the child can swim.
(Note that $v$ without a subscript is an arbitrary ratio of speeds, not necessarily a solution of the problem.)
Given an $n$-sided pool,
the teacher will follow some strategy for pursuing the child and the child will follow some strategy to try to escape the teacher.
Let $\tau$ be the time that passes from the moment the child reaches an edge of the pool at some point $P$ until the moment the teacher reaches the same point $P.$ If $\tau > 0,$ the child has escaped; if $\tau < 0,$ the teacher has caught the child.
We are looking for $v_n$ (if it exists) such that when $v$ is near $v_n,$ 
at each value of $v$ there is a value of $\tau$ such that the teacher cannot force a lower value of $\tau$ by choosing a different strategy, the child cannot force a higher value of $\tau$ by choosing a different strategy, $\tau > 0$ when $v < v_n,$ $\tau < 0$ when $v > v_n,$ and $\tau$ approaches zero as $v$ approaches $v_n.$
It should also be clear that the in the limiting case, as $v$ approaches $v_n,$ the child's path will not meet the edge of the pool at a right angle,
because by turning slightly away from the direction from which the teacher is approaching, the child can lengthen the teacher's path much more than the child's path is lengthened.
I claim the child's path will meet the edge of the pool at an angle $\alpha$ such that $\cos\alpha = \frac1{v_n},$ because that is the angle at which any further turn away from the teacher will add less than $v_n$ times as much to the teacher's path as to the child's path, whereas any turn toward the teacher will reduce the teacher's path by more than $v_n$ times as much as the child's path.
(Note that the child's best strategy for a circular pool also approaches the side of the pool at the same angle $\alpha.$)

Now let's consider the case $n=4$ (a square pool).
The limiting speed ratio $v_4$ is independent of the size of the pool,
so we can assume the side of the pool has length $2.$
Let's assume (for now) that the first part of the teacher's strategy is to arbitrarily choose one of the two sides adjacent to the starting vertex and run immediately to the center of that side,
as in the solution of "Prove that the boy cannot escape the teacher."
Without loss of generality, 
we an assume that the vertices of the square pool are at
$(1,1),$ $(1,-1),$ $(-1,-1),$ and $(-1,1),$ 
and that the teacher initially runs to $(0,-1).$
In the time that it takes the teacher to reach $(0,-1),$
the child swims to $\left(0, \frac1v\right).$
The child now swims along the $y$-axis in the positive direction.
As soon as the teacher starts to move, the child swims in nearly
the opposite direction, along a line with a small slope so that
the child's $y$-coordinate slowly increases.
For example, if the teacher runs to the right (increasing $x$ coordinate), 
the child swims left along a line with a small negative slope
(decreasing $x$ but slowly increasing $y$).
If the teacher were to start running immediately to the right and continue running around the pool in the same direction,
as the teacher passed the vertex $(1,-1)$ the child would change direction to swim along a line of slope
$\frac{1}{\sqrt{v^2 - 1}}$ toward the edge at $x=-1.$
The child would reach the side of the pool at a point whose $y$-coordinate was much smaller than $\frac1v.$
In order to reach this point, the teacher would run along half one edge of the pool,
two complete edges, and about half of another edge;
the teacher's relative speed would need to be $v\approx 5.9$ in order to catch the child.
But this is not the best strategy for the teacher.
The teacher's strategy will have to include a run from the edge at $y=-1$ to the edge at $y=1,$
traversing one of the other two edges in order to do so.
But suppose (for example) that the teacher runs through the vertex at $(1,-1);$
then if the child was not already close enough to the edge at $y=1$ to escape there,
the child will respond by swimming to a point with an $x$-coordinate near $-\frac1v.$
The child can then swim toward the edge at $x=-1$ along a line of slope $\frac{1}{\sqrt{v^2 - 1}}$ if the teacher continues toward the vertex at $(1,1),$
swim toward the edge at $y=1$ if the teacher heads back toward the vertex at $(-1,-1),$ or swim toward the vertex at $(-1,1)$ if the teacher remains at $(1,-1).$
The last two maneuvers increase the child's "lead," so the teacher must accept that at some point, the teacher will pass one of the two vertices on the edge at $y=-1,$ and if that vertex is $(1,-1)$ (for example) the child will swim toward the side at $x=-1,$ forcing the teacher to run "the long way around."
The teacher's best strategy is to force the child to reach one of the edges at $x=1$ or $x=-1$ at as great a $y$-coordinate as possible without making it more advantageous for the child to escape at the edge at $y=1.$
To do so, the teacher can simply stay still for a period of time while the child swims along the $y$-axis,
running to the left or right only if the child swims to the left or right.
During this "midgame" phase, neither the teacher nor the child has a motivation to unilaterally move away from the $y$-axis.
The child is deterred because the teacher will move in the same direction and reduce the maximum $\tau$ the child can achieve without returning to the $y$-axis;
the teacher is deterred because the child will move in the opposite direction and be closer to being able to trap the teacher into running the "long way around" while that way is still longer than it needs to be.
When the child reaches the point $\left(0, \frac{2}{\sqrt{v^2 - 1} + 1}\right),$ it becomes possible for the child to achieve the same $\tau$ by swimming toward the edge at $y=1$ (at an angle $\alpha,$ of course) as if the child could force the teacher to "run the long way around" while the child swamp to the edge at either $x=1$ or $x=-1.$ The teacher therefore has nothing to lose by immediately running around the edge of the pool (clockwise or counterclockwise), and so the teacher will do that.
Supposing the teacher initially runs toward $(-1,-1),$ the child will swim to 
$P = \left(\frac{\sqrt{v^2 - 1} - 1}{(\sqrt{v^2 - 1} + 1)\sqrt{v^2 - 1}}, 1\right).$
The child therefore swims a distance
$d_1 = \frac{v(\sqrt{v^2 - 1} - 1)}{(\sqrt{v^2 - 1} + 1)\sqrt{v^2 - 1}}$
while the teacher runs a distance
$d_2 = 4 + \frac{\sqrt{v^2 - 1} - 1}{(\sqrt{v^2 - 1} + 1)\sqrt{v^2 - 1}}.$
We have $\tau = 0$ when $d_2 = vd_1;$ solving for $v,$ we find that
$$
v = \sqrt{\frac52\left(7+\sqrt{41}\right)} > 5.788593.
$$
Unless there is a better strategy for the teacher, $v_4 > 5.788593.$
It does not seem there is a better strategy for the teacher, since allowing the child to reach either the line
$y = \frac{2}{\sqrt{v^2 - 1} + 1} + \frac{x}{\sqrt{v^2 - 1}}$
or $y = \frac{2}{\sqrt{v^2 - 1} + 1} - \frac{x}{\sqrt{v^2 - 1}}$
at $\left(x, \frac{2}{\sqrt{v^2 - 1} + 1} - \frac{|x|}{\sqrt{v^2 - 1}}\right)$ 
while the teacher is at $(-vx, -1)$
allows the child to escape to the edge $y=1$ whenever 
$v \leq \sqrt{\frac52\left(7+\sqrt{41}\right)},$ 
and any strategy except running to the center of an adjacent edge and
matching the "left" or "right" movement of the child
(in order to cut off escape routes on either side)
seems to allow the child to reach such a point
relative to whichever side of the square the teacher is on at the time.
This is a few steps short of a proof, however.
