# How do you differentiate f(x)=ln(6 sin^2(x^3 + 2x)) using the chain rule?

Feb 11, 2016

$f ' \left(x\right) = \left(6 {x}^{2} + 4\right) \cot \left({x}^{3} + 2 x\right)$

#### Explanation:

The first issue is the natural logarithm. We can use the chain rule to apply specifically to natural logarithm functions:

$\frac{d}{\mathrm{dx}} \left(\ln \left(x\right)\right) = \frac{1}{x} \text{ "=>" } \frac{d}{\mathrm{dx}} \left(\ln \left(g \left(x\right)\right)\right) = \frac{1}{g \left(x\right)} \cdot g ' \left(x\right)$

Applying this to the function at hand, we see that

$f ' \left(x\right) = \frac{1}{6 {\sin}^{2} \left({x}^{3} + 2 x\right)} \cdot \frac{d}{\mathrm{dx}} \left(6 {\sin}^{2} \left({x}^{3} + 2 x\right)\right)$

We can simplify this very slightly to avoid length issues:

$f ' \left(x\right) = \frac{\frac{d}{\mathrm{dx}} \left(6 {\sin}^{2} \left({x}^{3} + 2 x\right)\right)}{6 {\sin}^{2} \left({x}^{3} + 2 x\right)}$

Be careful about the next step. You may be tempted to immediately try to deal with the sine function, but the overriding issue here is the fact that the sine function is squared. Use the chain rule in the case of a squared function:

$\frac{d}{\mathrm{dx}} \left({x}^{2}\right) = 2 x \text{ "=>" } \frac{d}{\mathrm{dx}} {\left(h \left(x\right)\right)}^{2} = 2 h \left(x\right) \cdot h ' \left(x\right)$

This yields

$f ' \left(x\right) = \frac{12 \sin \left({x}^{3} + 2 x\right) \cdot \frac{d}{\mathrm{dx}} \left(\sin \left({x}^{3} + 2 x\right)\right)}{6 {\sin}^{2} \left({x}^{3} + 2 x\right)}$

We can take a moment to simplify:

$f ' \left(x\right) = \frac{2 \cdot \frac{d}{\mathrm{dx}} \left(\sin \left({x}^{3} + 2 x\right)\right)}{\sin} \left({x}^{3} + 2 x\right)$

Now, we can differentiate the sine function through the chain rule:

$\frac{d}{\mathrm{dx}} \left(\sin \left(x\right)\right) = \cos \left(x\right) \text{ "=>" } \frac{d}{\mathrm{dx}} \left(\sin \left(k \left(x\right)\right)\right) = \cos \left(k \left(x\right)\right) \cdot k ' \left(x\right)$

Applying this allows us to obtain

$f ' \left(x\right) = \frac{2 \cos \left({x}^{3} + 2 x\right) \cdot \frac{d}{\mathrm{dx}} \left({x}^{3} + 2 x\right)}{\sin} \left({x}^{3} + 2 x\right)$

The calculus gods allow us a moment of respite as we use the power rule to differentiate ${x}^{3} + 2 x$:

$f ' \left(x\right) = \frac{2 \left(3 {x}^{2} + 2\right) \cos \left({x}^{3} + 2 x\right)}{\sin} \left({x}^{3} + 2 x\right)$

Now, for a tiny bit of simplification we can distribute the $2$ into $\left(3 {x}^{2} + 2\right)$ and recognize the $\cos \frac{\theta}{\sin} \left(\theta\right) = \cot \left(\theta\right)$ pattern.

$f ' \left(x\right) = \left(6 {x}^{2} + 4\right) \cot \left({x}^{3} + 2 x\right)$