(-g*(2*m1+m2)*sin(a1)-m2*g*sin(a1-2*a2)-2*sin(a1-a2)*m2*(a2_v*r2+a1_v*r1*cos(a1-a2))) / (r1*(2*m1+m2-m2*cos(2*a1-2*a2)))

(2*sin(a1-a2)*(a1_v*r1*(m1+m2)+g*(m1+m2)*cos(a1)+a2_v*r2*m2*cos(a1-a2))) / (r2*(2*m1+m2-m2*cos(2*a1-2*a2)))