Gravitational Time Dilation
Gravitational Time Dilation
One of the most striking predictions of General Relativity is that gravity slows time. A clock deep in a gravitational well ticks more slowly than a clock far away. This is not a measurement artifact — it is a real physical effect confirmed to extraordinary precision by atomic clocks, GPS satellites, and the Pound–Rebka experiment.
The Formula
For a clock at radius from a mass (outside the event horizon, ), compared to a clock at infinity, the time dilation factor is:
Equivalently, one local second () corresponds to a longer interval at infinity:
The factor tells you how much the remote observer's time is stretched relative to the local clock.
GPS Satellites
GPS satellites orbit at km. Because they are higher in Earth's gravitational field, their clocks run faster than clocks on the surface by about s per day due to gravitational dilation (partially offset by the special-relativistic slowdown from orbital speed). Without GR corrections, GPS would drift by kilometres per day.
Your Task
Implement these functions with all constants defined inside each function:
time_dilation_factor(M, r)— returns , the factor by which a remote observer sees the local clock run slowtime_at_infinity(dt_local, M, r)— returns the elapsed time at infinity for a local intervalgravitational_time_shift(dt_local, M, r)— returns the extra time at infinity: