I = 1 w = 2*pi dt = 0.05 num_periods = 5 P = 2*pi/w # one period T = P*num_periods u, t = solver(I, w, dt, T) visualize(u, t, I, w, dt)