# [Physics] A function for calculating velocity at several distances as you fall towards the earth’s center

earthgravityintegration

Assuming there is no drag, no friction and no other objects affecting you. If you drop into the earth (through a tube). Your velocity will be 7900 m/s at the center of the earth according to http://hyperphysics.phy-astr.gsu.edu/hbase/mechanics/earthole.html

I assume that was the summation of all the velocity gained as gravitational force changes/decreases such as v= (9.8* first nano-meter traveled) + (9.7…*next nano-meter traveled)+…+(0*last nano-meters traveled)

I am sure there is a way to write a function using calculus (integration) that calculates your velocity at every point as you get closer. Lets approximate the earth's radius is 6,371 km and the acceleration due to gravity on the earth's surface is 9.807 m/s^2.

I will like a function that calculates your velocity at every given distance from the earth center as you fall.

This is a surprisingly simple thing to calculate.

It is a well known result that a consequence of the inverse square law is that there is no force inside a symmetrical hollow shell. This means that as the object falls into the hole, it will appear to be attracted by a sphere of decreasing radius - the mass outside "doesn't count."

The acceleration of gravity at the surface of a sphere of radius R (assuming uniform density $\rho$) is given by

\begin{align} a &= \frac{GM}{R^2} \\ &= \frac{4G\pi R^3\rho}{3R^2} \\ &= \frac43\pi \rho G R\\ \end{align}

Where $G$ is the gravitational constant, and $R$ is the distance to the center of the earth. In other words - the acceleration is proportional to the distance to the center. The corollary is that an object dropped into a hole through the center of the earth will exhibit simple harmonic motion.

Let's do the math in more detail. Put the distance from the center as $r$, then the acceleration $\frac{d^2r}{dt^2}$ is given by

$$\frac{d^2r}{dt^2}=-\frac43 \pi \rho G r$$

(since the acceleration is pointing towards the center). This looks like the differential equation for simple harmonic motion:

$$\frac{d^2x}{dt^2} = -\omega^2 x$$

for which the solution (if velocity is zero at t=0, and amplitude is $x_0$) is

$$x(t) = x_0 \cos\omega t$$

and the velocity is

$$v(t) = -\omega x_0 \sin\omega t$$

It follows that we can write the expression for the velocity as a function of position by eliminating time:

\begin{align}\\ v(x) &= -\omega x_0 \sin \cos^{-1}\left(\frac{x}{x_0}\right)\\ &= -\omega x_0\sqrt{1-\left(\frac{x}{x_0}\right)^2}\end{align}

If we now substitute $\omega^2 = \frac43 \pi \rho G = \frac{g}{R}$ where $g$ is the gravitational acceleration at the surface of the earth, we get

\begin{align}\\ v(r) &= -\sqrt{\frac{g}{R}} R \sqrt{1-\left(\frac{r}{R}\right)^2}\\ &=\sqrt{\frac{g}{R}\left(R^2-r^2\right)} \end{align}

If we substitute $r=R$, we get $v=0$ as expected; and when we put in $r=0$, we get $v = \sqrt{gR}$ = 7904 m/s using your values for $R$ and $g$. I think that's pretty close...