```python
from sympy.physics.mechanics import *
import sympy as sp
mechanics_printing(pretty_print=True)
```


```python
m1, m2, m3, l1, l2, l3 = sp.symbols(r'm_1 m_2 m_3 l_1 l_2 l_3')
t, g, h = sp.symbols('t g h')
v1, v2, v3 = dynamicsymbols(r'\theta_1 \theta_2 \theta_3')
dv1, dv2, dv3 = dynamicsymbols(r'\theta_1 \theta_2 \theta_3', 1)
```


```python
x1 = l1 * sp.sin(v1)
y1 = -l1 * sp.cos(v1)
x2 = x1 + l2 * sp.sin(v2)
y2 = y1 + -l2 * sp.cos(v2)
x3 = x2 + l3 * sp.sin(v3)
y3 = y2 + -l3 * sp.cos(v3)

dx1 = x1.diff(t)
dy1 = y1.diff(t)
dx2 = x2.diff(t)
dy2 = y2.diff(t)
dx3 = x3.diff(t)
dy3 = y3.diff(t)
```


```python
V = (m1 * g * y1) + (m2 * g * y2) + (m3 * g * y3)
T = (sp.Rational(1, 2) * m1 * (dx1**2 + dy1**2)) + (sp.Rational(1, 2) * m2 * (dx2**2+dy2**2)) + (sp.Rational(1, 2) * m3 * (dx3**2 + dy3**2))
L = T - V
```


```python
LM = LagrangesMethod(L, [v1, v2, v3])
```


```python
soln = LM.form_lagranges_equations()
```


```python
solvedsoln = sp.solve((sp.Eq(soln[0]), sp.Eq(soln[1]), sp.Eq(soln[2])), (v1.diff(t, t), v2.diff(t, t), v3.diff(t, t)))
```


```python
solvedsoln
```


```python

```

fa572ac5aa1a24d5ee14229705bf8945e883f9a0
ipynb
Jupyter Notebook
Pendula/Simple/3Pendulum/TriplePendulum.ipynb
ethank5149/Classical-Mechanics
4684cc91abcf65a684237c6ec21246d5cebd232a
MIT
Pendula/Simple/3Pendulum/TriplePendulum.ipynb
ethank5149/Classical-Mechanics
4684cc91abcf65a684237c6ec21246d5cebd232a
MIT
Pendula/Simple/3Pendulum/TriplePendulum.ipynb
ethank5149/Classical-Mechanics
4684cc91abcf65a684237c6ec21246d5cebd232a
MIT
Qwen/Qwen-72B
1. YES
2. YES