Equation of motion for the above double pendulum.

if c1,c2 are angle for those two pendulums, w1,w2 are angular frequency for two pendulum. (1 is the upper one)
m1,m2 are mass for two pendulum. gravity is g=9.8m/s[sup]2[/sup]
d(w1)/dt= -gravity*((m1+m2)*Math.sin(c1)-m2*Math.sin(c2)*Math.cos(c1-c2))/((m1+m2)-m2*Math.cos(c1-c2)*Math.cos(c1-c2))/L1;
d(w2)/dt= -gravity*(m1+m2)*(Math.sin(c1)*Math.cos(c1-c2)-Math.sin(c2))/(m2*Math.cos(c1-c2)*Math.cos(c1-c2)-(m1+m2))/L2;