A battalion 20 miles long advances 20 miles.

During this time, a messenger on a horse travels from the rear of the battalion to the
front and immediately turns around, ending up precisely at the rear of the battalion
upon the completion of the 20-mile journey. How far has the messenger traveled?

An interesting problem!

We have to realize that the speed of the battalion is irrelevant. It is the ratio of the speed of the messenger, with respect to the battalion that matters.

Assume the battalion's speed is 1 mph, thus we look for the speed of the messenger y mph.

Time for messenger to go to the front,
t1= 20 miles / (y-1)
Time for messenger to go back to the rere,
t2 = 20 miles / (y+1)

So the messenger has advanced (t1-t2)y miles over the mission, or
y(t1-t2)=20
20y/(y-1)-20y/(y+1) = 20
y cannot be 1 (or he'll never catch up), so we can multiply both sides by (y-1)(y+1) to get:
20y(y+1)-20y(y-1) = 20(y-1)(y+1)
Simplifying
y²-2y-1=0
Solve the quadratic to get:
y=1+√2

Check:
y(20/(y+1)-20/(y-1))=20 OK.

Solve for total distance travelled
= y(t1+t2)

(approx. 48.3 miles)

To solve this problem, we need to consider the distance traveled by the messenger on the horse.

The battalion is 20 miles long, and the messenger starts at the rear and travels to the front, which is also 20 miles. So, the messenger travels a total distance of 20 miles to reach the front of the battalion.

After reaching the front of the battalion, the messenger immediately turns around and heads back towards the rear. Since the messenger traveled the same 20 miles again, the distance traveled by the messenger from the front to the rear is also 20 miles.

Therefore, the messenger has traveled a total distance of 20 miles to reach the front of the battalion and an additional 20 miles to return to the rear.

So, the messenger has traveled a total of 20 + 20 = 40 miles.

To determine how far the messenger has traveled, we need to understand their movement during the battalion's advance.

Let's break down the scenario step by step:

1. Initially, the messenger is at the rear of the battalion.
2. As the battalion advances 20 miles, the messenger also moves forward with them.
3. When the battalion completes its advance, the messenger decides to turn around and head back towards the rear.

Since the messenger ends up precisely at the rear of the battalion, we can conclude that their forward movement while the battalion advanced was canceled out by their backward movement when they turned around. Therefore, the distance the messenger traveled is equal to twice the distance covered by the battalion.

Given that the battalion advanced 20 miles, the messenger traveled 2 * 20 miles = 40 miles in total.