$${A = -\left(\frac{k x_2^2}{2} - \frac{k x_1^2}{2} \right)}$$