Verification, in public
Compute · D-001
What this verifies
The Euler–Lagrange generator reproduces the known double-pendulum equations of motion
We build the Lagrangian L = T − V for the two-bob system, hand it to a symbolic Euler–Lagrange routine, and check that the two generated second-order equations match the standard textbook form term-for-term.
← Back to the derivation, D-001
d001_double_pendulum_EL.ipynb
check passed · 4 s.f.
t, m1, m2, l1, l2, g = symbols('t m1 m2 l1 l2 g', positive=True)
th1, th2 = dynamicsymbols('theta1 theta2')
L = T_kinetic(th1, th2) - V_potential(th1, th2) # L = T − V
eom = euler_lagrange(L, [th1, th2]) # generate 2 ODEs
assert simplify(eom - textbook_eom) == Matrix([0, 0]) # ✓ match
Get it
Reproduce this yourself
Everything the check runs on is public — nothing is hidden behind the pass badge.
Download .ipynb View source Run in browser
Symbols carried to the end; numbers substituted only for the units check B.
Tier 3: the assert compares simplify(eom − textbook_eom) to zero, so trigonometric rewrites and sign conventions are folded in before the equality is trusted C.