Problems 7.1, 7.2, 7.3, 7.4
For problems 7.2 and 7.3, I used Cython to speed up the integration routines. These are in this Cython file.
I used JQuery and SVG to implement the interactive driven pendulum. Grab the controls at left to play with driving frequency, driving amplitude, and pendulum length. Angular momentum is conserved when pendulum length is changed, and I add some damping. Javascript is here and CSS is here.