楕円の周の長さを求める の 4行目、 dx=a\cos \theta , dy=-b\sin \theta ですが、 dx = a \cos \theta d\theta , dy = -b \sin \theta d\theta ですよね?