integral of r * sin ((pi/r)x) dx from 0 to 2r