It is a common textbook question to treat the root mean square velocities of an ideal gas as given by the following equation: $$v_\text{rms}=\sqrt{\frac{3RT}{M}}$$ I was wondering about the validity of this equation, particularly as it applies to gases that are not monatomic. For example, in the following question from Zumdahl et al., it says:
Calculate the root mean square velocities of $\ce{CH4}$ and $\ce{N2}$ molecules at $\pu{273 K}$ and $\pu{546 K}$.
The answer key gives $\pu{652 m/s}$ for methane at $\pu{273 K}$, $\pu{493 m/s}$ for nitrogen at $\pu{273 K}$, $\pu{922 m/s}$ for methane at $\pu{546 K}$, and $\pu{697 m/s}$ for nitrogen at $\pu{546 K}$. These were all calculated with the equation $$v_\text{rms}=\sqrt{\frac{3RT}{M}}$$
Why is this equation valid for all ideal gases? Shouldn't it be $$v_\text{rms}=\sqrt{\frac{6RT}{M}} \text{ for methane}$$ (because there are $3$ rotational degrees of freedom in addition to $3$ translational degrees of freedom), and $$v_\text{rms}=\sqrt{\frac{5RT}{M}} \text{ for nitrogen}$$ (because there are $2$ rotational degrees of freedom)?
If my thoughts are not true, then why is it commonly reported that the average molar specific heat of an ideal monatomic gas (at constant volume) is $3/2RT$, that of an ideal diatomic gas is $5/2RT$, and that of a nonlinear gas is $3RT$?