The restoring force in a simple mass-spring system is F = −kx. Find the equations for Potential and Kinetic energy. Plot them on the same axes for arbitrarily chosen values of k, m, and A, and for t = 0 to T (where T is the period of the spring) and plot their sum. Comment.
And a reminder, for a spring mass system:
import matplotlib.pyplot as plt # for ease of use
import numpy as np # for the needed math functions
plt.rcParams['figure.figsize'] = 12.5,10 # default plot size