Let
t=logtan[x/2]
⇒dt=1/ tan[x/2] * sec^2 x/2 × ½ dx
⇒dt=1/2 cos^2 x/2 × cot x/2dx
⇒dt=1/2 * 1/ cos^2 x/2 × cosx/2 / sin x/2 dx
⇒dt=1/2 cosx/2 / sin x/2 dx
⇒dt=1/sinxdx
⇒dt=cosecxdx
Putting it in the integration we get,
∫cosecx / log tan(x/2)dx
=∫dt/t
=log∣t∣+c
=log∣logtan x/2∣+c where t= logtan x/2