<s>[INST] Help finding the derivative of $f(x) = \cos{\left(\sqrt{e^{x^5} \sin{x}}\right)}$ I am trying to find the derivative of  $f(x) = \cos(\sqrt{(e^{x^5} \sin(x)})$.
I keep getting the wrong answer, and I'm not sure what I'm doing wrong.
$$\frac{d}{dx} e^{x^5} = e^{x^5} \cdot 5x^4$$
$$\frac{d}{dx} \sin(x) = \cos(x)$$
$$\frac{d}{dx} (e^{x ^5} \cdot \sin(x)) = [(e^{x^5} \cdot 5x^4) \cdot \sin(x)] + [\cos(x) \cdot e^{x^5}]$$
$$\frac{d}{dx} \sqrt{x} = \frac{1}{2\sqrt{x}}$$
$$\frac{d}{dx} \sqrt{(e^{x^5} \sin(x))} = \frac{[(e^{x^5} \cdot 5x^4) \cdot \sin(x)] + [\cos(x) \cdot e^{x^5}]}{2 \sqrt{e^{x^5} \sin(x)}}$$
Therefore, since $\frac{d}{dx} \cos(x) = -\sin(x)$, I have
$$ f'(x) = -\sin(\sqrt{e^{x^5} \sin(x)}) \cdot \frac{[(e^{x^5} \cdot 5x^4) \cdot \sin(x)] + [\cos(x) \cdot e^{x^5}]}{2 \sqrt{e^{x^5} \sin(x)}}$$
However, the website I'm using, "WeBWorK", says this is incorrect.
 [/INST] It may be a bit overkill but you can actually integrate your result and show it is equivalent to what you started with
$$ -\frac{1}{2}\int \left(\sin(\sqrt{e^{x^5} \sin(x)} \right) \frac{5x^4e^{x^5}   \sin(x) + \cos(x) e^{x^5}}{\sqrt{e^{x^5} \sin(x)}} dx,$$ 
let 
$$u(x) = \sqrt{e^{x^5} \sin(x)}, \qquad du = \frac{5x^4e^{x^5} \sin(x) + \cos(x) e^{x^5}}{\sqrt{e^{x^5} \sin(x)}} dx, $$
so the integral is simply
$$ - \int \sin(u)du, $$
which is what you started with. 
</s>