# Energy conservation, and mgh

1. Feb 28, 2008

### rsala

my question is, when using energy conservation when do i put the potential energy of gravity negative? if its under where it set my potential energy to 0? or am i wrong, is gravity's potential energy always positive (except at my set u=0 point) ?

can someone explain this to me, having trouble getting ANYthing done because i do not understand how to set up these homework questions

for example, this is a ball pushed into a barrel, compressing the spring, ball has initial velocity 0
here are the values,
k = 667 N/m
mass of ball = 1.5kg
ball is pushed into tube .25 meters

if u=0 is set at the mouth of the barrel, then the initial potential energy is mgh+.5kx^2?
or is it -mgh+.5kx^2? -mgh-.5kx^2?

Last edited: Feb 28, 2008
2. Feb 28, 2008

### Feldoh

You get to define where the potential energy is 0. Everything above that is positive, below that negative.

3. Feb 28, 2008

### rsala

what about the springs energy is that negative as well?
meaning if i set the muzzle of the gun to be potential energy 0,, is the total potential energy at the compressed initial part
-mgh-.5kx^2?

4. Feb 28, 2008

### Feldoh

Yup, because you also defined the springs 0 potential energy mark at y=0

5. Feb 28, 2008

### rsala

im trying to find the velocity once it is at y=0 (once it leaves the gun)
i am setting

$$-mgh - \frac{1}{2}kx^{2} = \frac{1}{2}mv^{2}$$

i solve this for v and i receive

$$\sqrt{\frac{2(-mgh-\frac{1}{2}kx^{2})}{m}}$$

here are the values,
k = 667 N/m
mass of ball = 1.5kg
ball is pushed into tube .25 meters

i am placing -.25 into the formula since it is below the muzzle, anyone see where i went wrong?

Last edited: Feb 28, 2008
6. Feb 28, 2008

### Feldoh

U = mgh+.5kx^2

You get the negatives from the the springs compression and the height, you didn't use
-mgh-.5kx^2 THEN also set x=-.25 did you?

7. Feb 28, 2008

### rsala

yes i did, i just tried again with correct negatives i think (i see where i went wrong last time)
and i got answer: 3.38m/s, wrong still though

$$mgh + \frac{1}{2}kx^{2} = \frac{1}{2}mv^{2}$$

Last edited: Feb 28, 2008
8. Feb 28, 2008

### Feldoh

That would be the problem:

$$\sqrt{\frac{2(mgh+\frac{1}{2}kx^{2})}{m}}$$

Where x=-.25

9. Feb 28, 2008

### kamerling

The potential energy of the ball is +mgh. If the ball is below th etop of the barrel, h is negative, so mgh will then be negative. The elastic energy of the spring is always equal to +kx^2/2 if its unstretched position is at the top of the barrel.

10. Feb 28, 2008

### rsala

jesus wrong again, i got 22.89166 m/s this time, lol

i have used
$$\sqrt{\frac{2(mgh+\frac{1}{2}kx^{2})}{m}}$$
---
$$\sqrt{\frac{2((1.5)(9.8)(-.25)+\frac{1}{2}(667)(-.25^{2}))}{1.5}}$$

o nvm i forgot the sqrt, i got correct answer now! 4.784

thank you feldoh, kamerling

Last edited: Feb 28, 2008
11. Feb 28, 2008

### rsala

4.784 m/s once it leaves muzzle
solved now though, i didnt know how to properly set any of the initial and final energies, so i couldn't solve it initially, i got it now though.
thanks again

12. Feb 28, 2008

### Feldoh

Ah, that's good. I was beginning to think I just made up everything I told you since it's been a while since I've done that lol XD