Why is this calculation of average speed wrong?

The reason is because the time taken for the two trips are different, so the average speed is not simply $\frac{v_1 + v_2}{2}$

We should go back to the definition. The average speed is always (total length) ÷ (total time). In your case, the total time can be calculated as

\begin{align} \text{time}_1 &= \frac{120 \mathrm{miles}}{40 \mathrm{mph}} \\\\ \text{time}_2 &= \frac{120 \mathrm{miles}}{60 \mathrm{mph}} \end{align}

so the total time is $120\mathrm{miles} \times \left(\frac1{40\mathrm{mph}} + \frac1{60\mathrm{mph}}\right)$. The average speed is therefore:

\begin{align} \text{average speed} &= \frac{2 \times 120\mathrm{miles}}{120\mathrm{miles} \times \left(\frac1{40\mathrm{mph}} + \frac1{60\mathrm{mph}}\right)} \\\\ &= \frac{2 }{ \left(\frac1{40\mathrm{mph}} + \frac1{60\mathrm{mph}}\right)} \\\\ &= 48 \mathrm{mph} \end{align}

In general, when the length of the trips are the same, the average speed will be the harmonic mean of the respective speeds.

$$ \text{average speed} = \frac2{\frac1{v_1} + \frac1{v_2}} $$


$$\mathrm{Average\ Speed = \frac{Total\ Distance}{Total\ time}}$$

So basically,

$t_1 = 120/40 = 3\ hrs$

$t_2 = 120/60 = 2\ hrs$

Total time $= 5\ hrs$

Total distance = $240$ miles

Average speed$ = 240/5 = 48\ mph$


The difficulty is that since the trip at 40mph takes longer, you spend more time going 40mph than you do going 60mph, so the average speed is weighted more heavily towards 40 mph.

When calculating average speeds for fixed distances, it is better think of everything in minutes per mile rather than miles per hour.

60 miles per hour is 1 minute per mile, while 40 miles per hour is 1.5 minutes per mile. Since we travel the same number of miles at each speed, we can now take the mean of these two figures. That's 1.25 minutes per mile on average. For 240 miles total, 240miles*1.25minutes/mile = 300 minutes = 5 hours.

This method is called finding the "harmonic mean" of the speeds.