# How do you differentiate g(x) = sqrt(1-x)cosx using the product rule?

Jan 16, 2016

#### Answer:

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

#### Explanation:

The product rule states that

$\frac{d}{\mathrm{dx}} \left[f \left(x\right) h \left(x\right)\right] = f ' \left(x\right) h \left(x\right) + h ' \left(x\right) f \left(x\right)$

In this scenario, we have

$f \left(x\right) = \sqrt{1 - x}$
$h \left(x\right) = \cos x$

First, find the derivative of each of these individual functions.

To find $f ' \left(x\right)$, chain rule will have to be used. Treat the square root as a $1 \text{/} 2$ power.

$f ' \left(x\right) = \frac{d}{\mathrm{dx}} \left[{\left(1 - x\right)}^{\frac{1}{2}}\right] = \frac{1}{2} {\left(1 - x\right)}^{- \frac{1}{2}} \cdot \frac{d}{\mathrm{dx}} \left[1 - x\right]$

$= \frac{1}{2 \sqrt{1 - x}} \cdot - 1 = - \frac{1}{2 \sqrt{1 - x}}$

To find $h ' \left(x\right)$, you have to know the derivatives of simple trigonometric functions.

$h ' \left(x\right) = \frac{d}{\mathrm{dx}} \left[\cos \left(x\right)\right] = - \sin x$

Plug these back into the product rule expression.

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

This can be simplified:

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