Using the Euler Method to Simulate a Chaotic Pendulum

An example of a simple pendulum is a rod that is fixed on one end while the other end is free to swing back and forth due to gravity. The motion of a simple pendulum is very regular and predictable; a plot of the angle of the pendulum vs time produces as sine curve. However, when forces other than just gravity are included, the swinging of the pendulum is able to exhibit chaotic behavior. To produce a pendulum that exhibits chaotic behavior, two additional forces can be incorporated: a damping force, which represents friction and slows the pendulum down, and a driving force, which can be thought of as a motor that pushes the pendulum with a specific force at regular time intervals. When both of these forces are introduced, the swinging of the pendulum is no longer a simple sine curve. A pendulum that is influenced by a damping force and driving force is said be be chaotic because it has the following two properties: Common characterics of chaotic systems is that, even though they are deterministic, they sometimes appear to move randomly and unpredictably. A second characteristic is that two systems that are under similar conditions and appear be comparable end up in vastly different states; this is due to the sensitivity to the initial conditions and the fact that even small differences end up making large impacts. The classic example of chaotic systems is the weather. People around the world forecast weather based on the current weather conditions. However, even though the weather in the future is determined by the current conditions of the atmosphere, it is very difficult to predict the weather just seven days into the future.
Length of Pendulum
Damping Constant
Drive Force
Drive Frequency
Initial Theta
Initial Omega
Time Step (Smaller values give better precision)