The Wronskian

In [1]:
palette = [(215/255, 0/255, 132/255), (255/255, 1/255, 73/255), (255/255, 121/255, 1/255), (255/255, 210/255, 0/255)]
cool_palette = [(0/255, 150/255, 173/255), (0/255, 200/255, 146/255)]
shade = (2/3, 2/3, 2/3)
phase_labels = ['$x$', '$x\'$']
def animate_phase(frames, size): return animate(frames, xmin = -size, xmax = size, ymin = -size, ymax = size, aspect_ratio = 1, axes_labels = phase_labels)
In [3]:
def harmonic_1(t): return vector([cos(t), -sin(t)])
def harmonic_2(t): return vector([sin(t), cos(t)])
harmonic_frames = [arrow((0, 0), harmonic_1(t), color = palette[0]) + arrow((0, 0), harmonic_2(t), color = palette[2]) + polygon([(0, 0), harmonic_1(t), harmonic_1(t) + harmonic_2(t), harmonic_2(t)], color = shade) for t in srange(0, 2*pi, pi/200)]
harmonic_movie = animate_phase(harmonic_frames, sqrt(2))
harmonic_movie.show(delay = 10)
In [2]:
def friction_1(t): return vector([exp(-t)*cos(3*t), exp(-t)*(-cos(3*t) - 3*sin(3*t))])
def friction_2(t): return vector([exp(-t)*sin(3*t), exp(-t)*(-sin(3*t) + 3*cos(3*t))])
friction_frames = [arrow((0, 0), friction_1(t), color = palette[0]) + arrow((0, 0), friction_2(t), color = palette[2]) + polygon([(0, 0), friction_1(t), friction_1(t) + friction_2(t), friction_2(t)], color = shade) for t in srange(0, pi, pi/200)]
friction_movie = animate_phase(friction_frames, 3)
friction_movie.show(delay = 10)