+
Finite Difference Method and Simple Pendulum

Developed by Scott Scharlach - Published July 17, 2025

DOI: 10.1119/PICUP.Exercise.FDMFA

This exercise teaches the Finite Difference Method to first-year undergraduate students in physics. It is part of a three-item set that includes: a lecture script for introductory physics students on the Finite Difference Method, a laboratory exercise for modeling motion with non-constant acceleration (to be completed in-class), and a homework assignment modeling the motion of a large-angle pendulum (to be completed outside of class). The laboratory exercise uses Google Sheets as the default software, as it is accessible for new students.
Subject Areas Mechanics and Mathematical / Numerical Methods
Level First Year
Available Implementation Spreadsheet
Learning Objectives
* Derive a discrete equation able to be iterated upon (Exercise 1) * Determine and understand initial conditions (Exercise 2) * Model motion with non-constant acceleration using spreadsheets (Exercise 3) * Create a graph to display data (Exercise 4) * Compare angular motion and linear motion (Exercise 5) * Contrast a numerical solution with a constant-acceleration approximation (Exercise 6).

These exercises are not tied to a specific programming language. Example implementations are provided under the Code tab, but the Exercises can be implemented in whatever platform you wish to use (e.g., Excel, Python, MATLAB, etc.).

## Setup (This homework assignment is intended to be given following the lecture on the Finite Differences Method and the laboratory exercise on falling objects in non-constant gravitational fields, as outlined in the Theory section.) We have a simple, massless, rigid pendulum rod of length L in Earth's gravity. The mass at the end of the rigid rod is therefore constrained to move in a circle. Let $\theta$ = 0 be directly beneath the pivot, with angular values increasing counterclockwise around the pivot. The pendulum's equation of motion is: $ \frac{d^2\theta}{dt^2} = - \frac{g}{L} \sin(\theta) \; . \; (26) $ (The instructor is encouraged to have the students derive the equation of motion for a simple, rigid pendulum on their own, but it is stated here for completion's sake.) The pendulum is released from an initial angle of $\theta$ = 3.13 radians. ## Exercise 1 Show that Equation 26 can be discretized and written as: $ \theta_{n+1} = 2 \theta_n-\theta_{n-1}-\frac{g}{L}\sin(\theta_n) \Delta t^2\; . \; (27) $ Hint: pay careful attention to Equation 10, Equation 11, and Equation 16 in the "Theory" section. ## Exercise 2 Given that $\theta_0$ = 3.13, explain conceptually why $\theta_1$ = 3.13. ## Exercise 3 Create a digital spreadsheet (or code) modeling the motion of the mass. The spreadsheet should allow the user to change the values of $g$, $L$, $\theta_0$, $\omega_0$, and $\Delta t$, with the computer updating the spreadsheet upon changing the values. ## Exercise 4 Include a graph plotting $\theta(t)$ vs. $t$. Your graph should resemble Figure 4. ![](images/FDMFA/LargePendulum-1.png "") ## Exercise 5 (Extra-credit) Create a graph modeling the horizontal position of mass $x(t)$ vs. t. $\theta(t)$ and $x(t)$ are related by: $\sin \big( \theta(t) \big) = \frac{x(t)}{L}. $ $\Rightarrow x(t) = L \sin \big( \theta(t) \big) \; . \; (28)$ ## Exercise 6 Returning to the Falling Astronaut Problem described in the lecture, calculate the time the astronaut would take to fall to the surface of the Earth from an initial height of $1.0000 \times 10^{7}$ m and an initial speed of $0$ m/s if the acceleration were a constant $9.8$ m/s$^2$. How different is your answer compared to the more precise solution given in the lecture? ## Tips If you have completed the laboratory exercise outlined in the Theory section, consider the following tips: Tip 1: Optionally, you may begin your new spreadsheet by opening the spreadsheet for the Falling Astronaut Problem from the recent lab, click, "Files," then click "Make a Copy" to duplicate your presentation. Thus, you can create your spreadsheet for the large-angle pendulum by modifying an existing spreadsheet rather than beginning from scratch. Tip 2: The amount of time $t$ a one-meter-long pendulum takes to make one full oscillation is probably much less than 1263 seconds, and so our time step $\Delta t$ should be much smaller than 0.5 seconds. Try experimenting with different values, such as 0.01 s. Tip 3: The vertical axis is measuring angular position $\theta$, and so the values will be within the range $- 2 \pi \le \theta \le 2 \pi$. Pay careful attention to the minimum and maximum values on the vertical axis that have been set, if any, as the vertical axis values in this new graph will be much less than 6371000. Tip 4: Remember that $\theta_2$ and beyond will be defined by Equation 28, $\theta_0$ is typed in by hand, and $\theta_1$ is defined by the technique described in Section 1.6.

Download Options

Share a Variation

Did you have to edit this material to fit your needs? Share your changes by Creating a Variation

Credits and Licensing

Scott Scharlach, "Finite Difference Method and Simple Pendulum," Published in the PICUP Collection, July 2025, https://doi.org/10.1119/PICUP.Exercise.FDMFA.

DOI: 10.1119/PICUP.Exercise.FDMFA

The instructor materials are ©2025 Scott Scharlach.

The exercises are released under a Creative Commons Attribution-NonCommercial-ShareAlike 4.0 license

Creative Commons Attribution-NonCommercial-ShareAlike 4.0 license