I found this question in the review of a chapter that covered derivatives, implicit differentiation, related rates, inverse functions, one-to-one functions, derivatives of higher order.
Let $f,g: \mathbb{R}\rightarrow(0,\infty)$ be differentiable functions. Find the derivative of $$H(x)=[f(x)]^{x^2+1}-[\cos(2x)]^{g(x)} .$$
I derived it as follows: $$(x^2+1)[f(x)]^{x^{2}}+2\sin(2x)g(x)[\cos(2x)]^{g(x)-1}$$
I strongly believe that there is something else required to differentiate this function but I am not sure what I should be looking for. I thought about isolating $f(x)$ and $g(x)$ and representing each in terms of $x$ and then substituting into $h(x)$ before differentiating but I'm not sure if this is required and how to accomplish this.
Hint For differentiable, positive functions $a, b : \Bbb R \to (0, \infty)$, we can write $$a(x)^{b(x)} = \exp [b(x) \log a(x)] .$$ Then, we can apply the chain rule, the product rule, and the rule $\frac{d}{du} \log u = \frac{1}{u}$.
Alternatively, we can take the logarithm of both sides of $y(x) := a(x)^{b(x)}$, implicitly differentiate to get an equation $\frac{y'(x)}{y(x)} = \cdots$, solve for $y'(x)$, and substitute for $y(x)$ to write $y'(x)$ in terms of $a(x)$, $b(x)$, and their derivatives.