# How do you differentiate f(x)=x^3*sqrt(x-2)-sinxcosx using the product rule?

Mar 12, 2018

$\frac{7 {x}^{3} - 12 {x}^{2}}{2 \sqrt{x - 2}} + {\sin}^{2} x - {\cos}^{2} x$

#### Explanation:

$f \left(x\right)$ is the sum of two functions, each of which is the product of two other functions (hence the requirement for the product rule).

Starting with the first of the two products,

denoting
$g \left(x\right) = {x}^{3}$
and
$h \left(x\right) = \sqrt{x - 2}$

the product rule states

$f ' \left(x\right) = \left(g \left(x\right) h \left(x\right)\right) ' = g ' \left(x\right) h \left(x\right) + g \left(x\right) h ' \left(x\right)$

$g ' \left(x\right) = 3 {x}^{2}$ (simple polynomial differentiation)

$h ' \left(x\right)$ is trickier because it is a compound function (function of a function) which requires the chain rule. It is necessary to specify more functions.

Detour for chain rule applied to the second function:

Denoting

$j \left(x\right) = \sqrt{x}$
and
$k \left(x\right) = x - 2$

this implies
$h \left(x\right) = j \left(k \left(x\right)\right)$

under the chain rule,

$h ' \left(x\right) = j ' \left(k \left(x\right)\right) k ' \left(x\right)$

noting $\sqrt{x} = {\left(x\right)}^{\frac{1}{2}}$

$j ' \left(x\right) = \frac{1}{2} \left({x}^{- \frac{1}{2}}\right)$

so that

$j ' \left(k \left(x\right)\right) = \frac{1}{2} \left({\left(x - 2\right)}^{- \frac{1}{2}}\right)$

Also

$k ' \left(x\right) = 1$

so

$h ' \left(x\right) = j ' \left(k \left(x\right)\right) k ' \left(x\right) = \frac{1}{2} \left({\left(x - 2\right)}^{- \frac{1}{2}}\right) \left(1\right)$

$= \frac{1}{2} {\left(x - 2\right)}^{- \frac{1}{2}}$

or, reverting to square root notation,

$h ' \left(x\right) = \frac{1}{2 \sqrt{x - 2}}$

Returning to the application of the product rule

$f ' \left(x\right) = \left(g \left(x\right) h \left(x\right)\right) ' = g ' \left(x\right) h \left(x\right) + g \left(x\right) h ' \left(x\right)$

$= \left(3 {x}^{2}\right) \left(\sqrt{x - 2}\right) + \left({x}^{3}\right) \left(\frac{1}{2 \sqrt{x - 2}}\right)$

$= \frac{6 {x}^{2} \left(x - 2\right) + {x}^{3}}{2 \sqrt{x - 2}}$

$= \frac{6 {x}^{3} - 12 {x}^{2} + {x}^{3}}{2 \sqrt{x - 2}}$

$= \frac{7 {x}^{3} - 12 {x}^{2}}{2 \sqrt{x - 2}}$

On to the second of the two products.

Denoting
$m \left(x\right) = \sin \left(x\right)$
and
$n \left(x\right) = \cos \left(x\right)$

as already noted, under the product rule,

$\left(m \left(x\right) n \left(x\right)\right) ' = m ' \left(x\right) n \left(x\right) + m \left(x\right) n ' \left(x\right)$

$m ' \left(x\right) = \cos \left(x\right)$
and
$n ' \left(x\right) = - \sin \left(x\right)$

so

$\left(m \left(x\right) n \left(x\right)\right) ' = m ' \left(x\right) n \left(x\right) + m \left(x\right) n ' \left(x\right) = \cos \left(x\right) \cos \left(x\right) + \sin \left(x\right) \left(- \sin \left(x\right)\right)$

that is

$\left(m \left(x\right) n \left(x\right)\right) ' = {\cos}^{2} \left(x\right) - {\sin}^{2} \left(x\right)$

So, the overall derivative (under the sum rule) is

$f ' \left(x\right) = \frac{7 {x}^{3} - 12 {x}^{2}}{2 \sqrt{x - 2}} - \left({\cos}^{2} \left(x\right) - {\sin}^{2} \left(x\right)\right)$

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