3.5 Computer Supported Mechanics
“It is unworthy of excellent men to lose hours like slaves in the labour of calculation which could safely be relegated to anyone else if machines were used.”
— Gottfried Wilhelm Leibniz, 1686
Leibniz wrote this three centuries before the first computer. Today we have machines that can perform symbolic algebra, solve differential equations, and visualize results in seconds. The question is no longer whether to use them, but how to use them well.
The Computational Thinking Paradigm
The approach we take in this book is built on a division of labour between human and machine. We model real-world problems, translating physical situations into precise mathematical form: free body diagrams, vector equations, boundary conditions. The computer calculates, solving equations, performing integrations, and running simulations. We then interpret the results, analyzing their validity, exploring parameter sensitivity, and making engineering decisions based on computational evidence.
This is not about programming computers to mimic hand calculations. It is about thinking computationally, a modern mindset where mathematical problem-solving is computer-augmented from the start. We delegate mechanical manipulation to machines, freeing our cognitive resources for creative modeling and critical interpretation. When we say mechanical manipulation, we mean both numerical computation and symbolic algebraic manipulation. Computer algebra systems like SymPy perform the integration, differentiation, equation solving, and algebraic simplification that traditional courses spend the majority of their time teaching students to do by hand.
A Fundamental Shift
Traditional mechanics education allocates most of its time to computational techniques: how to solve this integral, how to decompose that force into components, tricks for simplifying moment equations. Conceptual understanding and problem formulation receive what time is left. We invert this allocation.
SymPy handles the algebraic manipulation. SciPy handles the numerical computation. You focus on modeling, interpretation, and understanding. This does not mean mathematics is less important. Paradoxically, it means you need more mathematics and deeper understanding, because you can now tackle problems that were impossible when constrained by hand calculability. But the skill shifts from “can you resolve this force vector by hand?” to “can you formulate this physical system as vector equations, solve them computationally, and interpret whether the solution makes physical sense?”
This is not a minor pedagogical adjustment. It is a reconception of what it means to do mechanics in the computational age.
The Workflow
Every mechanics problem in this book follows the same pattern.
The first step is always done by hand: draw a free body diagram, define all relevant force vectors and position vectors, state the equations of motion, and compare the number of equations to the number of unknowns. This is the modeling phase, and it requires careful thought about what physical principles apply, what assumptions we make, and what we seek to find. No computer can do this for you.
The second step is to formulate the defined vectors and equations using a computer algebra system. We express forces as SymPy vectors, write equilibrium or Newton’s second law as symbolic equations, and let the solver find the unknowns. For problems involving motion, we formulate differential equations and integrate them numerically. The specific method changes, but the principle remains: delegate calculation to the computer.
The third step is to analyze the results. We visualize solutions through plots and animations. We vary parameters to understand sensitivity. We check dimensions and limiting cases to validate physical behavior. This analysis phase builds intuition and reveals whether our model captures the essential physics or requires refinement.
This three-step pattern (formulate, solve, analyze) appears in every chapter of this book. Master it, and you can tackle problems across all of mechanics by adapting the same fundamental approach.
Guiding Principles
Several principles guide our approach.
Start simple. Begin with the simplest model that captures the essential physics. If it proves insufficient, refine it. As Einstein put it: make it as simple as possible, but not simpler.
Avoid ready-made formulas from textbooks or formula collections. Verifying whether a formula applies to your specific problem is often harder than solving the problem from first principles. Instead, formulate governing equations systematically and let the computer solve them. This builds understanding and prevents what we might call ready-made formula thinking, the substitution of memorization for comprehension.
Trust the mathematics. Define quantities with consistent physical conventions, express them as vectors, and the algebra will automatically handle signs, directions, and simplifications. Do not manually track these details.
Keep solutions in symbolic form when possible. A symbolic result like \(F_{Ax} = -\frac{10 F}{\sqrt{d^2+100}}\) is more informative than a single number. It reveals how the reaction force depends on the geometry and loading, it serves as documentation, and it helps you debug when things go wrong.
Finally, always check dimensions. Every equation must be dimensionally consistent. Every result must be dimensionally checked. This catches errors that purely mathematical checks might miss.
Why This Approach Matters
Without the constraint of hand calculability, we can tackle realistic problems from the start: three-dimensional force systems, multi-body equilibrium, nonlinear kinematics, coupled differential equations in kinetics. These are the problems you will encounter in professional practice. Learning to solve simplified two-dimensional problems by hand does not prepare you for this reality.
When computers handle calculations, you gain time for what truly builds understanding. Interactive visualization lets you see how a mechanism moves as parameters vary. Parameter studies reveal which dimensions matter and which do not. Rapid iteration lets you test ideas, fail fast, and refine models efficiently. This exploratory process is where conceptual understanding emerges, not from memorizing formulas or performing tedious manipulations.
The industrial reality reinforces this. Product development requires simulation that cannot be done by hand. Structural analysis demands finite element methods. Mechanism design relies on solving kinematic and kinetic equations that govern motion. By learning mechanics as a computational discipline from the start, you close the gap between education and professional practice.
For a comprehensive treatment of computational thinking and applied mathematics using the same philosophy, see python.ju.se.