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


```python
m1, m2, m3, m4, m5, l1, l2, l3, l4, l5 = sp.symbols(r'm_1 m_2 m_3 m_4 m_5 l_1 l_2 l_3 l_4 l_5')
t, g, h = sp.symbols('t g h')
v1, v2, v3, v4, v5 = dynamicsymbols(r'\theta_1 \theta_2 \theta_3 \theta_4 \theta_5')
dv1, dv2, dv3, dv4, dv5 = dynamicsymbols(r'\theta_1 \theta_2 \theta_3 \theta_4 \theta_5', 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)
x4 = x3+l4*sp.sin(v4)
y4 = y3+-l4*sp.cos(v4)
x5 = x4+l5*sp.sin(v5)
y5 = y4+-l5*sp.cos(v5)

dx1 = x1.diff(t)
dy1 = y1.diff(t)
dx2 = x2.diff(t)
dy2 = y2.diff(t)
dx3 = x3.diff(t)
dy3 = y3.diff(t)
dx4 = x4.diff(t)
dy4 = y4.diff(t)
dx5 = x5.diff(t)
dy5 = y5.diff(t)
```


```python
V = (m1*g*y1)+(m2*g*y2)+(m3*g*y3)+(m4*g*y4)+(m5*g*y5)
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))+(sp.Rational(1,2)*m4*(dx4**2+dy4**2))+(sp.Rational(1,2)*m5*(dx5**2+dy5**2))
L = T-V
```


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


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


```python
soln
```


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


```python
# solvedsoln
```

0293745d4cddd76c8616f3a23fd3f9624d290ca5
ipynb
Jupyter Notebook
Pendula/Simple/5Pendulum/QuintuplePendulum.ipynb
ethank5149/Classical-Mechanics
4684cc91abcf65a684237c6ec21246d5cebd232a
MIT
Pendula/Simple/5Pendulum/QuintuplePendulum.ipynb
ethank5149/Classical-Mechanics
4684cc91abcf65a684237c6ec21246d5cebd232a
MIT
Pendula/Simple/5Pendulum/QuintuplePendulum.ipynb
ethank5149/Classical-Mechanics
4684cc91abcf65a684237c6ec21246d5cebd232a
MIT
Qwen/Qwen-72B
1. YES
2. YES