An Oscillating Pendulum

Initializing live version
Download to Desktop

Requires a Wolfram Notebook System

Interact on desktop, mobile and cloud with the free Wolfram Player or other Wolfram Language products.

The equation for a swinging pendulum is , where is the angle of the pendulum at time , is the acceleration due to gravity, and is the length of the pendulum arm. The linearized approximation replaces by , which is valid for small .


Plots are shown for both the linear (blue) and nonlinear (pink) solutions. These solutions are close for small initial angles but diverge as increases. The mass of the ball does not affect the equations governing the system so the response is the same, which might seem counterintuitive.


Contributed by: Stephen Wilkerson (March 2011)
(United States Military Academy West Point, Department of Mathematics)
Open content licensed under CC BY-NC-SA



This is the example An Oscillating Pendulum from [1], Section 1.4, Modeling with First Order Equations. The equation can be solved numerically using NDSolve in Mathematica.


[1] J. R. Brannan and W. E. Boyce, Differential Equations with Boundary Value Problems: An Introduction to Modern Methods and Applications, New York: John Wiley and Sons, 2010.

Feedback (field required)
Email (field required) Name
Occupation Organization
Note: Your message & contact information may be shared with the author of any specific Demonstration for which you give feedback.