Kernel: Python 3 (system-wide)
Methodology
1 Simple Pendulum
1.1 Required Packages
To model the simple pendulum we require three packages. Numpy as np to ... matplotlib.pyplot as plt to allow us to plot our results and from scipy.integrate import odeint to allow us to solve ODEs.
In [1]:
1.2 SHM function
We convert the simple harmonic motion (SHM) ODE of a pendulum into two, first order ODEs.
We define the angular velocity as omega(t) = theta'(t)
z'(t) = -(g/L)*(sin(theta(t)))
In [10]:
1.3 inital conditions and plotting results
In [11]:
1.4 Plotting Results
In [8]:
Out[8]:
In [0]: