## 2440.79 – There's a Train in that Tunnel

A freight train 1 mile long goes through a tunnel 2 miles long. The train is traveling 15 mph. How long does it take to pass entirely through the tunnel?

Generalize your answer, that is, find a formula that gives the time for a train $n$ miles long to pass through a tunnel $m$ miles long traveling at $r$ miles per hour.

## Solution

The engine of the train travels the two miles of the tunnel in $2/15$ of an hour. At the moment the engine begins to emerge, the end of the train is halfway through. It goes the extra mile in $1/5$ of an hour. The whole train is out of the tunnel in $3/15$ of an hour, or $12$ minutes.

The same reasoning works in general. For the engine to begin to emerge from the tunnel takes $m/r$ hours: $m$ miles at $r$ mph. For the end of the train to emerge takes another $n/r$ hours: $n$ miles at $r$ mph. The total time required: $(m + n)/r$.