# What is the derivative of f(x) = ln(sin^2x)?

Nov 6, 2015

Applying the chain rule, $\frac{d}{\mathrm{dx}} \ln \left({\sin}^{2} \left(x\right)\right) = 2 \cot \left(x\right)$

#### Explanation:

The chain rule states that $\frac{d}{\mathrm{dx}} f \left(g \left(x\right)\right) = f ' \left(g \left(x\right)\right) \cdot g ' \left(x\right)$

Let $f \left(x\right) = \ln \left(x\right)$ and $g \left(x\right) = {\sin}^{2} \left(x\right)$

Then $f ' \left(x\right) = \frac{1}{x}$

To find $g ' \left(x\right)$ we need to use the chain rule again with ${g}_{1} \left(x\right) = {x}^{2}$ and ${g}_{2} \left(x\right) = \sin \left(x\right)$

Then ${g}_{1} ' \left(x\right) = 2 x$ and ${g}_{2} ' \left(x\right) = \cos \left(x\right)$
So, as $g \left(x\right) = {g}_{1} \left({g}_{2} \left(x\right)\right)$
$g ' \left(x\right) = {g}_{1} ' \left({g}_{2} \left(x\right)\right) \cdot {g}_{2} ' \left(x\right) = 2 \sin \left(x\right) \cdot \cos \left(x\right)$

Going back to the original problem, we have
$\ln \left({\sin}^{2} \left(x\right)\right) = f \left(g \left(x\right)\right)$

so, applying the chain rule, we get
$\frac{d}{\mathrm{dx}} \ln \left({\sin}^{2} \left(x\right)\right) = f ' \left(g \left(x\right)\right) \cdot g ' \left(x\right) = \frac{1}{{\sin}^{2} \left(x\right)} \cdot 2 \sin \left(x\right) \cos \left(x\right)$

Finally, simplifying gives us the final result of

$\frac{d}{\mathrm{dx}} \ln \left({\sin}^{2} \left(x\right)\right) = 2 \cot \left(x\right)$