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 13% completeLast updated on 2026-10-02

A progressive journey from high school mechanics to neural networks. By pushing the humble pendulum beyond the small-angle approximation, discover how classical physics, pure mathematics, Python simulation, and modern AI work together as interconnected lenses.

Featuring 100% fully solved exercises and interactive Google Colab notebooks that bridge classical mechanics and Physics-Informed Neural Networks.

Minimum price

$19.99

$29.99

You pay

Author earns

$

Also available for 1 book credit with a Reader Membership

PDF
About

About

About the Book

One Physical System. Three Interconnected Lenses.

The simple pendulum is usually relegated to the first few weeks of an introductory physics course, quickly simplified with the small-angle approximation and left behind. However, when you strip away that approximation, the pendulum reveals itself as a rich theoretical and computational laboratory.

The Computational Pendulum takes you on a progressive journey from AP-level mechanics to modern machine learning. By keeping the physical system constant, you can master advanced mathematical, numerical, and AI techniques without the cognitive overload of constantly changing theoretical contexts.

What You Will Explore
  • Classical Mechanics & Exact Mathematics: Start with kinematics, Newton's laws, and rigid-body dynamics, then push beyond standard textbooks into exact large-angle solutions using Jacobi elliptic functions, phase portraits, and exact Fourier power spectra.
  • Computational Physics in Python: Continuous periodic systems accumulate numerical errors rapidly. Learn how to simulate dynamical systems accurately using 4th-order Runge-Kutta (RK4) integration, event-driven solvers, and Fast Fourier Transforms (FFT).
  • Machine Learning for Physics: Use the pendulum as a transparent baseline for modern AI. Train Physics-Informed Neural Networks (PINNs) in JAX, explore Koopman operator theory, and build Physical Reservoir Computing models.
How the Book is Structured

Each theory chapter is tightly integrated with companion Python scripts and is immediately followed by a dedicated chapter of 100% fully solved exercises that act as an open-ended laboratory.

  • Part I: Foundations and Simulations (Available Now) — Bridges introductory mechanics, rigid-body dynamics, and energy conservation into exact analytical solutions, Fourier series, and foundational Python visualizations.
  • Part II: Exact Solutions and Machine Learning (In Progress) — Introduces heavy numerical integration (RK4) for non-idealized systems and takes the first leap into machine learning by training neural networks to discover physical laws.
  • Part III: Explorations in Modern Dynamics (In Progress) — Investigates non-inertial reference frames, parametric pumping, Koopman theory, and Reservoir Computing in an open-ended research sandbox.

Leanpub Early-Access Pricing Advantage: This textbook is being published iteratively and will reach approximately 600 pages ($69.99 final retail price) upon completion. Purchasing the early-access digital edition today locks in a lower introductory price and gives you immediate access to Part I, along with 100% free lifetime updates as Parts II and III are released and the price increases.

Interactive Companion Code (GitHub & Google Colab)

Every script referenced in the text is open-source and available on the Companion Website & Code Directory. You can view the raw Python files on GitHub or launch them with a single click in Google Colab—no local installation or setup required.

Who This Book Is For
  • Physics Educators: Teachers of AP Physics or introductory university mechanics looking for rigorous, ready-to-use honors extensions, computational labs, or student capstone projects anchored to a familiar curriculum topic.
  • Students & Self-Learners: Readers who want to see every step of a derivation and learn how textbook equations translate into working Python simulations.
  • Developers & Data Scientists: Programmers and ML practitioners seeking a focused, math-first bridge into computational physics, differential equations, and scientific machine learning (SciML).


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.)

In fact, authors have earned over $15 million writing, publishing and selling 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