The fifth edition of my book, Symbolic Computation with Python and SymPy, is out. Here I’m going to highlight the improvements, the logic behind the decision for a new e-book about dynamics, and what’s next.

What’s Changed

On top of the small edits to keep up with improvements of SymPy, the major focus of attention was on the chapter Dynamical System and Simulations. In particular, new sections and examples were added in order to:

  • better explain concepts like coordinates, kinematics, inertia, particles and rigid bodies.
  • compute reaction forces and torques.
  • understand the implications of known bugs.
  • understand when numerical simulations are not producing correct results.

    Example - Position of the free end of a Spinning Top


    spinning top position

    Errors are visible in the position of a spinning top’s free end.


  • use SymPy to set up and solve optimal control problems with Opty

    Example - Simulation of a reaction wheel inverted pendulum

Introduction of a new E-book

Dynamics is a wonderful topic and SymPy’s mechanics module, despite its current limitations, is a marvelous piece of software, with which we can “easily” generate equations of motion for multibody systems, which can then be used to solve for control problems.

In order to properly explain SymPy’s capabilities and limitations to new people, good examples must be introduced, which takes substantial space both in the printed book as well as in the e-book. As a consequence, I made the decision to spin-off the content of the printed book’s “Chapter 24 – Dynamical Systems and Simulations” into a new e-book, Dynamics with Python and SymPy.

Cover of the new ebook, Dynamics with Python and SymPy

On the one hand, this allows new potential customers already acquainted with the basics of SymPy to focus only on dynamics. On the other hand, it simplifies my work in keeping the trilogy up-to-date.

What’s next for my SymPy book?

SymPy’s also offer a control module. However, as of SymPy version 1.13.3, there are known bugs that severely limit its usage, specifically when working with state space. Hopefully, these bugs will be solved in the near future, which would allow me to include control systems examples in the book. In any case, a new version of the book (planned for no sooner than the end of summer 2025) will definitely introduce more complex examples of dynamical systems.

Finally, you can ask any question about the book or provide feedback by using the Contact page or the comment section down below.