Force to use in harmonic oscillation through the inside of a planet I am to find an equation for the time it takes when one falls through a planet to the other side and returns to the starting point. I have seven different sets of values - mass of object falling, mass of planet, radius of the planet, and time. I'm not including friction in the calculations.
I think this qualifies as a harmonic oscillator, and thus I work with the formula
$$T = 2\pi \sqrt{\frac{m}{k}}$$
To find the spring constant $k$ I need force $F$, and this is where I get uncertain. Should I work with the gravitational force between the object and the planet when the fall begins? In other words
$$F = G\times\frac{m \times M}{R^2}$$
When I try this I find that
$$F = kx \iff k = \frac{F}{x}$$
$$\iff k = \frac{G\times\frac{m \times M}{R^2}}{2R} = \frac{G \times m \times M}{2R^3}$$
$$\Rightarrow T = 2\pi \sqrt{\frac{m}{\frac{G \times m \times M}{2R^3}}} \iff T = 2\pi \sqrt{\frac{2R^3}{G \times M}}$$
Using this equation for the values I have, however, I get the wrong results - $T = 7148$ instead of $T = 5055$. What am I doing wrong?
 A: The key to this problem is the fact that the planet's mass $M$ as it appears in Newton's law of gravitation,
$$F=\frac{GMm}{r^2},$$
is not actually constant. This is because the layers of the planet that are above you cause zero net force: if you are inside of a hollow spherical shell of mass then diametrically opposite elements of solid angle exert equal forces in opposite directions.
Thus, the effective mass of the planet in this problem is only that of a sphere of radius $r$ and density $3M_0/4\pi R^3$, i.e. $M(r)=\frac{r^3}{R^3}M_0$. The force is then
$$F=\frac{GM_0m}{R^3}r$$ and it of course causes harmonic motion, with "spring constant" $k=GM_0m/R^3$.
A: The period is indeed $T = 2\pi \sqrt{m/k}$, when $k$ is the proportionality constant between displacement and force, as in your third equation. So far so good. Now, why did you replace $x$ with $2R$? $x$ is the displacement from equilibrium at which you evaluated $F$.
There are two ways to go. Either say leave $x$ unknown and evaluate $F$ in terms of it, or choose a value for $x$ and find the force in that particular case. Both methods should agree. In the former, you'll know you have a simple harmonic oscillator if the $x$-dependence drops out when you find $k = F/x$. If you choose the latter, remember what $x$ is: displacement from equilibrium. Where is the equilibrium position of your intra-planet traveler, and how far away from that point are you when you evaluate the force on said traveler?
