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.

This is one case where logarithmic differentiation can make life easier.
$$
\frac{d}{dx}\left[\cos\left(\sqrt{e^{x^5}\,\sin(x)}\right)\right]
=-\sin{\left(\sqrt{e^{x^5}\,\sin(x)}\right)}\,\,\frac{d}{dx}\left[\sqrt{e^{x^5}\,\sin(x)}\right]$$
Let
$$f=\sqrt{e^{x^5}\,\sin(x)}\implies \log(f)=\frac 12 x^5 +\frac 12 \log(\sin(x))$$
$$\frac {f'}f=\frac{1}{2} \left(5 x^4+\cot (x)\right)\implies f'=\frac{1}{2} \left(5 x^4+\cot (x)\right)\sqrt{e^{x^5}\,\sin(x)}$$
$$\frac{d}{dx}\left[\cos\left(\sqrt{e^{x^5}\,\sin(x)}\right)\right]=-\frac{1}{2}\sin{\left(\sqrt{e^{x^5}\,\sin(x)}\right)}\,\, \left(5 x^4+\cot (x)\right)\sqrt{e^{x^5}\,\sin(x)}$$
