To derive the redshift effect use the geodesic equation for a light wave which is where ds is the spacetime interval. When a beam of white light strikes a triangular prism it is separated into its various components ROYGBIV. However in many contexts such as black holes and Big Bang cosmology redshifts must be calculated using general relativity.
Relativistic Redshift - This is used in place of the Doppler formula when the velocities become too large to be accurately represented by the regular Doppler formula typically any velocities greater than 10 the speed of light.
Where l is understood to be l emitted l rest in the rest frame of the emitter. A is the time-dependent cosmic scale factor. A special relativistic redshift formula and its classical approximation can be used to calculate the redshift of a nearby object when spacetime is flat. Special relativistic gravitational and cosmological redshifts.