################################################################### def Force(x, v, t): """ This function defines the force acting on a simple pendulum """ # import libraries import numpy as np # constants (see homework writeup): # damping coefficient A = 0.1 # restoring force coefficient B = 2. # driving force ampitude and frequency C = 2.0 OMEGA = 1.2 F = -A * v -B * np.sin(x) + C * np.sin(OMEGA * t) return F ###################################################################