At your table, discuss what it means for a system to be chaotic.
Try to come up with two answers to each question to share.
Exhibits Periodic and Chaotic Behavior
Illustrates period doubling bifurcations as route to chaos
Exhibits sensitive dependence on initial conditions
Demonstrates the concept of a strange attractor
solve_ivp
We will start with the damped driven pendulum as an example. This will illustrate how to use solve_ivp
to solve a system of coupled first-order differential equations.
We can rewrite this as two first-order equations:
solve_ivp
To use solve_ivp
, we write a function for the derivatives:
def damped_driven_pendulum(t, y, beta, A, omegaD=1):
theta, omega = y
dtheta_dt = omega
domega_dt = -np.sin(theta) - beta * omega + A * np.cos(omegaD*t)
return [dtheta_dt, domega_dt]
solve_ivp
Now we can use solve_ivp
to solve the system of equations:
# Parameters that define the system
beta = 0.5
A = 1.0
omegaD = 2*np.pi
# Time span for the simulation
t_span = (0, 100)
# Initial conditions: [theta, omega]
y0 = [6, 0]
# Time points where we want the solution
t_eval = np.linspace(t_span[0], t_span[1], 10000)
# Solve the system of equations
solution = solve_ivp(damped_driven_pendulum, t_span, y0, args=(beta, A, omegaD), t_eval=t_eval)
Long Term Behavior is Periodic
"Period-1" Dynamics is a term to indicate there's a single frequency governing the motion
Phase space plots can provide a better window into the system's behavior