I'll leave the very little bit of possible simplification to you.
just learned it yesterday.. guess this is good practice. only question. why after you took the derivative of the outermost term, did you put * (-2cotx ...)? i understand that you brought the 2 to the front using the power rule.. but wouldn't it stay positive?