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 pendulum. See this article for the derivation of the equations of motion.
Diagram of the double pendulum. The equations being solved in this webpage are
θ¨1=(12m1r+m1b+m2b)l1−1[m2bl2(θ¨2cos(θ1−θ2)+θ˙22sin(θ1−θ2))+gcosθ1(2m1r+m2r+m1b+m2b)−(b1b+c1bl1θ˙1)l1θ˙1+(b2b+c2bl12θ˙12+l22θ˙22+2l1l2θ˙1θ˙2cos(θ1−θ2))(l1θ˙1+l2θ˙2cos(θ1−θ2))+(b1r+2c1rl1θ˙1)4l1θ˙1+b2r+c2rl12θ˙12+4l22θ˙22+l2θ˙1θ˙2cos(θ1−θ2)(l1θ˙1+2l2θ˙2cos(θ1−θ2))θ¨2=(12m2r+m2b)l2−(12m1r+m1b+m2b)m2b2l2cos2(θ1−θ2)1(12m1r+m1b+m2b)m2bcos(θ1−θ2)[m2bl2θ˙22sin(θ1−θ2)+gcosθ1(2m1r+m2r+m1b+m2b)−(b1b+c1bl1θ˙1)l1θ˙1+(b2b+c2bl12θ˙12+l22θ˙22+2l1l2θ˙1θ˙2cos(θ1−θ2))(l1θ˙1+l2θ˙2cos(θ1−θ2))+(b1r+2c1rl1θ˙1)4l1θ˙1+b2r+c2rl12θ˙12+4l22θ˙22+l2θ˙1θ˙2cos(θ1−θ2)(l1θ˙1+2l2θ˙2cos(θ1−θ2))]+m2b(l1θ˙12sin(θ1−θ2)−gcosθ2)−41b2r+c2rl12θ˙12+4l22θ˙22+l1l2θ˙1θ˙2cos(θ1−θ2)(2l1θ˙1cos(θ1−θ2)+l2θ˙2)−(b2b+c2bl12θ˙12+l22θ˙22+2l1l2θ˙1θ˙2cos(θ1−θ2))(l1θ˙1cos(θ1−θ2)+l2θ˙2)].