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](https://en.wikipedia.org/wiki/Relativistic_Doppler_effect#Relativistic_longitudinal_Doppler_effect) 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}}$