Sympy解决了保持运行,不停止

发布于 2025-02-05 17:42:33 字数 1349 浏览 3 评论 0原文

我正在尝试使用Lagrange的方程式对三重摆进行模拟。我使用sympy.solve求解三个质量的三个线性方程系统,但是代码保持运行超过一个小时,并且不会停止。有人知道会发生什么吗?当系统具有两个方程式时,可以很好地工作。

t, g = smp.symbols('t g')
m1, m2, m3 = smp.symbols('m1, m2, m3')
L1, L2, L3 = smp.symbols('L1, L2, L3')

the1, the2, the3 = smp.symbols(r'\theta_1, \theta_2, \theta_3', cls=smp.Function)

the1 = the1(t)
the2 = the2(t)
the3 = the3(t)

the1_d = smp.diff(the1, t)
the2_d = smp.diff(the2, t)
the3_d = smp.diff(the3, t)
the1_dd = smp.diff(the1_d, t)
the2_dd = smp.diff(the2_d, t)
the3_dd = smp.diff(the3_d, t)

x1 = L1*smp.sin(the1)
y1 = -L1*smp.cos(the1)
x2 = L1*smp.sin(the1)+L2*smp.sin(the2)
y2 = -L1*smp.cos(the1)-L2*smp.cos(the2)
x3 = L3*smp.sin(the3)+L1*smp.sin(the1)+L2*smp.sin(the2)
y3 = -L3*smp.cos(the3)-L1*smp.cos(the1)-L2*smp.cos(the2)

# Kinetic
T1 = 1/2 * m1 * (smp.diff(x1, t)**2 + smp.diff(y1, t)**2)
T2 = 1/2 * m2 * (smp.diff(x2, t)**2 + smp.diff(y2, t)**2)
T3 = 1/2 * m3 * (smp.diff(x3, t)**2 + smp.diff(y3, t)**2)
T = T1+T2+T3

# Potential
V1 = m1*g*y1
V2 = m2*g*y2
V3 = m3*g*y3
V = V1 + V2 + V3

# Lagrangian
L = T-V

LE1 = smp.diff(L, the1) - smp.diff(smp.diff(L, the1_d), t)
LE2 = smp.diff(L, the2) - smp.diff(smp.diff(L, the2_d), t)
LE3 = smp.diff(L, the3) - smp.diff(smp.diff(L, the3_d), t)

sols = smp.solve([LE1, LE2, LE3], (the1_dd, the2_dd, the3_dd), simplify=False, rational=False)

I'm trying to do a simulation of a triple pendulum using Lagrange's equations. I use sympy.solve to solve the three linear equation system for the three masses, but the code keeps running for more than an hour and does not stop. Anybody knows what can happen? When the system has two equations works perfectly.

t, g = smp.symbols('t g')
m1, m2, m3 = smp.symbols('m1, m2, m3')
L1, L2, L3 = smp.symbols('L1, L2, L3')

the1, the2, the3 = smp.symbols(r'\theta_1, \theta_2, \theta_3', cls=smp.Function)

the1 = the1(t)
the2 = the2(t)
the3 = the3(t)

the1_d = smp.diff(the1, t)
the2_d = smp.diff(the2, t)
the3_d = smp.diff(the3, t)
the1_dd = smp.diff(the1_d, t)
the2_dd = smp.diff(the2_d, t)
the3_dd = smp.diff(the3_d, t)

x1 = L1*smp.sin(the1)
y1 = -L1*smp.cos(the1)
x2 = L1*smp.sin(the1)+L2*smp.sin(the2)
y2 = -L1*smp.cos(the1)-L2*smp.cos(the2)
x3 = L3*smp.sin(the3)+L1*smp.sin(the1)+L2*smp.sin(the2)
y3 = -L3*smp.cos(the3)-L1*smp.cos(the1)-L2*smp.cos(the2)

# Kinetic
T1 = 1/2 * m1 * (smp.diff(x1, t)**2 + smp.diff(y1, t)**2)
T2 = 1/2 * m2 * (smp.diff(x2, t)**2 + smp.diff(y2, t)**2)
T3 = 1/2 * m3 * (smp.diff(x3, t)**2 + smp.diff(y3, t)**2)
T = T1+T2+T3

# Potential
V1 = m1*g*y1
V2 = m2*g*y2
V3 = m3*g*y3
V = V1 + V2 + V3

# Lagrangian
L = T-V

LE1 = smp.diff(L, the1) - smp.diff(smp.diff(L, the1_d), t)
LE2 = smp.diff(L, the2) - smp.diff(smp.diff(L, the2_d), t)
LE3 = smp.diff(L, the3) - smp.diff(smp.diff(L, the3_d), t)

sols = smp.solve([LE1, LE2, LE3], (the1_dd, the2_dd, the3_dd), simplify=False, rational=False)

如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

扫码二维码加入Web技术交流群

发布评论

需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。

评论(1

玩心态 2025-02-12 17:42:33

首先,通常在Sympy中避免使用浮子更好,因此将1/2更改为Rational(1,2)s.halfs(1)/2等。

此处涉及的表达式很长且复杂。我将用普通的符号替换所有功能和衍生物,以便我们可以更好地看到它:

t1, t2, t3 = symbols('t1:4')
dt1, dt2, dt3 = symbols('tdot1:4')
ddt1, ddt2, ddt3 = symbols('tddot1:4')

rep = {
        the1:t1, the2:t2, the3:t3,
        the1_d:dt1, the2_d:dt2, the3_d:dt3,
        the1_dd:ddt1, the2_dd:ddt2, the3_dd:ddt3,
        }

eqs = [eq.subs(rep).trigsimp() for eq in [LE1, LE2, LE3]]
syms = [ddt1, ddt2, ddt3]

我还使用Trigsimp在那里使用Trig减少了Trig,这确实需要一些时间。 (如果您确切地知道您要寻找的简化类型,您可以通过各种方式加快速度。)

现在它们更简单,让我们看一下这些方程式:

In [4]: for eq in eqs: pprint(eq)
    ⎛                                                                 2                                                2                                                2                                                          ⎞
-L₁⋅⎝L₁⋅m₁⋅ẗ₁ + L₁⋅m₂⋅ẗ₁ + L₁⋅m₃⋅ẗ₁ + L₂⋅m₂⋅ẗ₂⋅cos(t₁ - t₂) + L₂⋅m₂⋅ṫ₂ ⋅sin(t₁ - t₂) + L₂⋅m₃⋅ẗ₂⋅cos(t₁ - t₂) + L₂⋅m₃⋅ṫ₂ ⋅sin(t₁ - t₂) + L₃⋅m₃⋅ẗ₃⋅cos(t₁ - t₃) + L₃⋅m₃⋅ṫ₃ ⋅sin(t₁ - t₃) + g⋅m₁⋅sin(t₁) + g⋅m₂⋅sin(t₁) + g⋅m₃⋅sin(t₁)⎠
   ⎛                                 2                                                2                                                                      2                                           ⎞
L₂⋅⎝-L₁⋅m₂⋅ẗ₁⋅cos(t₁ - t₂) + L₁⋅m₂⋅ṫ₁ ⋅sin(t₁ - t₂) - L₁⋅m₃⋅ẗ₁⋅cos(t₁ - t₂) + L₁⋅m₃⋅ṫ₁ ⋅sin(t₁ - t₂) - L₂⋅m₂⋅ẗ₂ - L₂⋅m₃⋅ẗ₂ - L₃⋅m₃⋅ẗ₃⋅cos(t₂ - t₃) - L₃⋅m₃⋅ṫ₃ ⋅sin(t₂ - t₃) - g⋅m₂⋅sin(t₂) - g⋅m₃⋅sin(t₂)⎠
      ⎛                           2                                          2                                 ⎞
L₃⋅m₃⋅⎝-L₁⋅ẗ₁⋅cos(t₁ - t₃) + L₁⋅ṫ₁ ⋅sin(t₁ - t₃) - L₂⋅ẗ₂⋅cos(t₂ - t₃) + L₂⋅ṫ₂ ⋅sin(t₂ - t₃) - L₃⋅ẗ₃ - g⋅sin(t₃)⎠

因此,我们想解决双点符号和我们可以看到这只是线性的,因此我们可以将其转换为矩阵:

In [5]: A, b = linear_eq_to_matrix(eqs, syms)

In [6]: A
Out[6]: 
⎡         -L₁⋅(L₁⋅m₁ + L₁⋅m₂ + L₁⋅m₃)           -L₁⋅(L₂⋅m₂⋅cos(t₁ - t₂) + L₂⋅m₃⋅cos(t₁ - t₂))  -L₁⋅L₃⋅m₃⋅cos(t₁ - t₃)⎤
⎢                                                                                                                    ⎥
⎢L₂⋅(-L₁⋅m₂⋅cos(t₁ - t₂) - L₁⋅m₃⋅cos(t₁ - t₂))               L₂⋅(-L₂⋅m₂ - L₂⋅m₃)               -L₂⋅L₃⋅m₃⋅cos(t₂ - t₃)⎥
⎢                                                                                                                    ⎥
⎢                                                                                                        2           ⎥
⎣           -L₁⋅L₃⋅m₃⋅cos(t₁ - t₃)                         -L₂⋅L₃⋅m₃⋅cos(t₂ - t₃)                     -L₃ ⋅m₃        ⎦

In [7]: b
Out[7]: 
⎡   ⎛        2                        2                        2                                                          ⎞⎤
⎢L₁⋅⎝L₂⋅m₂⋅ṫ₂ ⋅sin(t₁ - t₂) + L₂⋅m₃⋅ṫ₂ ⋅sin(t₁ - t₂) + L₃⋅m₃⋅ṫ₃ ⋅sin(t₁ - t₃) + g⋅m₁⋅sin(t₁) + g⋅m₂⋅sin(t₁) + g⋅m₃⋅sin(t₁)⎠⎥
⎢                                                                                                                          ⎥
⎢           ⎛        2                        2                        2                                           ⎞       ⎥
⎢       -L₂⋅⎝L₁⋅m₂⋅ṫ₁ ⋅sin(t₁ - t₂) + L₁⋅m₃⋅ṫ₁ ⋅sin(t₁ - t₂) - L₃⋅m₃⋅ṫ₃ ⋅sin(t₂ - t₃) - g⋅m₂⋅sin(t₂) - g⋅m₃⋅sin(t₂)⎠       ⎥
⎢                                                                                                                          ⎥
⎢                                     ⎛     2                     2                         ⎞                              ⎥
⎣                              -L₃⋅m₃⋅⎝L₁⋅ṫ₁ ⋅sin(t₁ - t₃) + L₂⋅ṫ₂ ⋅sin(t₂ - t₃) - g⋅sin(t₃)⎠                              ⎦

直接计算逆向恰好有点慢,但是我们可以使用atchugate

In [8]: sol = A.adjugate()*b/A.det()

In [9]: sol
Out[9]: 
⎡                                                                                              ⎛  2   2           2   2   2    2              2   2   2⎞ ⎛        2                        2                        2                                                          ⎞      ⎛          2                              2   2                        2   2                          ⎞ ⎛        2                        2                        2                
⎢                                                                                           L₁⋅⎝L₂ ⋅L₃ ⋅m₂⋅m₃ - L₂ ⋅L₃ ⋅m₃ ⋅cos (t₂ - t₃) + L₂ ⋅L₃ ⋅m₃ ⎠⋅⎝L₂⋅m₂⋅ṫ₂ ⋅sin(t₁ - t₂) + L₂⋅m₃⋅ṫ₂ ⋅sin(t₁ - t₂) + L₃⋅m₃⋅ṫ₃ ⋅sin(t₁ - t₃) + g⋅m₁⋅sin(t₁) + g⋅m₂⋅sin(t₁) + g⋅m₃⋅sin(t₁)⎠ - L₂⋅⎝- L₁⋅L₂⋅L₃ ⋅m₂⋅m₃⋅cos(t₁ - t₂) - L₁⋅L₂⋅L₃ ⋅m₃ ⋅cos(t₁ - t₂) + L₁⋅L₂⋅L₃ ⋅m₃ ⋅cos(t₁ - t₃)⋅cos(t₂ - t₃)⎠⋅⎝L₁⋅m₂⋅ṫ₁ ⋅sin(t₁ - t₂) + L₁⋅m₃⋅ṫ₁ ⋅sin(t₁ - t₂) - L₃⋅m₃⋅ṫ₃ ⋅sin(t₂ - 
⎢                                                                                           ──────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────
⎢                                                                                                                                                   2   2   2              2   2   2      2    2              2   2   2      2     2   2   2   2       2              2   2   2   2          2   2   2      2    2                2   2   2      2                                            2   2   2      2    2              2   2   2      2    2                2   
⎢                                                                                                                                               - L₁ ⋅L₂ ⋅L₃ ⋅m₁⋅m₂⋅m₃ + L₁ ⋅L₂ ⋅L₃ ⋅m₁⋅m₃ ⋅cos (t₂ - t₃) - L₁ ⋅L₂ ⋅L₃ ⋅m₁⋅m₃  + L₁ ⋅L₂ ⋅L₃ ⋅m₂ ⋅m₃⋅cos (t₁ - t₂) - L₁ ⋅L₂ ⋅L₃ ⋅m₂ ⋅m₃ + 2⋅L₁ ⋅L₂ ⋅L₃ ⋅m₂⋅m₃ ⋅cos (t₁ - t₂) - 2⋅L₁ ⋅L₂ ⋅L₃ ⋅m₂⋅m₃ ⋅cos(t₁ - t₂)⋅cos(t₁ - t₃)⋅cos(t₂ - t₃) + L₁ ⋅L₂ ⋅L₃ ⋅m₂⋅m₃ ⋅cos (t₁ - t₃) + L₁ ⋅L₂ ⋅L₃ ⋅m₂⋅m₃ ⋅cos (t₂ - t₃) - 2⋅L₁ ⋅L₂
⎢                                                                                                                                                                                                                                                                                                                                                                                                                                                                         
⎢                                                                      ⎛          2                              2   2                        2   2                          ⎞ ⎛        2                        2                        2                                                          ⎞      ⎛  2   2           2   2           2   2   2    2              2   2   2⎞ ⎛        2                        2                        2                        
⎢                                                                   L₁⋅⎝- L₁⋅L₂⋅L₃ ⋅m₂⋅m₃⋅cos(t₁ - t₂) - L₁⋅L₂⋅L₃ ⋅m₃ ⋅cos(t₁ - t₂) + L₁⋅L₂⋅L₃ ⋅m₃ ⋅cos(t₁ - t₃)⋅cos(t₂ - t₃)⎠⋅⎝L₂⋅m₂⋅ṫ₂ ⋅sin(t₁ - t₂) + L₂⋅m₃⋅ṫ₂ ⋅sin(t₁ - t₂) + L₃⋅m₃⋅ṫ₃ ⋅sin(t₁ - t₃) + g⋅m₁⋅sin(t₁) + g⋅m₂⋅sin(t₁) + g⋅m₃⋅sin(t₁)⎠ - L₂⋅⎝L₁ ⋅L₃ ⋅m₁⋅m₃ + L₁ ⋅L₃ ⋅m₂⋅m₃ - L₁ ⋅L₃ ⋅m₃ ⋅cos (t₁ - t₃) + L₁ ⋅L₃ ⋅m₃ ⎠⋅⎝L₁⋅m₂⋅ṫ₁ ⋅sin(t₁ - t₂) + L₁⋅m₃⋅ṫ₁ ⋅sin(t₁ - t₂) - L₃⋅m₃⋅ṫ₃ ⋅sin(t₂ - t₃) - g⋅
⎢                                                                   ──────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────
⎢                                                                                                                                                    2   2   2              2   2   2      2    2              2   2   2      2     2   2   2   2       2              2   2   2   2          2   2   2      2    2                2   2   2      2                                            2   2   2      2    2              2   2   2      2    2                2  
⎢                                                                                                                                                - L₁ ⋅L₂ ⋅L₃ ⋅m₁⋅m₂⋅m₃ + L₁ ⋅L₂ ⋅L₃ ⋅m₁⋅m₃ ⋅cos (t₂ - t₃) - L₁ ⋅L₂ ⋅L₃ ⋅m₁⋅m₃  + L₁ ⋅L₂ ⋅L₃ ⋅m₂ ⋅m₃⋅cos (t₁ - t₂) - L₁ ⋅L₂ ⋅L₃ ⋅m₂ ⋅m₃ + 2⋅L₁ ⋅L₂ ⋅L₃ ⋅m₂⋅m₃ ⋅cos (t₁ - t₂) - 2⋅L₁ ⋅L₂ ⋅L₃ ⋅m₂⋅m₃ ⋅cos(t₁ - t₂)⋅cos(t₁ - t₃)⋅cos(t₂ - t₃) + L₁ ⋅L₂ ⋅L₃ ⋅m₂⋅m₃ ⋅cos (t₁ - t₃) + L₁ ⋅L₂ ⋅L₃ ⋅m₂⋅m₃ ⋅cos (t₂ - t₃) - 2⋅L₁ ⋅L
⎢                                                                                                                                                                                                                                                                                                                                                                                                                                                                         
⎢   ⎛     2                                           2                              2      2                                  2      2             ⎞ ⎛        2                        2                        2                                                          ⎞      ⎛        2                        2                        2                                           ⎞ ⎛    2                              2                                         
⎢L₁⋅⎝L₁⋅L₂ ⋅L₃⋅m₂⋅m₃⋅cos(t₁ - t₂)⋅cos(t₂ - t₃) - L₁⋅L₂ ⋅L₃⋅m₂⋅m₃⋅cos(t₁ - t₃) + L₁⋅L₂ ⋅L₃⋅m₃ ⋅cos(t₁ - t₂)⋅cos(t₂ - t₃) - L₁⋅L₂ ⋅L₃⋅m₃ ⋅cos(t₁ - t₃)⎠⋅⎝L₂⋅m₂⋅ṫ₂ ⋅sin(t₁ - t₂) + L₂⋅m₃⋅ṫ₂ ⋅sin(t₁ - t₂) + L₃⋅m₃⋅ṫ₃ ⋅sin(t₁ - t₃) + g⋅m₁⋅sin(t₁) + g⋅m₂⋅sin(t₁) + g⋅m₃⋅sin(t₁)⎠ - L₂⋅⎝L₁⋅m₂⋅ṫ₁ ⋅sin(t₁ - t₂) + L₁⋅m₃⋅ṫ₁ ⋅sin(t₁ - t₂) - L₃⋅m₃⋅ṫ₃ ⋅sin(t₂ - t₃) - g⋅m₂⋅sin(t₂) - g⋅m₃⋅sin(t₂)⎠⋅⎝- L₁ ⋅L₂⋅L₃⋅m₁⋅m₃⋅cos(t₂ - t₃) + L₁ ⋅L₂⋅L₃⋅m₂⋅m₃⋅cos(t₁ - t₂)⋅cos(t₁ - 
⎢─────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────
⎢                                                                                                                                                    2   2   2              2   2   2      2    2              2   2   2      2     2   2   2   2       2              2   2   2   2          2   2   2      2    2                2   2   2      2                                            2   2   2      2    2              2   2   2      2    2                2  
⎣                                                                                                                                                - L₁ ⋅L₂ ⋅L₃ ⋅m₁⋅m₂⋅m₃ + L₁ ⋅L₂ ⋅L₃ ⋅m₁⋅m₃ ⋅cos (t₂ - t₃) - L₁ ⋅L₂ ⋅L₃ ⋅m₁⋅m₃  + L₁ ⋅L₂ ⋅L₃ ⋅m₂ ⋅m₃⋅cos (t₁ - t₂) - L₁ ⋅L₂ ⋅L₃ ⋅m₂ ⋅m₃ + 2⋅L₁ ⋅L₂ ⋅L₃ ⋅m₂⋅m₃ ⋅cos (t₁ - t₂) - 2⋅L₁ ⋅L₂ ⋅L₃ ⋅m₂⋅m₃ ⋅cos(t₁ - t₂)⋅cos(t₁ - t₃)⋅cos(t₂ - t₃) + L₁ ⋅L₂ ⋅L₃ ⋅m₂⋅m₃ ⋅cos (t₁ - t₃) + L₁ ⋅L₂ ⋅L₃ ⋅m₂⋅m₃ ⋅cos (t₂ - t₃) - 2⋅L₁ ⋅L

                           ⎞         ⎛     2                     2                         ⎞ ⎛     2                                           2                              2      2                                  2      2             ⎞                                                                                            ⎤
t₃) - g⋅m₂⋅sin(t₂) - g⋅m₃⋅sin(t₂)⎠ - L₃⋅m₃⋅⎝L₁⋅ṫ₁ ⋅sin(t₁ - t₃) + L₂⋅ṫ₂ ⋅sin(t₂ - t₃) - g⋅sin(t₃)⎠⋅⎝L₁⋅L₂ ⋅L₃⋅m₂⋅m₃⋅cos(t₁ - t₂)⋅cos(t₂ - t₃) - L₁⋅L₂ ⋅L₃⋅m₂⋅m₃⋅cos(t₁ - t₃) + L₁⋅L₂ ⋅L₃⋅m₃ ⋅cos(t₁ - t₂)⋅cos(t₂ - t₃) - L₁⋅L₂ ⋅L₃⋅m₃ ⋅cos(t₁ - t₃)⎠                                                                                            ⎥
──────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────                                                                                            ⎥
2   2      2     2   2   2   3    2                2   2   2   3                                            2   2   2   3    2              2   2   2   3    2              2   2   2   3                                                                                                                                                 ⎥
 ⋅L₃ ⋅m₂⋅m₃  + L₁ ⋅L₂ ⋅L₃ ⋅m₃ ⋅cos (t₁ - t₂) - 2⋅L₁ ⋅L₂ ⋅L₃ ⋅m₃ ⋅cos(t₁ - t₂)⋅cos(t₁ - t₃)⋅cos(t₂ - t₃) + L₁ ⋅L₂ ⋅L₃ ⋅m₃ ⋅cos (t₁ - t₃) + L₁ ⋅L₂ ⋅L₃ ⋅m₃ ⋅cos (t₂ - t₃) - L₁ ⋅L₂ ⋅L₃ ⋅m₃                                                                                                                                                  ⎥
                                                                                                                                                                                                                                                                                                                                          ⎥
                   ⎞         ⎛     2                     2                         ⎞ ⎛    2                              2                                           2                              2         2                               2         2             ⎞                                                                   ⎥
m₂⋅sin(t₂) - g⋅m₃⋅sin(t₂)⎠ - L₃⋅m₃⋅⎝L₁⋅ṫ₁ ⋅sin(t₁ - t₃) + L₂⋅ṫ₂ ⋅sin(t₂ - t₃) - g⋅sin(t₃)⎠⋅⎝- L₁ ⋅L₂⋅L₃⋅m₁⋅m₃⋅cos(t₂ - t₃) + L₁ ⋅L₂⋅L₃⋅m₂⋅m₃⋅cos(t₁ - t₂)⋅cos(t₁ - t₃) - L₁ ⋅L₂⋅L₃⋅m₂⋅m₃⋅cos(t₂ - t₃) + L₁ ⋅L₂⋅L₃⋅m₃ ⋅cos(t₁ - t₂)⋅cos(t₁ - t₃) - L₁ ⋅L₂⋅L₃⋅m₃ ⋅cos(t₂ - t₃)⎠                                                                   ⎥
───────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────                                                                   ⎥
 2   2      2     2   2   2   3    2                2   2   2   3                                            2   2   2   3    2              2   2   2   3    2              2   2   2   3                                                                                                                                                ⎥
₂ ⋅L₃ ⋅m₂⋅m₃  + L₁ ⋅L₂ ⋅L₃ ⋅m₃ ⋅cos (t₁ - t₂) - 2⋅L₁ ⋅L₂ ⋅L₃ ⋅m₃ ⋅cos(t₁ - t₂)⋅cos(t₁ - t₃)⋅cos(t₂ - t₃) + L₁ ⋅L₂ ⋅L₃ ⋅m₃ ⋅cos (t₁ - t₃) + L₁ ⋅L₂ ⋅L₃ ⋅m₃ ⋅cos (t₂ - t₃) - L₁ ⋅L₂ ⋅L₃ ⋅m₃                                                                                                                                                 ⎥
                                                                                                                                                                                                                                                                                                                                          ⎥
  2                              2         2                               2         2             ⎞         ⎛     2                     2                         ⎞ ⎛  2   2           2   2           2   2   2    2              2   2   2       2   2          2                2   2           2   2   2    2              2   2   2⎞⎥
t₃) - L₁ ⋅L₂⋅L₃⋅m₂⋅m₃⋅cos(t₂ - t₃) + L₁ ⋅L₂⋅L₃⋅m₃ ⋅cos(t₁ - t₂)⋅cos(t₁ - t₃) - L₁ ⋅L₂⋅L₃⋅m₃ ⋅cos(t₂ - t₃)⎠ - L₃⋅m₃⋅⎝L₁⋅ṫ₁ ⋅sin(t₁ - t₃) + L₂⋅ṫ₂ ⋅sin(t₂ - t₃) - g⋅sin(t₃)⎠⋅⎝L₁ ⋅L₂ ⋅m₁⋅m₂ + L₁ ⋅L₂ ⋅m₁⋅m₃ - L₁ ⋅L₂ ⋅m₂ ⋅cos (t₁ - t₂) + L₁ ⋅L₂ ⋅m₂  - 2⋅L₁ ⋅L₂ ⋅m₂⋅m₃⋅cos (t₁ - t₂) + 2⋅L₁ ⋅L₂ ⋅m₂⋅m₃ - L₁ ⋅L₂ ⋅m₃ ⋅cos (t₁ - t₂) + L₁ ⋅L₂ ⋅m₃ ⎠⎥
──────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────⎥
 2   2      2     2   2   2   3    2                2   2   2   3                                            2   2   2   3    2              2   2   2   3    2              2   2   2   3                                                                                                                                                ⎥
₂ ⋅L₃ ⋅m₂⋅m₃  + L₁ ⋅L₂ ⋅L₃ ⋅m₃ ⋅cos (t₁ - t₂) - 2⋅L₁ ⋅L₂ ⋅L₃ ⋅m₃ ⋅cos(t₁ - t₂)⋅cos(t₁ - t₃)⋅cos(t₂ - t₃) + L₁ ⋅L₂ ⋅L₃ ⋅m₃ ⋅cos (t₁ - t₃) + L₁ ⋅L₂ ⋅L₃ ⋅m₃ ⋅cos (t₂ - t₃) - L₁ ⋅L₂ ⋅L₃ ⋅m₃                                                                                                                                                 ⎦

需要一段时间才能简化这一点。但实际上并没有变得更简单。 SO字符限制使我无法粘贴以下简化(SOL)的结果。

Firstly it is generally better in SymPy to avoid the use of floats so change 1/2 to Rational(1, 2) or S.Half or S(1)/2 etc.

The expressions involved here are quite long and complicated. I'm going to replace all the functions and derivatives with plain symbols so that we can see it a bit better:

t1, t2, t3 = symbols('t1:4')
dt1, dt2, dt3 = symbols('tdot1:4')
ddt1, ddt2, ddt3 = symbols('tddot1:4')

rep = {
        the1:t1, the2:t2, the3:t3,
        the1_d:dt1, the2_d:dt2, the3_d:dt3,
        the1_dd:ddt1, the2_dd:ddt2, the3_dd:ddt3,
        }

eqs = [eq.subs(rep).trigsimp() for eq in [LE1, LE2, LE3]]
syms = [ddt1, ddt2, ddt3]

I also used trigsimp there to reduce using trig which does take some time. (There are various ways you can speed that up if you know exactly what type of simplification you are looking for.)

Now that they are a bit simpler let's take a look at these equations:

In [4]: for eq in eqs: pprint(eq)
    ⎛                                                                 2                                                2                                                2                                                          ⎞
-L₁⋅⎝L₁⋅m₁⋅ẗ₁ + L₁⋅m₂⋅ẗ₁ + L₁⋅m₃⋅ẗ₁ + L₂⋅m₂⋅ẗ₂⋅cos(t₁ - t₂) + L₂⋅m₂⋅ṫ₂ ⋅sin(t₁ - t₂) + L₂⋅m₃⋅ẗ₂⋅cos(t₁ - t₂) + L₂⋅m₃⋅ṫ₂ ⋅sin(t₁ - t₂) + L₃⋅m₃⋅ẗ₃⋅cos(t₁ - t₃) + L₃⋅m₃⋅ṫ₃ ⋅sin(t₁ - t₃) + g⋅m₁⋅sin(t₁) + g⋅m₂⋅sin(t₁) + g⋅m₃⋅sin(t₁)⎠
   ⎛                                 2                                                2                                                                      2                                           ⎞
L₂⋅⎝-L₁⋅m₂⋅ẗ₁⋅cos(t₁ - t₂) + L₁⋅m₂⋅ṫ₁ ⋅sin(t₁ - t₂) - L₁⋅m₃⋅ẗ₁⋅cos(t₁ - t₂) + L₁⋅m₃⋅ṫ₁ ⋅sin(t₁ - t₂) - L₂⋅m₂⋅ẗ₂ - L₂⋅m₃⋅ẗ₂ - L₃⋅m₃⋅ẗ₃⋅cos(t₂ - t₃) - L₃⋅m₃⋅ṫ₃ ⋅sin(t₂ - t₃) - g⋅m₂⋅sin(t₂) - g⋅m₃⋅sin(t₂)⎠
      ⎛                           2                                          2                                 ⎞
L₃⋅m₃⋅⎝-L₁⋅ẗ₁⋅cos(t₁ - t₃) + L₁⋅ṫ₁ ⋅sin(t₁ - t₃) - L₂⋅ẗ₂⋅cos(t₂ - t₃) + L₂⋅ṫ₂ ⋅sin(t₂ - t₃) - L₃⋅ẗ₃ - g⋅sin(t₃)⎠

So we want to solve for the double dot symbols and we can see that it's all just linear so we can convert this into matrices:

In [5]: A, b = linear_eq_to_matrix(eqs, syms)

In [6]: A
Out[6]: 
⎡         -L₁⋅(L₁⋅m₁ + L₁⋅m₂ + L₁⋅m₃)           -L₁⋅(L₂⋅m₂⋅cos(t₁ - t₂) + L₂⋅m₃⋅cos(t₁ - t₂))  -L₁⋅L₃⋅m₃⋅cos(t₁ - t₃)⎤
⎢                                                                                                                    ⎥
⎢L₂⋅(-L₁⋅m₂⋅cos(t₁ - t₂) - L₁⋅m₃⋅cos(t₁ - t₂))               L₂⋅(-L₂⋅m₂ - L₂⋅m₃)               -L₂⋅L₃⋅m₃⋅cos(t₂ - t₃)⎥
⎢                                                                                                                    ⎥
⎢                                                                                                        2           ⎥
⎣           -L₁⋅L₃⋅m₃⋅cos(t₁ - t₃)                         -L₂⋅L₃⋅m₃⋅cos(t₂ - t₃)                     -L₃ ⋅m₃        ⎦

In [7]: b
Out[7]: 
⎡   ⎛        2                        2                        2                                                          ⎞⎤
⎢L₁⋅⎝L₂⋅m₂⋅ṫ₂ ⋅sin(t₁ - t₂) + L₂⋅m₃⋅ṫ₂ ⋅sin(t₁ - t₂) + L₃⋅m₃⋅ṫ₃ ⋅sin(t₁ - t₃) + g⋅m₁⋅sin(t₁) + g⋅m₂⋅sin(t₁) + g⋅m₃⋅sin(t₁)⎠⎥
⎢                                                                                                                          ⎥
⎢           ⎛        2                        2                        2                                           ⎞       ⎥
⎢       -L₂⋅⎝L₁⋅m₂⋅ṫ₁ ⋅sin(t₁ - t₂) + L₁⋅m₃⋅ṫ₁ ⋅sin(t₁ - t₂) - L₃⋅m₃⋅ṫ₃ ⋅sin(t₂ - t₃) - g⋅m₂⋅sin(t₂) - g⋅m₃⋅sin(t₂)⎠       ⎥
⎢                                                                                                                          ⎥
⎢                                     ⎛     2                     2                         ⎞                              ⎥
⎣                              -L₃⋅m₃⋅⎝L₁⋅ṫ₁ ⋅sin(t₁ - t₃) + L₂⋅ṫ₂ ⋅sin(t₂ - t₃) - g⋅sin(t₃)⎠                              ⎦

Directly computing the inverse here happens to be a bit slow but we can do it faster using adjugate:

In [8]: sol = A.adjugate()*b/A.det()

In [9]: sol
Out[9]: 
⎡                                                                                              ⎛  2   2           2   2   2    2              2   2   2⎞ ⎛        2                        2                        2                                                          ⎞      ⎛          2                              2   2                        2   2                          ⎞ ⎛        2                        2                        2                
⎢                                                                                           L₁⋅⎝L₂ ⋅L₃ ⋅m₂⋅m₃ - L₂ ⋅L₃ ⋅m₃ ⋅cos (t₂ - t₃) + L₂ ⋅L₃ ⋅m₃ ⎠⋅⎝L₂⋅m₂⋅ṫ₂ ⋅sin(t₁ - t₂) + L₂⋅m₃⋅ṫ₂ ⋅sin(t₁ - t₂) + L₃⋅m₃⋅ṫ₃ ⋅sin(t₁ - t₃) + g⋅m₁⋅sin(t₁) + g⋅m₂⋅sin(t₁) + g⋅m₃⋅sin(t₁)⎠ - L₂⋅⎝- L₁⋅L₂⋅L₃ ⋅m₂⋅m₃⋅cos(t₁ - t₂) - L₁⋅L₂⋅L₃ ⋅m₃ ⋅cos(t₁ - t₂) + L₁⋅L₂⋅L₃ ⋅m₃ ⋅cos(t₁ - t₃)⋅cos(t₂ - t₃)⎠⋅⎝L₁⋅m₂⋅ṫ₁ ⋅sin(t₁ - t₂) + L₁⋅m₃⋅ṫ₁ ⋅sin(t₁ - t₂) - L₃⋅m₃⋅ṫ₃ ⋅sin(t₂ - 
⎢                                                                                           ──────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────
⎢                                                                                                                                                   2   2   2              2   2   2      2    2              2   2   2      2     2   2   2   2       2              2   2   2   2          2   2   2      2    2                2   2   2      2                                            2   2   2      2    2              2   2   2      2    2                2   
⎢                                                                                                                                               - L₁ ⋅L₂ ⋅L₃ ⋅m₁⋅m₂⋅m₃ + L₁ ⋅L₂ ⋅L₃ ⋅m₁⋅m₃ ⋅cos (t₂ - t₃) - L₁ ⋅L₂ ⋅L₃ ⋅m₁⋅m₃  + L₁ ⋅L₂ ⋅L₃ ⋅m₂ ⋅m₃⋅cos (t₁ - t₂) - L₁ ⋅L₂ ⋅L₃ ⋅m₂ ⋅m₃ + 2⋅L₁ ⋅L₂ ⋅L₃ ⋅m₂⋅m₃ ⋅cos (t₁ - t₂) - 2⋅L₁ ⋅L₂ ⋅L₃ ⋅m₂⋅m₃ ⋅cos(t₁ - t₂)⋅cos(t₁ - t₃)⋅cos(t₂ - t₃) + L₁ ⋅L₂ ⋅L₃ ⋅m₂⋅m₃ ⋅cos (t₁ - t₃) + L₁ ⋅L₂ ⋅L₃ ⋅m₂⋅m₃ ⋅cos (t₂ - t₃) - 2⋅L₁ ⋅L₂
⎢                                                                                                                                                                                                                                                                                                                                                                                                                                                                         
⎢                                                                      ⎛          2                              2   2                        2   2                          ⎞ ⎛        2                        2                        2                                                          ⎞      ⎛  2   2           2   2           2   2   2    2              2   2   2⎞ ⎛        2                        2                        2                        
⎢                                                                   L₁⋅⎝- L₁⋅L₂⋅L₃ ⋅m₂⋅m₃⋅cos(t₁ - t₂) - L₁⋅L₂⋅L₃ ⋅m₃ ⋅cos(t₁ - t₂) + L₁⋅L₂⋅L₃ ⋅m₃ ⋅cos(t₁ - t₃)⋅cos(t₂ - t₃)⎠⋅⎝L₂⋅m₂⋅ṫ₂ ⋅sin(t₁ - t₂) + L₂⋅m₃⋅ṫ₂ ⋅sin(t₁ - t₂) + L₃⋅m₃⋅ṫ₃ ⋅sin(t₁ - t₃) + g⋅m₁⋅sin(t₁) + g⋅m₂⋅sin(t₁) + g⋅m₃⋅sin(t₁)⎠ - L₂⋅⎝L₁ ⋅L₃ ⋅m₁⋅m₃ + L₁ ⋅L₃ ⋅m₂⋅m₃ - L₁ ⋅L₃ ⋅m₃ ⋅cos (t₁ - t₃) + L₁ ⋅L₃ ⋅m₃ ⎠⋅⎝L₁⋅m₂⋅ṫ₁ ⋅sin(t₁ - t₂) + L₁⋅m₃⋅ṫ₁ ⋅sin(t₁ - t₂) - L₃⋅m₃⋅ṫ₃ ⋅sin(t₂ - t₃) - g⋅
⎢                                                                   ──────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────
⎢                                                                                                                                                    2   2   2              2   2   2      2    2              2   2   2      2     2   2   2   2       2              2   2   2   2          2   2   2      2    2                2   2   2      2                                            2   2   2      2    2              2   2   2      2    2                2  
⎢                                                                                                                                                - L₁ ⋅L₂ ⋅L₃ ⋅m₁⋅m₂⋅m₃ + L₁ ⋅L₂ ⋅L₃ ⋅m₁⋅m₃ ⋅cos (t₂ - t₃) - L₁ ⋅L₂ ⋅L₃ ⋅m₁⋅m₃  + L₁ ⋅L₂ ⋅L₃ ⋅m₂ ⋅m₃⋅cos (t₁ - t₂) - L₁ ⋅L₂ ⋅L₃ ⋅m₂ ⋅m₃ + 2⋅L₁ ⋅L₂ ⋅L₃ ⋅m₂⋅m₃ ⋅cos (t₁ - t₂) - 2⋅L₁ ⋅L₂ ⋅L₃ ⋅m₂⋅m₃ ⋅cos(t₁ - t₂)⋅cos(t₁ - t₃)⋅cos(t₂ - t₃) + L₁ ⋅L₂ ⋅L₃ ⋅m₂⋅m₃ ⋅cos (t₁ - t₃) + L₁ ⋅L₂ ⋅L₃ ⋅m₂⋅m₃ ⋅cos (t₂ - t₃) - 2⋅L₁ ⋅L
⎢                                                                                                                                                                                                                                                                                                                                                                                                                                                                         
⎢   ⎛     2                                           2                              2      2                                  2      2             ⎞ ⎛        2                        2                        2                                                          ⎞      ⎛        2                        2                        2                                           ⎞ ⎛    2                              2                                         
⎢L₁⋅⎝L₁⋅L₂ ⋅L₃⋅m₂⋅m₃⋅cos(t₁ - t₂)⋅cos(t₂ - t₃) - L₁⋅L₂ ⋅L₃⋅m₂⋅m₃⋅cos(t₁ - t₃) + L₁⋅L₂ ⋅L₃⋅m₃ ⋅cos(t₁ - t₂)⋅cos(t₂ - t₃) - L₁⋅L₂ ⋅L₃⋅m₃ ⋅cos(t₁ - t₃)⎠⋅⎝L₂⋅m₂⋅ṫ₂ ⋅sin(t₁ - t₂) + L₂⋅m₃⋅ṫ₂ ⋅sin(t₁ - t₂) + L₃⋅m₃⋅ṫ₃ ⋅sin(t₁ - t₃) + g⋅m₁⋅sin(t₁) + g⋅m₂⋅sin(t₁) + g⋅m₃⋅sin(t₁)⎠ - L₂⋅⎝L₁⋅m₂⋅ṫ₁ ⋅sin(t₁ - t₂) + L₁⋅m₃⋅ṫ₁ ⋅sin(t₁ - t₂) - L₃⋅m₃⋅ṫ₃ ⋅sin(t₂ - t₃) - g⋅m₂⋅sin(t₂) - g⋅m₃⋅sin(t₂)⎠⋅⎝- L₁ ⋅L₂⋅L₃⋅m₁⋅m₃⋅cos(t₂ - t₃) + L₁ ⋅L₂⋅L₃⋅m₂⋅m₃⋅cos(t₁ - t₂)⋅cos(t₁ - 
⎢─────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────
⎢                                                                                                                                                    2   2   2              2   2   2      2    2              2   2   2      2     2   2   2   2       2              2   2   2   2          2   2   2      2    2                2   2   2      2                                            2   2   2      2    2              2   2   2      2    2                2  
⎣                                                                                                                                                - L₁ ⋅L₂ ⋅L₃ ⋅m₁⋅m₂⋅m₃ + L₁ ⋅L₂ ⋅L₃ ⋅m₁⋅m₃ ⋅cos (t₂ - t₃) - L₁ ⋅L₂ ⋅L₃ ⋅m₁⋅m₃  + L₁ ⋅L₂ ⋅L₃ ⋅m₂ ⋅m₃⋅cos (t₁ - t₂) - L₁ ⋅L₂ ⋅L₃ ⋅m₂ ⋅m₃ + 2⋅L₁ ⋅L₂ ⋅L₃ ⋅m₂⋅m₃ ⋅cos (t₁ - t₂) - 2⋅L₁ ⋅L₂ ⋅L₃ ⋅m₂⋅m₃ ⋅cos(t₁ - t₂)⋅cos(t₁ - t₃)⋅cos(t₂ - t₃) + L₁ ⋅L₂ ⋅L₃ ⋅m₂⋅m₃ ⋅cos (t₁ - t₃) + L₁ ⋅L₂ ⋅L₃ ⋅m₂⋅m₃ ⋅cos (t₂ - t₃) - 2⋅L₁ ⋅L

                           ⎞         ⎛     2                     2                         ⎞ ⎛     2                                           2                              2      2                                  2      2             ⎞                                                                                            ⎤
t₃) - g⋅m₂⋅sin(t₂) - g⋅m₃⋅sin(t₂)⎠ - L₃⋅m₃⋅⎝L₁⋅ṫ₁ ⋅sin(t₁ - t₃) + L₂⋅ṫ₂ ⋅sin(t₂ - t₃) - g⋅sin(t₃)⎠⋅⎝L₁⋅L₂ ⋅L₃⋅m₂⋅m₃⋅cos(t₁ - t₂)⋅cos(t₂ - t₃) - L₁⋅L₂ ⋅L₃⋅m₂⋅m₃⋅cos(t₁ - t₃) + L₁⋅L₂ ⋅L₃⋅m₃ ⋅cos(t₁ - t₂)⋅cos(t₂ - t₃) - L₁⋅L₂ ⋅L₃⋅m₃ ⋅cos(t₁ - t₃)⎠                                                                                            ⎥
──────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────                                                                                            ⎥
2   2      2     2   2   2   3    2                2   2   2   3                                            2   2   2   3    2              2   2   2   3    2              2   2   2   3                                                                                                                                                 ⎥
 ⋅L₃ ⋅m₂⋅m₃  + L₁ ⋅L₂ ⋅L₃ ⋅m₃ ⋅cos (t₁ - t₂) - 2⋅L₁ ⋅L₂ ⋅L₃ ⋅m₃ ⋅cos(t₁ - t₂)⋅cos(t₁ - t₃)⋅cos(t₂ - t₃) + L₁ ⋅L₂ ⋅L₃ ⋅m₃ ⋅cos (t₁ - t₃) + L₁ ⋅L₂ ⋅L₃ ⋅m₃ ⋅cos (t₂ - t₃) - L₁ ⋅L₂ ⋅L₃ ⋅m₃                                                                                                                                                  ⎥
                                                                                                                                                                                                                                                                                                                                          ⎥
                   ⎞         ⎛     2                     2                         ⎞ ⎛    2                              2                                           2                              2         2                               2         2             ⎞                                                                   ⎥
m₂⋅sin(t₂) - g⋅m₃⋅sin(t₂)⎠ - L₃⋅m₃⋅⎝L₁⋅ṫ₁ ⋅sin(t₁ - t₃) + L₂⋅ṫ₂ ⋅sin(t₂ - t₃) - g⋅sin(t₃)⎠⋅⎝- L₁ ⋅L₂⋅L₃⋅m₁⋅m₃⋅cos(t₂ - t₃) + L₁ ⋅L₂⋅L₃⋅m₂⋅m₃⋅cos(t₁ - t₂)⋅cos(t₁ - t₃) - L₁ ⋅L₂⋅L₃⋅m₂⋅m₃⋅cos(t₂ - t₃) + L₁ ⋅L₂⋅L₃⋅m₃ ⋅cos(t₁ - t₂)⋅cos(t₁ - t₃) - L₁ ⋅L₂⋅L₃⋅m₃ ⋅cos(t₂ - t₃)⎠                                                                   ⎥
───────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────                                                                   ⎥
 2   2      2     2   2   2   3    2                2   2   2   3                                            2   2   2   3    2              2   2   2   3    2              2   2   2   3                                                                                                                                                ⎥
₂ ⋅L₃ ⋅m₂⋅m₃  + L₁ ⋅L₂ ⋅L₃ ⋅m₃ ⋅cos (t₁ - t₂) - 2⋅L₁ ⋅L₂ ⋅L₃ ⋅m₃ ⋅cos(t₁ - t₂)⋅cos(t₁ - t₃)⋅cos(t₂ - t₃) + L₁ ⋅L₂ ⋅L₃ ⋅m₃ ⋅cos (t₁ - t₃) + L₁ ⋅L₂ ⋅L₃ ⋅m₃ ⋅cos (t₂ - t₃) - L₁ ⋅L₂ ⋅L₃ ⋅m₃                                                                                                                                                 ⎥
                                                                                                                                                                                                                                                                                                                                          ⎥
  2                              2         2                               2         2             ⎞         ⎛     2                     2                         ⎞ ⎛  2   2           2   2           2   2   2    2              2   2   2       2   2          2                2   2           2   2   2    2              2   2   2⎞⎥
t₃) - L₁ ⋅L₂⋅L₃⋅m₂⋅m₃⋅cos(t₂ - t₃) + L₁ ⋅L₂⋅L₃⋅m₃ ⋅cos(t₁ - t₂)⋅cos(t₁ - t₃) - L₁ ⋅L₂⋅L₃⋅m₃ ⋅cos(t₂ - t₃)⎠ - L₃⋅m₃⋅⎝L₁⋅ṫ₁ ⋅sin(t₁ - t₃) + L₂⋅ṫ₂ ⋅sin(t₂ - t₃) - g⋅sin(t₃)⎠⋅⎝L₁ ⋅L₂ ⋅m₁⋅m₂ + L₁ ⋅L₂ ⋅m₁⋅m₃ - L₁ ⋅L₂ ⋅m₂ ⋅cos (t₁ - t₂) + L₁ ⋅L₂ ⋅m₂  - 2⋅L₁ ⋅L₂ ⋅m₂⋅m₃⋅cos (t₁ - t₂) + 2⋅L₁ ⋅L₂ ⋅m₂⋅m₃ - L₁ ⋅L₂ ⋅m₃ ⋅cos (t₁ - t₂) + L₁ ⋅L₂ ⋅m₃ ⎠⎥
──────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────⎥
 2   2      2     2   2   2   3    2                2   2   2   3                                            2   2   2   3    2              2   2   2   3    2              2   2   2   3                                                                                                                                                ⎥
₂ ⋅L₃ ⋅m₂⋅m₃  + L₁ ⋅L₂ ⋅L₃ ⋅m₃ ⋅cos (t₁ - t₂) - 2⋅L₁ ⋅L₂ ⋅L₃ ⋅m₃ ⋅cos(t₁ - t₂)⋅cos(t₁ - t₃)⋅cos(t₂ - t₃) + L₁ ⋅L₂ ⋅L₃ ⋅m₃ ⋅cos (t₁ - t₃) + L₁ ⋅L₂ ⋅L₃ ⋅m₃ ⋅cos (t₂ - t₃) - L₁ ⋅L₂ ⋅L₃ ⋅m₃                                                                                                                                                 ⎦

It takes a while to simplify this but doesn't really get much simpler. The SO character limit prevents me from pasting the result of simplify(sol) below though.

~没有更多了~
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文