Welcome to the companion code repository. This page organizes all Python scripts referenced throughout the textbook.
For the best learning experience, you can view the raw code on GitHub or launch the scripts directly in an interactive Google Colab notebook environment.
File Path
Description
Actions
Part I: Foundations — Chapter 2: Pendulum Fundamentals
scripts/chapter2/energy_phase.ipynb
Energy and Phase Space for the Simple Pendulum
scripts/chapter2/small_angle_tension.ipynb
Pendulum Tension in the small angle limit
scripts/chapter2/exact_vs_small_angle.ipynb
Comparison of angle exact solution with the small angle approximation
scripts/chapter2/exact_pendulum_period.ipynb
Period T of the simple pendulum: Exact vs small angle and oscillation and rotation cases
scripts/chapter2/relative_power.ipynb
Relative Power harmonic contribution for the simple pendulum oscillations