The function that is to be differentiated is,
2 cot( x 2 )
Differentiate the function with respect to x.
d dx ( 2 cot( x 2 ) )=2× 1 2 cot( x 2 ) d dx cot( x 2 ) = 1 cot( x 2 ) ( − cosec 2 ( x 2 ) ) d dx ( x 2 ) = 1 cot( x 2 ) ( − cosec 2 ( x 2 ) )( 2x ) = −2x cosec 2 ( x 2 ) cot( x 2 )