令 tan(x/2) = u, 则 cosx = (1-u^2)/(1+u^2), dx = 2du/(1+u^2)
原式 I = ∫2(1-r^2)du/[(1+r^2)(1+u^2)-2r(1-u^2)]
= 2(1-r^2)∫du/[(1-r)^2+(1+r)^2u^2)]
当 0
= 2(1+r)arctan[(1+r)tan(x/2)/(1-r)] + C;
当 r = 1 时, I = C;
当 r > 1 时,
I = [2(1-r^2)/(r-1)]arctan[(1+r)u/(r-1)] + C
= -2(1+r)arctan[(r+1)tan(x/2)/(r-1)] + C.