When the source of waves and a detector are moving with respect to each other, the frequency of the detected wave is shifted from the frequency of the emitted wave (Doppler shift). The effect of this is to increase the detected frequency when the source and detector are approaching each other and to decrease the detected frequency when they are receding from each other.
In two or three dimensions this is complicated, but in one dimension the formula is relatively simple:
where fdet is the detected frequency, vs is the speed of the wave in the medium, vdet is the speed of the detector, vem is the speed of the emitter, and fem is the emitted frequency. Choose the sign in the numerator to reflect the direction the detector is going (negative if approaching), and choose the sign in the denominator to reflect the direction the emitter is going (positive if approaching).
A fast train (50 m/s) is moving directly toward Samuel, who is standing near the tracks. The train is emitting a whistling sound at 420 Hz. The speed of sound is 350 m/s at the outdoor temperature of 31˚ C.
What frequency does Samuel hear?