Period of oscillation through a hole in the earth Special mention to the QI episode that kicked this off: 
Anyway, the host points out that a tunnel that connects a pair of points on the earth's surface can be thought of as a gravity train - where the force of gravity along the tunnel allows an object to fall through it and emerge on the other side. Any force perpendicular to the tunnel (in case the tunnel doesn't pass through the center of the earth) is ignored. 
I worked it out and the equation is $a = -\frac{4}{3}\pi\rho G d$, where $d$ is the distance from the center of the tunnel and $\rho$ is the density of the earth. 
Clearly, it is simple harmonic and therefore the period is constant and has no dependence on which two points were used to make the tunnel. 
Does anyone have an intuition for why this should be the case? I imagine some Gauss' law type of argument should work here, but I cannot see it.
EDIT: More to the point, why even when the tunnel does not pass through the center, one obtains the same period. Is there any deeper explanation as to why this should be the case?
 A: The fact that the period of the gravity train that passes through the center of the Earth is equal to the period of an orbit that skims the Earth's surface is not a coincidence. Consider a polar orbit around Earth (i.e., one that passes directly over the coordinate north and south poles). Now, consider only the north-south motion of the satellite by projecting the motion onto a line parallel with the Earth's axis. What kind of motion is this? Circular orbits have a constant speed, so the 1-D motion must be sinusoidal. The gravity train is just a circular orbit where the motion off the Earth's axis is restricted. Perpendicular forces and motions can be treated independently. See the animation below to illustrate. The spinning arrow shows the path of a satellite, while the straight lines show the path of the gravity train for perpendicular tracks.

Now, what about gravity trains that don't pass through the Earth's center? First, notice that your expression for the acceleration of the train does not depend on the distance from the Earth's center. As long as the track is symmetric about the Earth's radius, then you will get the same train motion no matter the depth of the track. The ends of the track do not have to connect to the surface. You can also reason that the depth of the gravity train track does not matter by starting with a track that connects to the surface at both ends and then adding a shell around the entire planet to increase its radius. Inside a spherical shell, the gravitational force is zero, so burying the track does nothing to the motion.
To start to demonstrate this, let's prove a similar fact about circular orbits: the period of an orbit that skims a planet's surface depends only on the planet's density, not its size.
$$F = m\frac{v^2}{R} = \frac{GMm}{R^2}$$
where $F$ is the gravitational force, $m$ is the mass of the satellite, $M$ is the mass of the planet, $v$ is the speed of the orbit, $R$ is the radius of the planet, and $G$ is the gravitational constant.
$$v^2 = \frac{GM}{R}$$
$$\left(\frac{2\pi{}R}{T}\right)^2 = \frac{GM}{R}$$
where $T$ is the period of the orbit.
$$T = \sqrt{\frac{4\pi{}^2R^3}{GM}}$$
$$T = \sqrt{\frac{4\pi{}^2R^3}{G\rho\frac{4}{3}\pi{}R^3}}$$
$$T = \sqrt{\frac{3\pi}{G\rho}}$$
where $\rho$ is the density of the planet.
Now, starting from your expression for the train acceleration:
$$a = -\frac{4}{3}\pi\rho{}Gd$$
we can derive an equivalent mass-spring system(*) with a spring constant $k$ given by
$$k = \frac{F}{d} = \frac{ma}{d} = \frac{4}{3}\rho{}Gm.$$
The period of this mass-spring system, and thus of the train, is
$$T = 2\pi\sqrt{\frac{m}{k}} = \sqrt{\frac{4\pi^2m}{\frac{4}{3}\pi\rho{}G}} = \sqrt{\frac{3\pi}{\rho{}G}}$$
Notice that this is the same period as the satellite.
TL;DR: The gravity train is a 1D projection of the 2D circular orbit where the length of the train track is the same as the diameter of the orbit. The time to traverse the track is the same no matter the length or the depth because the period of a surface-skimming orbit around a constant-density planet is independent of the size of the planet.
(*) Everything is physics is ultimately a mass on a spring.
A: As non-intuitive a sit may seem, the period of a simple spring is independent of how far you pull or push it. How could the time it takes for one oscillation be independent of the amplitude? 
Imagine a vertical spring with a bob, like so: 

Now, the first picture shows the spring displaced by y units, so that $$ky=mg$$
The second image shows it being diplaced in the x direction as well so that $ky=mg$ still holds, but the spring force is a vector along the length of the spring so there is an unbalanced component in the x direction$=kx$
The exact same thing is happening in the tunnel. The force on a mass in the tunnel is along the displacement vector from the center of earth to the mass, but the component perpendicular to the tunnel is balanced by the normal force from the walls of the tunnel, and only the component of the displacement vector parallel to the tunnel is responsible for accelerating the mass. 
So where does that leave us? Pretend that there is a spring along the length of the tunnel. Irrespective of which chord (read: independent of amplitude) the tunnel is in a circular cross-section (refer to Naveen Balaji's picture) the spring will have the same period. You can do the same thing for the spring with the bob: pretend that there is a spring along the x-axis.
I hope this gives you some intuition.
A: Assuming Earth to be a uniform sphere of mass M and radius R. Now constructing a tunnel which connects any two points on its surface. Suppose at some instant the particle is at radial distance r from the centre of earth, O. Since the particle is constrained to move along the tunnel, let us define its position as distance x from C. Hence, the equation of motion of the particle is,
$$ma_{x}=F_{x}$$
The gravitational force on mass m at distance r is,
$$F=\frac{GMmr}{R^3}$$ (towards O, the centre of the Earth)
Hence,
$$F_{x}=-Fsin\theta$$
$$=\frac{-GMmr}{R^3}\frac{x}{r}$$
$$=\frac{-GMmx}{R^3}$$
Since, $F_{x}\alpha-x$, it's motion is simple harmonic in nature. Further,
$$ma_{x}=\frac{GMmx}{R^3}$$
$$a_{x}=\frac{GMx}{R^3}$$
Hence the time period of oscillation is ,
$$T=2\pi\frac{\sqrt{x}}{\sqrt{a_{x}}}$$
$$T=2\pi\frac{\sqrt{R^{3}}}{\sqrt{GM}}$$
Hence time take for a particle to go from one end to another is,
$$t=\frac{T}{2}=\pi\frac{\sqrt{R^{3}}}{\sqrt{GM}}= 2530.496126seconds=42.17mins$$
So a particle or a person of mass m would tunnel 34 times a day!

It would be interesting to do the same for the original shape of Earth and see the deviation of the time taken for a particle to go through the tunnel.
A: Picture instead a frictionless pendulum with two beads attached that are constrained to remain at two different, fixed heights. Their period remains the same as in the case of beads glued to the pendulum shaft, only now, their motion is restricted to one dimension. While the situation involving Earth and gravity seems to involve more dimensions, the relevant components reduce to this same problem once you've established the linear relationship through the center of the planet.
A: EDIT: Here is an attempt at an intuitive explanation for the special case when the tunnel passes through the center of the earth. For the general case, refer to the other solutions that have been provided.  Think of the solid sphere of earth to be composed of many thin concentric hollow shells each of same density $\rho$. Now if the train is at a distance d from the center of the earth, the gravitational force exerted by the shells having radius greater than d on the train will be zero(The train is in the inside of these shells). Only the shells having radius less than d will exert a force on the train. The total mass of these shells will be proportional to $d^3$ (as these shells form a sphere of radius d). The center of this sphere is at a distance d from the train. 
Now $\hspace{5cm}$
g $\propto M/d^2$
And as we have seen $\hspace{5cm}$
M $\propto d^3$
we get$\hspace{5cm}$ g = kd for some constant of proportionality d.
This means that the acceleration due to gravity is proportional to the distance of the train from the center of the earth and this is exactly the kind of acceleration that we get in the case of a linear oscillator.
