# Gravitational Redshift

I want to calculate the gravitational redshift for schwarzchild spacetime. If we take the emitter(source of light) and observer stationary, how can be redshift found?

Frequency seen by observer : $$w=-u^ik_i$$ u-four velocity, k-four wave vector

$$\lambda_o=\lambda_e\frac{\sqrt{1-\frac{2GM}{r_oc^2}}}{\sqrt{1-\frac{2GM}{r_ec^2}}}$$
here $$\lambda_o$$ is perceived wavelength by the observer, $$\lambda_e$$ is the perceived wavelength at the emitter $$r_o$$ is distance from the center of the gravitational field do the observer and $$r_e$$ is distance from the center of the gravitational field to the emitter.
In general relativity the energy of an object at rest in a spherically symmetric gravitational field can be written as: $$E=mc^2\sqrt{1-\frac{2GM}{rc^2}}$$. You can look at the graviational redshift/blueshift as a consequence of this. I guess you can derive the blueshift/redshift formally somehow.