Simple 2-D Doppler Shift

Motivation

Develop a simple formula for Doppler shift where the trajectory of the sound source is not in the direction of the (stationary) listener, e.g., when standing beside (not on!) railroad tracks.

Standard Doppler shift  of a train whistle at a distance going past a stationary listener

First, define speed of sound c and speed of sound source u as 1/2 the speed of sound.

c=341; u=c/2;

The standard physics textbook definition for Doppler shift where the listener is stationary can be written in these equivalent forms:

(c/(c-u))==(1/(1-(u/c)))

Define Doppler shift :

Dop[c_,u_]:=(c/(c-u))

If the train whistle is 1000 Hz, then for c and u defined above:

f=1000;
N[f Dop[c,u]](* train approaching at 1/2 speed of sound *)

Pitch is shifted up an octave.

f=1000;
N[f Dop[c,-u]] (* train departing at 1/2 speed of sound *)

Pitch is shifted down a fifth.

Doppler shift  of a train whistle at a distance going past a stationary listener.

What if the train is not on a collision path with the listener?  Assume it is on a straight track some distance from the (stationary) listener's position.

The component of  velocity in the direction of the listener is proportional to the hypotenuse of a right triangle with sides:
 d -- distance of listener to track
 x -- position of the train whistle along the track

V[x_,d_]:=((2ArcTan[-x,d])/π)-1

In the far field (d is large), the Doppler shift is gradual.   When d==0, the train goes through the listener's head (ouch!) and Doppler shift is abrupt.

Show[
Plot[V[x,50],{x,100,-100}],
Plot[V[x,5],{x,100,-100}],
Plot[V[x,0],{x,100,-100}],PlotRange->All ]

Plugging V into the Doppler shift formula:

f=1000;
Plot[f Dop[c,u V[x,10]],{x,1000,-1000}]

If we set d=0, the train again goes through the listener's head and the formula gives the same frequency shift as for simple Doppler shift:

Plot[f Dop[c,u V[x,0]],{x,1000,-1000}]

Conclusion :

Combining Dop and V, we have:

Dop1[c_,u_,f_,x_,d_]:=f(c/(c-u(((2ArcTan[-x,d])/π)-1)))

Plot[Dop1[c,u,f,x,10],{x,1000,-1000}]

Compare to eq. (7.26), Musimathics V1, p. 232. There is an error in this equation as published: the term u must be outside the parentheses.