The idea of "name changing" is not useful. The only function that does NOT "change its name" when differentiated is the exponential:
\(\displaystyle \displaystyle \frac{d}{dx}\left( e^x\right) = e^x\)
No other function besides the exponential is its own derivative.
The reason there is still a cotangent in the first example is because of the power law.
\(\displaystyle \displaystyle \frac{d}{dx}\left( u^n\right) = n\ u^{n-1}\ \frac{du}{dx}\)
The "logic" of trigonometric derivatives is that the derivative of the sine is the cosine, and the the derivative of the cosine is the negative of the sine. All other derivatives of trig functions follow from those two - which are the only ones I have memorized. There is symmetry and beauty in that truth. That's all I know on earth, and all I need to know.