# How do you differentiate y = ln [x^4 sin^2 (x)]?

##### 1 Answer
Feb 20, 2016

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

See explanation for details.

#### Explanation:

I assume that you know how to use the chain rule and the product rule. If you don't please ask for further explanation in the comments.

Define: $f \left(x\right) = \ln \left[{x}^{4} {\sin}^{2} \left(x\right)\right]$

First use the chain rule:
$f ' \left(x\right) = \left(\frac{1}{{x}^{4} {\sin}^{2} \left(x\right)}\right) \left(\frac{d}{\mathrm{dx}} \left({x}^{4} {\sin}^{2} \left(x\right)\right)\right)$
Use the product rule to find $\frac{d}{\mathrm{dx}} \left({x}^{4} {\sin}^{2} \left(x\right)\right)$
To do this we'll need to know $\frac{d}{\mathrm{dx}} {\sin}^{2} \left(x\right)$:

$\frac{d}{\mathrm{dx}} {\sin}^{2} \left(x\right) = \frac{d}{\mathrm{dx}} \sin \left(x\right) \sin \left(x\right)$
Use the product rule:
$\frac{d}{\mathrm{dx}} \sin \left(x\right) \sin \left(x\right) = \sin \left(x\right) \cos \left(x\right) + \cos \left(x\right) \sin \left(x\right) = 2 \sin \left(x\right) \cos \left(x\right)$

Using this result:
$f ' \left(x\right) = \left(\frac{1}{{x}^{4} {\sin}^{2} \left(x\right)}\right) \left(4 {x}^{3} {\sin}^{2} \left(x\right) + {x}^{4} \left(2 \sin \left(x\right) \cos \left(x\right)\right)\right)$

$= \left(\frac{1}{{x}^{4} {\sin}^{2} \left(x\right)}\right) \left(4 {x}^{3}\right) \left({\sin}^{2} \left(x\right) + \frac{x}{2} \sin \left(x\right) \cos \left(x\right)\right)$
$= \left(\frac{4}{x {\sin}^{2} \left(x\right)}\right) \left({\sin}^{2} \left(x\right) + \frac{x}{2} \sin \left(x\right) \cos \left(x\right)\right)$
$= \left(\frac{4}{x}\right) \left({\sin}^{2} \frac{x}{\sin} ^ 2 \left(x\right) + \frac{x}{2} \frac{\sin \left(x\right) \cos \left(x\right)}{{\sin}^{2} \left(x\right)}\right)$
$= \left(\frac{4}{x}\right) \left({\sin}^{2} \frac{x}{\sin} ^ 2 \left(x\right) + \frac{x}{2} \frac{\sin \left(x\right) \cos \left(x\right)}{\sin \left(x\right) \sin \left(x\right)}\right)$
=(4/(x)) (1+x/2 cos(x)/sin(x)))
Note that, $\cot \left(x\right) = \frac{1}{\tan} \left(x\right) = \cos \frac{x}{\sin} \left(x\right)$, so:
$f ' \left(x\right) = \left(\frac{4}{x}\right) \left(1 + \frac{x}{2} \cot \left(x\right)\right)$

Finally we have:

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