What is $\frac{d\left( (\cos(x))^{\cos(x)}\right)}{dx}$? How would you work something like this out? 
Are there similar problems to
$$\frac{d\left( (\cos(x))^{\cos(x)}\right)}{dx}$$
which could be worked out the same way?

The go-to way for the derivative of $f^g$ is $(f(x)^{g(x)})'=(e^{g(x)\ln f(x)})'$ and then use chain rule. Or knowing by heart the formula that follows directly from this procedure. Of course, when $f(x)>0$, because for some reason we appear to be in a moment where people seem to be very adamant about saying stuff like "$\left(\frac1x\right)'=-\frac{1}{x^2}$ holds only if $x\ne 0$".
