detailed mathematical explanation of gravity