The force in a spring is given by Hooke's law, $F=kx$, where $k$ is the spring constant and $x$ is the displacement from the spring's natural length. Therefore, the work done on the spring is given by the integral of $kx$ over the displacement, or
Show more…