# Elastic potential energy in vertical simple harmonic motion

When we calculate gravitational potential energy, we use a reference point as a zero-line. That is, we set the gravitational potential energy to zero at a specific point (usually the ground). Now, does the same principle apply to elastic potential energy in vertical harmonic motion? Can we set the elastic potential energy to zero at some point, similiar to gravitational potential energy?

Yes, we usually choose the elastic potential energy to be zero at $$x=0$$. The elastic potential energy is: $$E_{p}=\frac{1}{2}kx^2+C$$ The absolute value of the potential energy is not important, only the change in potential energy has physical significance. Thus, we are free to give this constant any values we want. At $$x=0$$ the potential energy is $$C$$. It is convenient for us to just choose this constant to be zero.
Another example is electrostatic potential energy. In this case, we set potential energy to be zero at infinity (when the distance between changes tends to $$r\rightarrow\infty$$).