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


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


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

dx1 = x1.diff(t)
dy1 = y1.diff(t)
dx2 = x2.diff(t)
dy2 = y2.diff(t)
```


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


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


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


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


```python
solvedsoln
```


```python

```

2233622c833a94108fa2f6fa2f7d584e5e434820
ipynb
Jupyter Notebook
Pendula/Simple/nPendulum/.ipynb_checkpoints/DoublePendulum-checkpoint.ipynb
ethank5149/Classical-Mechanics
4684cc91abcf65a684237c6ec21246d5cebd232a
MIT
Pendula/Simple/nPendulum/.ipynb_checkpoints/DoublePendulum-checkpoint.ipynb
ethank5149/Classical-Mechanics
4684cc91abcf65a684237c6ec21246d5cebd232a
MIT
Pendula/Simple/nPendulum/.ipynb_checkpoints/DoublePendulum-checkpoint.ipynb
ethank5149/Classical-Mechanics
4684cc91abcf65a684237c6ec21246d5cebd232a
MIT
Qwen/Qwen-72B
1. YES
2. YES