# Derivation of equations of motion for a multi-body system using Mathematica

I want to learn how to work with finite-element models in Mathematica to derive the equation of motion for rigid bodies.

I can do this by compiling the Lagrangian of the system, then differentiating by generalized coordinates, as was done in the topics:

Lagrangian of three-mass system with Mathematica

Equations of motion for two-mass torsional oscillator with the gear train

This time I want to program all the relationships and types of motion, and the derivation of the equations of motion should be carried out automatically.

Several tools caught my eye, but I haven't worked with that yet:

https://www.wolfram.com/products/applications/mechsystems/screens.html

There is a tripod robot with one triangular fixed platform and one triangular movable platform. The position of the platform is changed by linear movement of the drive links:

Need to:

1.Build up kinematic scheme in Mahematica (by analogy with how it is done in SimMechanics or SimScape MultiBody);

1. Derive the Lagrangian $$L$$ automaticly;

2. Derive the equations of motion automaticly;

Is it possible in Mathematica?

• Wolfram SystemModeler creates equations of motion for connected components and simulates them. In Mathematica, you can use SystemModel to create such models. And access their equations, among other properties. Although those equations tend to involve lots of extra variables, so not easy to interpret.