integrate d^2/(R^2*tan^2(x)) dx from arctan(d/R) to pi/2