# 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.

• I don't see anything wrong with what you did. Can you find out what "WeBWork" thinks is the correct answer? It's possible it's just determined a different formula, but which is actually equivalent to what you've calculated. – John Omielan Mar 7 at 3:29
• @JohnOmielan Unfortunately, since this is a graded question, I don't have the answer. Ostensibly they don't care what the answer is written as, as long as it's equivalent. – LuminousNutria Mar 7 at 3:30
• Iv'e used WeBWork before... at least for me it quite often would say an answer was wrong when it was in fact correct. Your derivative looks good, so that might be it – Nick Guerrero Mar 7 at 3:32
• Well, you are missing a parenthesis. $-\sin ( ( \sqrt {(e^{x^5}\sin(x)})$ has three left parentheses and two right. – Acccumulation Mar 7 at 3:33
• Your answer is correct. WebWork is the absolute worst and I can really empathize with your struggle here. The problem could be any number of things - the teacher entering the solution incorrectly, the textbook company entering the solution incorrectly, or most likely, the dumb website evaluating your solution incorrectly. – MindS1 Mar 7 at 4:07

I differentiated your function and did not look at your result. As you can see, they're identical:

\begin{align} \frac{d}{dx}\left[\cos\left(\sqrt{e^{x^5}\cdot\sin{x}}\right)\right] &=-\sin{\left(\sqrt{e^{x^5}\cdot\sin{x}}\right)}\left(\sqrt{e^{x^5}\cdot\sin{x}}\right)'\\ &=-\sin{\left(\sqrt{e^{x^5}\cdot\sin{x}}\right)}\frac{1}{2\sqrt{e^{x^5}\cdot\sin{x}}}\left(e^{x^5}\cdot\sin{x}\right)'\\ &=-\sin{\left(\sqrt{e^{x^5}\cdot\sin{x}}\right)}\frac{1}{2\sqrt{e^{x^5}\cdot\sin{x}}}\left[\left(e^{x^5}\right)'\cdot\sin{x}+e^{x^5}\cdot\left(\sin{x}\right)'\right]\\ &=-\sin{\left(\sqrt{e^{x^5}\cdot\sin{x}}\right)}\frac{1}{2\sqrt{e^{x^5}\cdot\sin{x}}}\left[e^{x^5}\left(x^5\right)'\cdot\sin{x}+e^{x^5}\cdot\cos{x}\right]\\ &=-\sin{\left(\sqrt{e^{x^5}\cdot\sin{x}}\right)}\frac{1}{2\sqrt{e^{x^5}\cdot\sin{x}}}\left[5e^{x^5}x^4\cdot\sin{x}+e^{x^5}\cdot\cos{x}\right] \end{align}

Your differentiation skills are fine. It's the problem with the website that you're suing.

• Well, I don't think that incorrectly marking something wrong is necessarily worth taking legal action over :) – Acccumulation Mar 7 at 4:03

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)}$$

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.

Use the Chain Rule:

$$\dfrac{\mathrm d}{\mathrm dx}\cos(\sqrt{e^{x^5}\sin x})$$

$$=\dfrac{\mathrm d}{\mathrm d(\sqrt{e^{x^5}\sin x})}\cos(\sqrt{e^{x^5}\sin x})\cdot \dfrac{\mathrm d}{\mathrm d(e^{x^5}\sin x)}(\sqrt{e^{x^5}\sin x})\cdot \dfrac{\mathrm d}{\mathrm dx}(e^{x^5}\sin x)$$

$$=\dfrac{\mathrm d}{\mathrm d(\sqrt{e^{x^5}\sin x})}\cos(\sqrt{e^{x^5}\sin x})\cdot \dfrac{\mathrm d}{\mathrm d(e^{x^5}\sin x)}(\sqrt{e^{x^5}\sin x})\cdot \left(\sin x\dfrac{\mathrm d}{\mathrm dx}e^{x^5}+e^{x^5}\dfrac{\mathrm d}{\mathrm dx}\sin x\right)$$

$$=\dfrac{\mathrm d}{\mathrm d(\sqrt{e^{x^5}\sin x})}\cos(\sqrt{e^{x^5}\sin x})\cdot \dfrac{\mathrm d}{\mathrm d(e^{x^5}\sin x)}(\sqrt{e^{x^5}\sin x})\cdot \left[\sin x\left(\dfrac{\mathrm d}{\mathrm d(x^5)}e^{x^5}\cdot\dfrac{\mathrm d}{\mathrm dx}x^5\right)+e^{x^5}\dfrac{\mathrm d}{\mathrm dx}\sin x\right]$$

$$=-\sin(\sqrt{e^{x^5}\sin x})\cdot\dfrac{1}{2\sqrt{e^{x^5}\sin x}}\cdot \left[\sin x\cdot e^{x^5}\cdot 5x^4+e^{x^5}\cdot\cos x\right]$$