Cantilever with a Concentrated Load at any Point — Castigliano’s 2nd Theorem Feb 2025

Use Jupyter and Sympy to quickly calculate a deflection formula
I decided to (re)derive and verify a textbook formula for the deflection of a cantilever — using Python, Sympy, Jupyter, and Castigliano’s method.

Turns out it was quite easy.

Of course,it wouldn’t be so hard doing these calculations by hand (in fact I did, as an exercise), but using the Jupyter notebook, I can produce a clean version of my work and present it as a PDF or as HTML. Also, I can easily prepare variations on a theme: other similar loadings, other boundary conditions, etc.

BONUS

In the Jupyter notebook, I appended a section proving that Betti’s Theorem can be verified for our specific problem.

A refresher and a little extra intrigue maybe.


I present the problem diagram.

cantilever beam formulas

My Jupyter Notebook

What follows here should be easily read by a structural engineer. Probably easily read by a physicist, or maybe a mathematician. Some background is required to follow the calculations.

Please refer to the link to learn more. There are many online tutorials presenting similar deflection calculations.

Jupyter notebook

Plot
References

Leave a Reply

Your email address will not be published. Required fields are marked *