# Hanging Mass on Spring

1. Feb 11, 2010

### atarr3

I'm having a little trouble understanding the concept of energy for a hanging spring. Suppose I have a system with a mass that is attached to a hanging spring and then is released, causing the mass to oscillate. I'm trying to determine the equation for potential energy, but I'm thrown off by signs.

I'm using the concept that potential is the negative integral of force.

I set my initial position of the spring to be be y0 = 0, so when the mass is attached, we're moving in the negative y direction. This leads me to believe that my bounds for integration should be from -y to y0.

$$\int (kx + mg)dy$$ from -y to y0 would give me $$- \frac{1}{2}ky^{2}+mgy$$ if I substitute in y0 = 0.

I guess my question is if I would be correct in integrating from -y to y0 in order to find potential as a function of position, or if I should integrate from y0 to y like I'm traditionally used to.

2. Feb 11, 2010

### near

it's never been a problem from which to which you'll integrate as long as you are consistent with the symbols and convention that you are using.

3. Feb 11, 2010

### atarr3

Ok that's what I thought thank you so much!