differential equations travel through the center of the earth my friends and i were working on a project but cant get the same answer.
assume an object is dropped into the tunnel from one side of the earth and falls straight through to the other side. Set up a differential equation to calculate the position of the object (relative to the center of the earth). Assume there is no propulsion or friction and the only force is gravity.
since you are not staying on the surface gravity will not be constant, the distance between you and the center will be changing. Also since you will be inside the planet you will only be affected by the gravity of the part of the planet “below” you, so if you are halfway to the center the mass pulling you will be the mass of a planet the same density as the earth but half the radius (so one eighth the mass.)
I know that I will end up with a linear, homogeneous second order differential equation.
 A: You find the answer here (starting from page 297 - see also the exercises).
The motion is a simple harmonic one with the period not depending on the position of the tunnel (which doesn't need to pass through the center of the Earth). All this happens because, as Cameron Williams says, the effective force is proportional to the distance $x$ of the object from the center of the tunnel: so gravity works inside the Earth (assuming uniform density).
The differential equation is of the type $$\ddot x+k\,x=0\quad(k>0)$$
A: This is a classical physics problem that has a very neat solution. Using Newton's Law of Gravitation you have that at some distance $ x $ the force due to gravity is:
$$ F(x) = -\frac{GMm}{x^2} $$
setting this to be equal to the acceleration experienced by the object of mass $m$ you have:
$$ mg(x) = -\frac{GM(x)m}{x^2} $$
$$ g(x) = -\frac{GM(x)}{x^2}$$
The Earth can be thought to have a constant density so we have that the mass bounded by a radius $x$
$$ M(x) = \rho V(x) = \rho \frac{\frac{4\pi x^3}{3}}{\frac{4\pi R^3}{3}} = \rho \frac{x^3}{R^3} $$
Where $ R $ is the radius of the Earth.
Setting this into the equation for gravity you have:
$$ g(x) = -\frac{\rho G}{R^3}x $$
$$ \ddot{x}(t) = -\frac{\rho G}{R^3}x(t) = -kx(t) $$
This is a classical periodic motion equation which has the solution:
$$ x(t) = A\cos(\omega t + \phi) $$
Where $ \omega = \sqrt{\frac{\rho G}{R^3}} $. Settig two conditions $
x(0) = R $ and $ \dot{x}(0) = 0 $ you have the final solution:
$$ x(t) = R\cos\omega t $$
