Leanpub Header

Skip to main content

The Computational Pendulum: From Classical Mechanics to Neural Networks

The Computational Pendulum: From Classical Mechanics to Neural Networks
This book is 96% completeLast updated on 2026-11-23
+16% in the last 30 days

The ultimate bridge from AP Physics to modern scientific AI—anchored to one familiar system: the simple pendulum. Start with classical mechanics, translate it into Python, and build your way to nonlinear dynamics, chaos, Physics-Informed Neural Networks (JAX), and Physical Reservoir Computing. Includes 31 fully solved exercises and click-to-run Google Colab labs.

Minimum price

$19.99

$29.99

You pay

Author earns

$

Also available for 1 book credit with a Reader Membership

PDF
587
Pages
Discussion Forum
About

About

About the Book

Most textbooks present math and physics as rigid formulas on flat paper—introducing the simple pendulum in week one, teaching the small-angle approximation, and immediately moving on. This book takes the opposite approach: it holds one universally familiar physical system constant and uses it as a laboratory to teach Computational Physics—the exact blend of classical mechanics, applied mathematics, software engineering, and scientific AI used in modern research and data science labs.

Designed for AP Physics / Calculus high school students, university STEM undergraduates, educators, and self-taught developers or data scientists, every theory chapter is tightly integrated with runnable Python / Google Colab notebooks (NumPy, SciPy, Matplotlib, and JAX) and immediately followed by a dedicated chapter of 100% fully solved exercises rated on a 1–5 difficulty scale.

🗂️ How the Book is Structured: A 3-Part Journey
  • Part I: Foundations and First Simulations (Chapters 2–3): Perfect for AP Physics students, college freshmen, and coding beginners. We start with familiar Newtonian mechanics, kinematics, tension, and energy conservation—then push beyond textbook basics into exact nonlinear solutions (Jacobi elliptic functions), Fourier power spectra, and rigid-body dynamics. Paired with 15 fully solved exercises and our first Python visualizations.
  • Part II: Numerical Methods, Piecewise Models & Machine Learning (Chapters 4–5): Stepping into university-level computational physics and scientific AI. We strip away small-angle idealizations to build and analyze symplectic integrators (Euler-Cromer and Velocity Verlet) and 4th-order Runge-Kutta (RK4), explore adiabatic invariants and Mathieu/Floquet parametric resonance, and train Physics-Informed Neural Networks (PINNs) in JAX to discover hidden physical laws directly from noisy data.
  • Part III: Explorations in Modern Dynamics & AI (Chapters 6–7): Turning a single classical model into a modern research sandbox. We explore Velocity and Acceleration Hodographs, non-inertial reference frames, hybrid dynamical systems (the Jumping Pendulum and Jumping Bug), 1D Chaos Theory, and Physical Reservoir Computing—culminating in using a mechanical pendulum as an AM radio demodulator, a blind kinetic-energy speedometer, and a bistable hysteresis computer.
🛠️ Included Companion Resources (Free & Open Source)
  • Zero-Setup Code: Every simulation and AI lab runs for free in your browser via Google Colab (no local installation required).
  • 100% Fully Solved Exercises: 31 end-of-chapter problems across 3 exercise chapters, complete with step-by-step derivations, 1–5 difficulty ratings, and Chapter Roadmaps grouping problems into thematic tracks.
  • Free Companion Website & PDFs: Access the complete Code Directory, downloadable Mathematical & Physics Reference Guide, and printable 4-Page Pendulum Formula Cheat Sheet at pendulumswings.github.io.
💡 What You Get with the Complete Edition

All three parts (Chapters 1–7 and all 31 fully solved exercises) are complete and available immediately. Purchasing on Leanpub gives you a DRM-free PDF with clickable links directly to every Google Colab notebook—plus free lifetime updates as errata, new notebooks, or bonus supplementary materials are released.

Author

About the Author

Horos Kyklos

HOROS KYKLOS holds advanced degrees in physics and computer science and has worked in both academia and the software industry. Having spent years navigating theoretical research and production software engineering, Kyklos writes with a focus on uniting mathematical rigor with modern computation. THE COMPUTATIONAL PENDULUM grew out of a desire to tear down the artificial walls between analytical physics, numerical simulation, and machine learning—showing students, educators, and developers how a single physical system can illuminate all three.

Get the free sample chapters

Click the buttons to get the free sample in PDF or EPUB, or read the sample online here

The Leanpub 60 Day 100% Happiness Guarantee

Within 60 days of purchase you can get a 100% refund on any Leanpub purchase, in two clicks.

See full terms...

Earn $8 on a $10 Purchase, and $16 on a $20 Purchase

We pay 80% royalties on purchases of $7.99 or more, and 80% royalties minus a 50 cent flat fee on purchases between $0.99 and $7.98. You earn $8 on a $10 sale, and $16 on a $20 sale. So, if we sell 5000 non-refunded copies of your book for $20, you'll earn $80,000.

(Yes, some authors have already earned much more than that on Leanpub.)

Learn more about writing on Leanpub

Free Updates. DRM Free.

If you buy a Leanpub book, you get free updates for as long as the author updates the book! Many authors use Leanpub to publish their books in-progress, while they are writing them. All readers get free updates, regardless of when they bought the book or how much they paid (including free).

Most Leanpub books are available in PDF (for computers) and EPUB (for phones, tablets and Kindle). The formats that a book includes are shown at the top right corner of this page.

Finally, Leanpub books don't have any DRM copy-protection nonsense, so you can easily read them on any supported device.

Learn more about Leanpub's ebook formats and where to read them

Write and Publish on Leanpub

You can use Leanpub to easily write, publish and sell in-progress and completed ebooks and online courses!

Leanpub is a powerful platform for serious authors, combining a simple, elegant writing and publishing workflow with a store focused on selling in-progress ebooks.

Leanpub is a magical typewriter for authors: just write in plain text, and to publish your ebook, just click a button. (Or, if you are producing your ebook your own way, you can even upload your own PDF and/or EPUB files and then publish with one click!) It really is that easy.

Learn more about writing on Leanpub