$${\frac{mv^2}{2} = \frac{kl^2}{2} - mgl}$$