# derivative using chain rule within chain rule

I'm trying to find the derivative of this without using any tricks, just chain rule, but I'm getting lost

$$\sin^3\bigl(\cos\bigl(\sqrt{x^3 +2x^2}\bigr)\bigr)$$

well what confuses me is the power of 3 on the sin, my assumption would be to put $$-3\cos^2$$ and then multiply it by the inside brackets derivative, but is it like a chain rule within a chain rule?

• It is the custom on this site to format math with MathJax. You've been here long enough to know that. Here's a tutorial. To begin with, surround math expressions with$ signs. – saulspatz Oct 14 '20 at 17:43 • Yes, you can have multiple applications of chain rule in a row. Using Leibniz notation,$\frac{df}{dx}=\frac{df}{dg}\frac{dg}{dh}\frac{dh}{dx}$, or using Lagrange notation, letting$F(x)=f(g(h(x)))$you have$F'(x)=f'(g(h(x)))g'(h(x))h'(x)\$. This of course generalizes to any number of compositions of functions. – JMoravitz Oct 14 '20 at 17:46
• ahh I understand now, it was the application of chain rule 4 times basically – mushimaster Oct 14 '20 at 18:11

Yes chains inside chains.

One way to think about it is to just keep pushing out one more nested function and differentiating, working it like so.

$$\frac {d}{dx} \sin^3\sqrt{x^3 + 2x^2}\\ (3\sin^2\sqrt{x^3 + 2x^2})\frac {d}{dx}\sin\sqrt{x^3 + 2x^2}\\ (3\sin^2\sqrt{x^3 + 2x^2})(\cos\sqrt{x^3 + 2x^2})\frac {d}{dx}\sqrt{x^3 + 2x^2}\\ (3\sin^2\sqrt{x^3 + 2x^2})(\cos\sqrt{x^3 + 2x^2})(\frac {1}{2\sqrt{x^3+2x^2}})\frac {d}{dx}(x^3 + 2x^2)\\ (3\sin^2\sqrt{x^3 + 2x^2})(\cos\sqrt{x^3 + 2x^2})(\frac {1}{2\sqrt{x^3+2x^2}})(3x^2 + 4x)$$

The other is to think of the composition of functions beforehand.

$$u = x^3 + 2x^2\\ v = \sqrt u\\ w = \sin v\\ y = w^3$$

And then apply the chain rule:

$$\frac {dy}{dx} = \frac {dy}{dw}\frac {dw}{dv}\frac {dv}{du}\frac {du}{dx}\\ \frac {dy}{dx} = (3w^2)(\cos v)(\frac {1}{2\sqrt{u}})(3x^2 + 4x)\\ \frac {dy}{dx} = (3\sin^2 \sqrt{x^3+2x^2})(\cos \sqrt{x^3+2x^2})(\frac {1}{2\sqrt{x^3+2x^2}})(3x^2 + 4x)\\$$

I would say the second approach is conceptually more difficult, but easier to keep organized.

Let $$u=f(x),\text{then},(u^n)'=nu'u^{n-1}$$

$$(\cos u)'=u'(-\sin u)$$

$$(\sqrt u)'=\dfrac{u'}{2\sqrt u}$$

$$y=\sin^3 (\cos(\sqrt{x^3 +2x^2}))$$

$$y'=3 (\cos(\sqrt{x^3 +2x^2}))' \cos (\cos(\sqrt{x^3 +2x^2})) \sin^2 (\cos(\sqrt{x^3 +2x^2}))= 3 (\sqrt{x^3 +2x^2})' (-\sin(\sqrt{x^3 +2x^2})) \cos (\cos(\sqrt{x^3 +2x^2})) \sin^2 (\cos(\sqrt{x^3 +2x^2}))= 3\times \dfrac{(3x^2+4x)}{2\sqrt{x^3 +2x^2} } \times (-\sin(\sqrt{x^3 +2x^2})) \times \cos (\cos(\sqrt{x^3 +2x^2}))\times \sin^2 (\cos(\sqrt{x^3 +2x^2}))$$

Let $$u(x) = \cos(\sqrt{x^{3}+2x^{2}})$$. Then, your function reads $$\sin^{3}(u(x))$$. By the chain rule: $$\begin{eqnarray} \frac{d}{dx} \sin^{3}(u(x)) = 3\sin^{2}(u(x))\cos(u(x))\frac{d}{dx}u(x) \tag{1}\label{1} \end{eqnarray}$$ Analogously: $$\begin{eqnarray} \frac{d}{dx}u(x) = -\sin(\sqrt{x^{3}+2x^{2}})\frac{d}{dx}\sqrt{x^{3}+2x^{2}} \tag{2}\label{2} \end{eqnarray}$$ and, finally: $$\begin{eqnarray} \frac{d}{dx} \sqrt{x^{3}+2x^{2}} = \frac{1}{2}\frac{1}{\sqrt{x^{3}+2x^{2}}}\frac{d}{dx}(x^{3}+2x^{2}) = \frac{1}{2\sqrt{x^{3}+2x^{2}}}(3x^{2}+4x)\tag{3}\label{3} \end{eqnarray}$$ Putting (\ref{1}), (\ref{2}) and (\ref{3}) together, we get: $$\begin{eqnarray} \frac{d}{dx}\sin^{3}(\cos(\sqrt{x^{3}+2x^{2}}))= \frac{-(9x^{2}+12x)\sin^{2}(\cos(\sqrt{x^{3}+2x^{2}}))\cos(\cos(\sqrt{x^{3}+2x^{2}}))\sin(\cos(\sqrt{x^{3}+2x^{2}}))}{\sqrt{x^{3}+2x^{2}}} \end{eqnarray}$$

This is Leibniz'notation is useful, albeit heavy: \begin{alignat}{2} \quad&\frac{\mathrm d\Bigl(\sin^3\bigl(\cos\bigl(\sqrt{x^3 +2x^2}\bigr)\bigr) \Bigr)}{\mathrm d x}=&& \\ &\qquad\frac{\mathrm d\Bigl(\sin^3\bigl(\cos\bigl(\sqrt{x^3 +2x^2}\bigr)\bigr) \Bigr)}{\mathrm d\Bigl(\sin\bigl(\cos\bigl(\sqrt{x^3 +2x^2}\bigr)\bigr) \Bigr)}&\times\frac{\mathrm d\Bigl(\sin\bigl(\cos\bigl(\sqrt{x^3 +2x^2}\bigr)\bigr) \Bigr)}{\mathrm d\bigl(\cos\bigl(\sqrt{x^3 +2x^2}\bigr)\bigr)}&\times \frac{\mathrm d\bigl(\cos\bigl(\sqrt{x^3 +2x^2}\bigr)\bigr)}{\mathrm d\bigl(\sqrt{x^3 +2x^2}\bigr)}\\ &&\times\frac{\mathrm d\bigl(\sqrt{x^3 +2x^2}\bigr)}{\mathrm d\bigl(x^3 +2x^2\bigr)}&\times \frac{\mathrm d(x^3+2x^2)}{\mathrm dx} \end{alignat} \begin{align} \text{i.e. }\qquad3\sin^2\bigl(\cos\bigl(\sqrt{x^3 +2x^2}\bigr)\bigr) \times \cos\bigl(\cos\bigl(\sqrt{x^3 +2x^2}\bigr)\bigr)&\times\bigl(-\sin\bigl(\sqrt{x^3 +2x^2}\bigr) \\ {}\times \frac 1{2\sqrt{x^3 +2x^2}}&\times (3x^2+4x). \end{align}