Simulation, Physics, Numerical Methods, Classical Mechanics, Computation.
function into code and simulate a simple pendulum over time. def simple_pendulum(theta_0, omega, t, phi): theta = theta_0*np.cos(omega*t + phi) return theta #parameters of our system theta_0 = np.radians(15) #degrees to radians g = 9.8 #m/s^2 l = 1.0 #m omega = np.sqrt(g/l) phi = 0 #for small angle