Two trains A and B are moving with speeds 20 m/s and 30 m/s respectively in the same direction on the same straight track, with B ahead of A. The engines are at the front ends. The engine of train A blows a long whistle.
Assume that the sound of whistle is composed of components varying in frequency from f1 = 800 Hz to f2 = 1120 Hz as shown in the figure. The spread in the frequency (highest frequency - lowest frequency) is thus 320 Hz. The speed of sound in still air is 340 m/s.
The speed of sound of the whistle is