# If f(x)= - e^x  and g(x) = sqrt(1-x , how do you differentiate f(g(x))  using the chain rule?

Feb 7, 2016

$\frac{d}{\mathrm{dx}} f \left(g \left(x\right)\right) = {e}^{\sqrt{1 - x}} / \left(2 \sqrt{1 - 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) g ' \left(x\right)$

In this case

$f ' \left(x\right) = - {e}^{x}$

To find the derivative of $g \left(x\right)$ we must again use the chain rule on

g(x) = g_1((g_2(x)) where ${g}_{1} \left(x\right) = \sqrt{x}$ and ${g}_{2} \left(x\right) = 1 - x$

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

${g}_{2} ' \left(x\right) = - 1$

$\implies g ' \left(x\right) = \frac{d}{\mathrm{dx}} {g}_{1} \left({g}_{2} \left(x\right)\right) = {g}_{1} ' \left({g}_{2} \left(x\right)\right) {g}_{2} ' \left(x\right) = - \frac{1}{2 \sqrt{1 - x}}$

Thus, putting it together

$\frac{d}{\mathrm{dx}} f \left(g \left(x\right)\right) = f ' \left(g \left(x\right)\right) g ' \left(x\right)$

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

$= {e}^{\sqrt{1 - x}} / \left(2 \sqrt{1 - x}\right)$