when a ray of light passes from rarer to denser medium , its frequency remains same but wavelength changes . why?
As, you mentioned in description that speed of light is constant, its not true . It changes when light moves from one medium to another.
Velocity (V) of light is dependent on wavelength (?) and frequency (f). Frequency is the number of crests that pass a given point in one second and is expressed in hertz (Hz).
The frequency of light is the same in every medium. This means that if the velocity of light changes, the wavelength must also change. As a consequence, light traveling from air into an optically denser medium will travel at shorter wavelengths inside that medium.