Moving Source

We have a source that is putting out sound waves with a velocity $v$, frequency $f$, and wavelength $\lambda$. A receiver detects the waves at a distance from the source. The receiver will measure the time between pulses, $\delta t$, and that will be the period of the received wave. Since everyone is stationary, $\delta t=T$ and the receiver measures the same frequency $f$.

But what happens if the source is moving towards the receiver with a velocity $u$, like a moving police car that has the siren on? The siren emits waves every $T$ seconds, but in the stationary rest frame of the receiver, the distance between those waves will decrease. This is because once the siren emits one wave, it then travels a distance $\delta x=uT$ before emitting another, so the wavefronts will be closer together.

In the simulation below, the source is yellow and the receiver blue. The source is moving with a velocity that is half the velocity of the waves. Periodically, at the period $T$, the source emits a red wavefront, and it propagates at some velocity $v$ but the center stays at the same place it was when the wave started. Start the simulation, and stop when the source has emitted several wavelengths. Notice the difference in the distance between wavelengths in the direction towards and away from the blue receiver. You can then reset, and change the velocity of the source. If you make the source move faster, the distance between the wavelengths towards the receiver decreases even more. That's the doppler shift - the wavelength $\lambda_R$ as measured by the receiver gets smaller, so the frequency seen by the receiver $f_R=v/\lambda_R$ gets bigger, a positive shift in frequency. And behind the source, the frequency will get smaller as the wavelength gets bigger.

$v=5,u=$  1