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


```python
m1,m2,m3,l01,l02,l03,k1,k2,k3 = sp.symbols(r'm_1,m_2,m_3,l_{0\,1},l_{0\,2},l_{0\,3},k_1,k_2,k_3')
t,g = sp.symbols('t,g')
x1, x2, x3, y1, y2, y3 = dynamicsymbols('x_1 x_2 x_3 y_1 y_2 y_3')
dx1, dx2, dx3, dy1, dy2, dy3 = dynamicsymbols('x_1 x_2 x_3 y_1 y_2 y_3', 1)
```


```python
V = m1*g*y1+m2*g*y2+m3*g*y3+sp.Rational(1,2)*k1*(sp.sqrt(x1**2+y1**2)-l01)**2+sp.Rational(1,2)*k2*(sp.sqrt((x2-x1)**2+(y2-y1)**2)-l02)**2+sp.Rational(1,2)*k3*(sp.sqrt((x3-x2)**2+(y3-y2)**2)-l03)**2
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 = sp.simplify(T - V)
```


```python
LM = LagrangesMethod(L, [x1, y1, x2, y2, x3, y3])
```


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


```python
solvedsoln = sp.solve((sp.Eq(soln[0]),sp.Eq(soln[1]),sp.Eq(soln[2]),sp.Eq(soln[3]),sp.Eq(soln[4]),sp.Eq(soln[5])),(x1.diff(t,t),y1.diff(t,t),x2.diff(t,t),y2.diff(t,t),x3.diff(t,t),y3.diff(t,t)))
```


```python
solvedsoln
```

\\[
\ddot{x}_1 = 
\frac{k_2}{m_1}(x_2-x_1)\left(1-\frac{l_{0,2}}{\sqrt{(x_2-x_1)^2+(y_2-y_1)^2}}\right)
+\frac{k_1}{m_1}x_1\left(\frac{l_{0,1}}{-1+\sqrt{x^2_1+y^2_1}}\right)
\\]

\\[
\ddot{x}_2 = 
\frac{k_2}{m_2}(x_2-x_1)\left(-1+\frac{l_{0,2}}{\sqrt{(x_2-x_1)^2+(y_2-y_1)^2}}\right)
+\frac{k_3}{m_2}(x_3-x_2)\left(1-\frac{l_{0,3}}{\sqrt{(x_3-x_2)^2+(y_3-y_2)^2}}\right)
\\]

\\[
\ddot{x}_3 = \frac{k_3}{m_3}(x_3-x_2)\left(-1+\frac{l_{0,3}}{\sqrt{(x_3-x_2)^2+(y_3-y_2)^2}}\right)
\\]

\\[
\ddot{y}_1 = -g+\frac{k_1}{m_1}y_1\left(\frac{l_{0,1}}{\sqrt{x^2_1+y^2_1}}-1\right)
+\frac{k_2}{m_1}(y_2-y_1)\left(1-\frac{l_{0,2}}{\sqrt{(x_2-x_1)^2+(y_2-y_1)^2}}\right)
\\]

\\[
\ddot{y}_2 = -g+\frac{k_2}{m_2}(y_2-y_1)\left(-1+\frac{l_{0,2}}{\sqrt{(x_2-x_1)^2+(y_2-y_1)^2}}\right)
+\frac{k_3}{m_2}(y_3-y_2)\left(1-\frac{l_{0,3}}{\sqrt{(x_3-x_2)^2+(y_3-y_2)^2}}\right)
\\]

\\[
\ddot{y}_3 = -g+\frac{k_3}{m_3}(y_3-y_2)\left(-1+\frac{l_{0,3}}{\sqrt{(x_3-x_2)^2+(y_3-y_2)^2}}\right)
\\]


```python

```

f0c8826096008d039294192d67f8f30ece5cfcd9
ipynb
Jupyter Notebook
Pendula/Spring/3SpringPendulum2D/.ipynb_checkpoints/2DTripleSpringPendulum-checkpoint.ipynb
ethank5149/Classical-Mechanics
4684cc91abcf65a684237c6ec21246d5cebd232a
MIT
Pendula/Spring/3SpringPendulum2D/.ipynb_checkpoints/2DTripleSpringPendulum-checkpoint.ipynb
ethank5149/Classical-Mechanics
4684cc91abcf65a684237c6ec21246d5cebd232a
MIT
Pendula/Spring/3SpringPendulum2D/.ipynb_checkpoints/2DTripleSpringPendulum-checkpoint.ipynb
ethank5149/Classical-Mechanics
4684cc91abcf65a684237c6ec21246d5cebd232a
MIT
Qwen/Qwen-72B
1. YES
2. YES