Assuming this is possible, we will end up with an object that swings back and forth from one end of the hole to the other while attaining its maximum speed at the core of the Earth.

We can use the fact that "Loss in potential energy = gain in kinetic energy" to calculate the speed at which the object is traveling at a distance r from the core of the Earth. And how do we calculate this loss in potential energy? We can use the expression for gravitational force experienced by the object underground at a distance r from the center of the Earth which is F = m \frac{4 \pi G \rho r}{3} where \rho is the density of the Earth (read https://physics.stackexchange.com/questions/18446/how-does-gravity-work-underground for more details).

Loss in potential energy = \int_R^r m \frac{4 \pi G \rho x}{3} dx = \frac{2 \pi G \rho R^2}{3} - \frac{2 \pi G r^2}{3}

Gain in kinetic energy = \frac{1}{2} m v_r^2 where v_r is the speed of the object at a distance r from the core.

Therefore, v_r = \sqrt{ \frac{4 \pi G \rho R^2}{3} - \frac{4 \pi G \rho r^2}{3} } and the speed at the core v = \sqrt{ \frac{4 \pi G \rho R^2}{3} } .

Essentially, the object starts at rest, hits a maximum speed of v = 2 R \sqrt{ \frac{\pi G \rho}{3} } at the core and proceeds to the other end of the hole, comes to a stop and then doubles back. This will go on *ad infinitum*.

Hai, it is a interesting question.

Practically it's not possible.

We know that, if you go deep into earth the temperature and pressure will increases 2 degrees per kilometer.

Now we have to imagine that the earth is cool in the middle because otherwise the object will just vaporise with the temperature and the pressure. When the ball reaches the center of the earth, and the mass above it would equal to the mass below it. This means the force of gravity will be pulling it equally from all around, so the gravity force cancel out and there is no net force.

This is not perfect answer, we have to consider few more variables. Still I have to look at it I will give you a clear answer.