#l=int sqrt(r^2+((dr)/(d theta))^2) d theta#
#r=1+costheta => (dr)/(d theta) = -sintheta#
#l = 2int_0^pi sqrt((1+costheta)^2+sin^2theta) d theta#
#l = 2int_0^pi sqrt(1+2costheta+cos^2theta+sin^2theta) d theta#
#l = 2int_0^pi sqrt(1+2costheta+1) d theta#
#l = 2int_0^pi sqrt(2+2costheta) d theta = 2 int_0^pi sqrt(2(1+costheta)) d theta#
#l = 2 int_0^pi sqrt(4cos^2(theta/2)) d theta = 2 int_0^pi 2cos(theta/2) d theta#
#l=8 sin(theta/2) |_0^pi = 8#