Note that:
1/tanx -1/cotx = cotx - tanx 1tanx−1cotx=cotx−tanx
1/tanx -1/cotx = cosx/sinx - sinx/cosx 1tanx−1cotx=cosxsinx−sinxcosx
1/tanx -1/cotx = (cos^2x-sin^2x)/(sinxcosx) 1tanx−1cotx=cos2x−sin2xsinxcosx
1/tanx -1/cotx = 1/2 (cos2x)/(sin2x) 1tanx−1cotx=12cos2xsin2x
1/tanx -1/cotx = 1/2 cot(2x) 1tanx−1cotx=12cot(2x)
so:
d/dx( 1/tanx -1/cotx ) = -csc^2 (2x)ddx(1tanx−1cotx)=−csc2(2x)