The ant on a rubber rope
Wikipedia actually provides a decent description of problem.
Ant on a rubber rope is a mathematical puzzle with a solution that appears counterintuitive or paradoxical. It is sometimes given as a worm, or inchworm, on a rubber or elastic band, but the principles of the puzzle remain the same. The details of the puzzle can vary,[1][2][3] but a typical form is as follows:
An ant starts to crawl along a taut rubber rope 1 km long at a speed of 1 cm per second (relative to the rubber it is crawling on). At the same time, the rope starts to stretch by 1 km per second (so that after 1 second it is 2 km long, after 2 seconds it is 3 km long, etc). Will the ant ever reach the end of the rope? At first consideration it seems that the ant will never reach the end of the rope, but in fact it does (although in the form stated above the time taken is colossal). In fact, whatever the length of the rope and the relative speeds of the ant and the stretching, providing the ant's speed and the stretching remain steady the ant will always be able to reach the end given sufficient time.
I modified the variable names used in Wikipedia to make the problem easier to read.
Consider a thin and infinitely stretchable rubber rope held taut along the
-axis with a starting-point marked at
and a target-point marked at
.
At time
the rope starts to stretch uniformly and smoothly in such a way that the starting-point
remains stationary at
while the target-point
moves away from the starting-point with constant speed
.
A small ant leaves the starting-point at time
and walks steadily and smoothly along the rope towards the target-point at a constant speed
relative to the point on the rope where the ant is at each moment.
Will the ant reach the target-point?
According to the definition for the problem, the equation for position of the ant on a rubber rope is a first order linear differential equation:
A key observation is that the speed of the ant at a given time
is its speed relative to the rope, i.e.
, plus the speed of the rope at the point where the ant is. The target-point moves with speed
, so at time
it is at
. Other points along the rope move with proportional speed, so at time
the point on the rope at
is moving with speed
. So if we write the position of the ant at time
as
, and the speed of the ant as
, we can write:

We can solve this nonhomogeneous linear differential equation using
Integrating Factors. We begin by rewriting the differential equation in the form:
where
and the integrating factor is
After working the method, we arrive at:
Now we have to find the value for

that satisfies our initial condition

:
After substituting

back into our general solution and simplifying the result, we arrive at the following equation for the position of the ant at time

:
However, it is extremely difficult using the above equation to determine the value of

that will tell us how much time it took the ant to complete the journey. If you read the
ant on a rubber rope problem in Wikipedia, they offer a different method that will allow us to solve for

.
A much simpler approach considers the ant's position as a proportion of the distance from the starting-point to the target-point.[3] Consider coordinates
measured along the rope with the starting-point at
and the target-point at
. In these coordinates, all points on the rope remain at a fixed position (in terms of
) as the rope stretches. At time
, a point at
is at
, and a speed
relative to the rope in terms of
is equivalent to a speed
in terms of
. So if we write the position of the ant in terms of
at time
as
, and the speed of the ant in terms of
at time
as
, we can write:

where
is a constant of integration.
Now,
which gives:
, so 
If the ant reaches the target-point (which is at
) at time
, we must have
which gives us:


As this gives a finite value
for all finite
,
, and
. This means that, given sufficient time, the ant will complete the journey to the target-point. This formula can be used to find out how much time is required.
For the problem as stated,

,

, and

, which gives

.
Therefore, the time it takes the ant to reach the end of the rope is:
Substituting this time into the function for the position, we find the distance the ant traveled is: