The equation for the relativistic doppler effect in a medium where waves travel at speed $c_m$ is $$\frac{f_r}{f_s} = \frac{c_m - v_r}{c_m-v_s}\frac{\gamma_r}{\gamma_s}$$
My question is whether this value stays invariant under velocity shifts as it does in the galilean case. That is we apply transformation, $v' = \frac{v-u}{1-\frac{uv}{c^2}}$ to the speed of waves, velocity of source and receiver and see if the equation stays the same. This doesn't seem at first glance to be true. If not, why?
Moreover let us consider the case of the doppler effect for light. The equation simplifies to $$\frac{f_r}{f_s} = \sqrt{\frac{(c-v_r)(c+v_s)}{(c+v_r)(c-v_s)}}$$ If we look carefully, we can see that this is equivalent to the standard 'correct' relativistic doppler equation 1 cited on this wikipedia page, compounded twice. To clarify, this is equivalent to a receiver in an intermediate frame transmitting another light beam of the frequency observed by them towards the receiver. Because of the constancy of $c$ this should give us the same value (if the equation were correct), right? But still it doesn't seem like the equation is actually invariant with velocity shifts. Which then implies a contradiction to the postulates of relativity.
Just to make sure I have everything in check, I will post my derivation of the equation below.
I have tried to derive the doppler effect equation the following way. Let there be 3 frames. The source frame $S$, the medium frame $S'$ and the receiver frame $S''$. The time period in $S$ is $\Delta t$ and the velocity of the source and receiver w.r.t $S'$ is $v_s,v_r$ respectively. Applying the inverse Lorentz transforms we go from $S$ to $S'$ to find
$\Delta t'=\gamma_s\Delta t$
$\Delta x'=\gamma_sv_s\Delta t$
The path of the two periodic disturbances in $S'$ is
$x=c_mt$ and
$x-\gamma_sv_s\Delta t = c_m(t-\gamma_s\Delta t)$
and the path of the receiver is $x = v_rt+\alpha$ where $\alpha$ is the displacement of the reciever from the source. Solving for the difference between the two solutions for the two times as the wave intersects the receiver in $S'$ gives us $\tilde{\Delta t'}= \frac{c_m-v_s}{c_m-v_r}\gamma_s\Delta t$, $\tilde{\Delta x'}= v_r\tilde{\Delta t'}$. Applying Lorentz transforms gives us $\Delta t'' = \tilde{\Delta t'}(1-\frac{v_r^2}{c^2})\gamma_r$ so $\Delta t'' = \frac{c_m-v_s}{c_m-v_r}\frac{\gamma_s}{\gamma_r}\Delta t$
So
$$\frac{f_r}{f_s} = \frac{c_m - v_r}{c_m-v_s}\frac{\gamma_r}{\gamma_s}$$
I believe this derivation should apply for light waves in any frame where we have the special case $c_m = c$. If this is the case, then it is necessary that the equation should be invariant under velocity shifts. That is, $v' = \frac{v-u}{1-\frac{uv}{c^2}}$