You can derive the relativistic Doppler shift from the Lorentz transformations. Let's start in the frame of the moving rocket, and let's take two events corresponding to nodes in the emitted wave (i.e. 1/$f$). Then in the rocket's frame the two events are (0, 0) and ($\tau$, 0), where $\tau$ is the period of the radiated wave. To see what the period of the radiation is in our frame we just have to use the Lorentz transformations to transform these two spacetime points into our frame.
For simplicity we'll take our rest frame and the frame of the rocket to coincide at $t = 0$. This is convenient because then the first event is just (0, 0) in both frames. Now the Lorentz transformations tell us:
$$ t' = \gamma \left( t - \frac{vx}{c^2} \right ) $$
$$ x' = \gamma \left( x - vt \right) $$
If we're tranforming from the rocket's frame to ours, and the rocket is moving at velocity $v$ wrt us, then we have to put the velocity in as $-v$, and we're transforming the point ($\tau$, 0). Putting these in the Lorentz transformations we find that the point ($\tau$, 0) in the rocket's frame transforms to the point ($\gamma \tau$, $\gamma v \tau$) in our frame.
The last step is to note that if we're sitting at the origin in our frame the light from the event at ($\gamma \tau$, $\gamma v \tau$) takes a time $\gamma v \tau/c$ to reach us. So the time we see the second event is $\gamma \tau + \gamma v \tau/c$ and this is equal to the period of the radiation, $\tau'$ in our frame:
$$ \tau' = \gamma \tau + \gamma v \tau/c $$
We just need to rearrange this to get the usual formula. Noting that $f'$ = 1/$\tau'$ and $f$ = 1/$\tau$ we take the reciprocal of both sides to get:
$$ f' = f \frac{1}{\gamma(1 + v/c)} $$
To simplify this note that:
$$\begin{align}
\frac{1}{\gamma} &= \sqrt{1 - \frac{v^2}{c^2}} \\
&= \sqrt{(1 - \frac{v}{c})(1 + \frac{v}{c})}
\end{align}$$
and substituting this back in our expression for $f'$ we get:
$$\begin{align}
f' &= f \frac{\sqrt{(1 - v/c)(1 + v/c)}}{1 + v/c} \\
&= f \frac{\sqrt{(1 - v/c)}}{\sqrt{1 + v/c}} \\
&= f \sqrt{\frac{c - v}{c + v}}
\end{align}$$
and presto it's proved!
If the car with the siren runs you over you won't be hearing anything after it "passes". By definition the line of travel of the sound source must it intersect the observer. But if you write down the expression for frequency vs time as a function of distance of closest approach you will see that in the limit where that distance becomes zero, the step gradient becomes infinite.
For a perpendicular distance $d$ between the path of the source and the observer, with $t=0$ at the point of closest approach, and velocity of sound $c$, you can write the frequency as
$$f'=f\left(1-\frac{v(vt)}{c\sqrt{(vt)^2+d^2}}\right)$$
As $d$ goes to zero you can see the fraction flips from +1 to -1, giving you the "instant" change when the sound source overruns (coincides with) the observer.
For the derivation, see the following diagram, and find an expression for the relative velocity $v\sin\theta$ as a function of time, the substitute into the classical Doppler equation.
The key step to note is that the velocity towards the observer, $v\sin\theta$, can be found from
$$v_{relative}=v \sin\theta = v \frac{vt}{\sqrt{(vt)^2) + d^2}}$$
Here is a plot of the above equation for a few different values of $d$, the closest distance. As you can see, when the object is coming "almost" straight at you (10 cm closes approach), the frequency (nominally 440 Hz) shifts "instantly" (limited by time resolution of the calculation):
Rewriting the Doppler equation for $d=0$, you get simply
$$f' = f\left(1-\frac{v \text{ sign}(t)}{c}\right)$$
To understand this intuitively, you need to think about the fact that when the source is heading straight towards the observer, the amount by which the distance decreases per unit time is the same. So the next wave is emitted from "closer up", which is why it arrives " a little bit sooner than expected from the frequency". But at that point you can reset your timer, and the next wave again arrives "a little bit sooner than expected" - in other words, each crest arrives "too soon", but by the same amount. That is why the pitch does not change as the source gets closer in the case of the head-on trajectory. For any other trajectory, the component of velocity of the source towards the observer decreases as you get closer, and the pitch gradually decreases.
Best Answer
Consider, by analogy, a small, fast boat sitting almost motionless in the open ocean.
It's moving just fast enough to maintain steerage way, and keeps moving slowly with a following sea. The waves approach from behind, lift the stern and then the bow; the boat moves up and down with a frequency very close to the stationary frequency of the waves.
Now you advance the throttle and start moving away from the moving waves more quickly. The waves catch up, but at a lower frequency than before. Just what you would expect from the Doppler effect.
Eventually, your boat is travelling at the same speed as the waves in the water. The boat is suspended, motionless in terms of moving relative to the waves. Visualize a surfer, keeping just ahead of the peak of the breaking wave. A somewhat precautious situation.
Now, if the boat speeds up even more, it is now not just fleeing the waves. It is catching up with and passing the waves ahead of it. It experiences waves coming from bow to stern with increasing frequency as it goes faster and faster.
Because surface water waves move so slowly, most boats today operate in this "supersonic" regime. No matter how the boat twists and turns, the waves always seem to be coming from ahead, and the boat is designed to handle this one situation.