This webpage uses the Runge-Kutta-Fehlberg fourth-order method with fifth-order error checking (RKF45) to approximate the solution to the problem of the double elastic pendulum.
The equations that will be integrated here are derived in this article.
Diagram of the double elastic pendulum.
The ordinary differential equation system being solved is
⎣⎢⎢⎢⎡r¨1r¨2θ¨1θ¨2⎦⎥⎥⎥⎤=⎣⎢⎢⎢⎢⎢⎢⎢⎢⎡1cosΔ0−r2sinΔm1+m2m2cosΔ1(m1+m2)r1m2sinΔ00r1sinΔ1r2r1cosΔ−m1+m2m2r2sinΔ0(m1+m2)r1m2r2cosΔ1⎦⎥⎥⎥⎥⎥⎥⎥⎥⎤−1⎣⎢⎢⎢⎢⎢⎢⎢⎢⎢⎢⎢⎡r1θ˙12−gsinθ1+m1+m2m2(r2θ˙22cosΔ+2r˙2θ˙2sinΔ)+m1+m2Qr1−k1(r1−l1)r2θ˙22−gsinθ2+r1θ˙12cosΔ−2r˙1θ˙1sinΔ+m2Qr2−k2(r2−l2)−r12r˙1θ˙1−r1gcosθ1−(m1+m2)r1m2[2r˙2θ˙2cosΔ−r2θ˙22sinΔ]+(m1+m2)r12Qθ1−r22r˙2θ˙2−r2gcosθ2−r22r˙1θ˙1cosΔ−r2r1θ˙12sinΔ+m2r22Qθ2⎦⎥⎥⎥⎥⎥⎥⎥⎥⎥⎥⎥⎤.