Here we will obtain or derive an expression for the potential energy stored in the spring, also known as the elastic potential energy. To get this equation, we’ll calculate the work done to stretch or compress a spring that obeys Hooke’s law. Hooke’s law states that the magnitude of force F on the spring and the resulting deformation ΔL are proportional, F = kΔL, where k is a constant. We, therefore, derive the equation of the potential energy of a spring, also known as the elastic potential energy as follows: PE=(1/2)kx2 where k is the spring’s force constant and x is the displacement from its undeformed position.elastic potential energy represents the work done on the spring and the energy stored in it as a result of stretching or compressing it a distance x . The potential energy of the spring PEs does not depend on the path taken; it depends only on the stretch or squeeze x in the final configuration.