We will be using the chain rule in this solution. For finding the derivative of #cot^2 (u)#, we can either use the link to the proof at emathzone.com
http://www.emathzone.com/tutorials/calculus/derivative-of-cotangent-squared-function.html
OR we can find the derivative using the product rule.
Chain rule: given a function #f (x)=g (h (x)), (df)/(dx)=h'(x)*g'(h)#.
Product Rule: when asked to differentiate a function of the form #f (x)=g (x)*h (x), (df)/dx = g'(x)*h (x) + g (x)*h'(x)#
To use the product rule, we will state the problem in a different form:
#f (x)=cot (sin x)*cot (sin x)#.
Therefore...
#(df)/dx= (d/dx (cot (sin x)))cot (sin x) + cot (sin x)(d/dx (cot (sin x))) = 2cot (sin x)d/dxcot (sin x)#
We must use the chain rule to differentiate the second term here. Recall that #d/dx cot(x) = -csc^2x# (proof given at the following link for sake of brevity): http://www.math.com/tables/derivatives/more/trig.htm#reciprocals
Further, we know #d/dx sin x = cos x#. Therefore if our function is #cot (sin x)#, our derivative will take the form #cos (x)(-csc^2(sin x))#
Thus, our overal, derivative is;
#(df)/dx = 2cot (sin x)((cos x)(-csc^2 (sin x))) = -2csc^2 (sin x)(cot (sin x))(cos (x))#