Pendulum motion simulation
What is this?
This interactive canvas demonstrates a simple pendulum, modeled using the Euler method for numerical integration.
Deriving the physics of pendulum motion
Consider an ideal mathematical model of a pendulum. A point mass, is suspended from a fixed pivot point by a rigid, weightless rod. Newton's second law of motion can then be used to find the force acting on the mass. The law states that "The net force on an object is proportional to the acceleration and the mass m of the object." Formulated as:
Two forces act on the bob: the tension in the rod and the force of gravity. The tension force exerted by the rod is cancelled by the component of gravity acting along the rod. This is easily seen when the pendulum is at rest in the vertical position. Because the bob is restricted to move in a circle, the gravitational force can be split into tangential and radial components. Only the tangential component is of interest, since the radial is cancelled by tension, and can be derived using trigonometry:
Where g is the gravitational acceleration, and theta is the angle between the rod and the vertical. The negative sign indicates that this force acts to restore the pendulum to its equilibrium position.
Arriving at the motion of a pendulum
The motion of the pendulum is defined by the angle , in radians. The distance moved by the bob is given by the arc length , where l is the rod length. The angular velocity is the time derivative of distance, and the angular acceleration is the time derivative of the velocity:
Using the previous force equation, we finally arrive at the second order differential equation describing the motion of a simple pendulum:
Because of the sine function, this is a non-linear second order ordinary differential equation. It is difficult to solve, and a solution cannot be written using elementary functions (continuous in their domain). Thus, for practical purposes, numerical methods like Euler or Runge-Kutta methods can be used to simulate the pendulum motion.