# Marble gun - how far to compress string

1. Oct 30, 2005

Hi, Please , take a look at this problem:
A child is trying to shoot a marble of mass m in order to hit the center of a box using a spring loaded marble gun.
The marble gun is fixed on a table and shoots the marble horizontally from the edge of the table. The edge of the table is a height h above the top of the box. The center of the box is some horizontal distance d away from the table. the spring constant is k. By what distance x should the child compress the spring so that the marble lands in the center of the box?. g is the gravitational constant.

In the solution , the manual used the conservation of mechanical energy.( I got this part).
My problem is that I don't understand why they did not use the potential energy PE=mgh
They wrote Eo=1/2*k*x2=1/2*m*v12=E1
They solved for v1, and the they used the projectile equation to find x ( by finding t)
My problem is why for the conservation of energy, they did not write:
Eo=mgh+1/2*k*x2
I saw that in other problems solutions tough!
Thank you

2. Oct 30, 2005

### Physics Monkey

You can write the total energy of the marble while compressed as
$$E_i = mgh + \frac{1}{2} m v^2_y + \frac{1}{2} k x^2,$$
and after the gun has fired as
$$E_f = mgh + \frac{1}{2} m v_x^2 + \frac{1}{2} m v^2_y,$$
if you want. The simplification here is that the vertical velocity $$v_y$$ (which is zero initially) and height $$h$$ don't change while the marble is being ejected from the spring gun, right? So when you equate energy before and after, the gravity term and the vertical kinetic energy term just cancel out since they haven't changed. Thus, you can leave them out in the first place if you want, but only because they don't change during the process you are considering (the initial acceleration of the ball). Make sense?

3. Oct 30, 2005