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

Nov 22, 2017

Substitute g in for x to find f(g) from f(x), and recall $\frac{d}{\mathrm{dx}} f \left(g \left(x\right)\right) = \frac{\mathrm{df}}{\mathrm{dg}} \frac{\mathrm{dg}}{\mathrm{dx}}$. See explanation.

#### Explanation:

Recall that the chain rule states that if $y = f \left(g \left(x\right)\right) , \frac{\mathrm{dy}}{\mathrm{dx}} = \frac{\mathrm{df}}{\mathrm{dg}} \cdot \frac{\mathrm{dg}}{\mathrm{dx}}$

We have $f \left(x\right) = - {e}^{x} , g \left(x\right) = \frac{1}{\sqrt{1 - x}}$

(This step is unnecessary, but in case the student is curious, to find f(g) you substitute g in for x in f(x), making $f \left(g\right) = - {e}^{g}$

We know that $\frac{d}{\mathrm{du}} k {e}^{u} = k {e}^{u}$, and $\frac{d}{\mathrm{dx}} \left(\frac{1}{1 - x} ^ \left(\frac{1}{2}\right)\right) = \frac{1}{2} \cdot \frac{1}{1 - x} ^ \left(\frac{3}{2}\right) = \frac{1}{2 {\left(1 - x\right)}^{\frac{3}{2}}}$.
Thus...

$\frac{\mathrm{dy}}{\mathrm{dx}} = \frac{\mathrm{df}}{\mathrm{dg}} \frac{\mathrm{dg}}{\mathrm{dx}} = \frac{1}{2 {\left(1 - x\right)}^{\frac{3}{2}}} \cdot - {e}^{\frac{1}{\sqrt{1 - x}}} = \frac{- {e}^{\frac{1}{\sqrt{1 - x}}}}{2 {\left(1 - x\right)}^{\frac{3}{2}}}$

Nov 22, 2017

$\frac{d}{\mathrm{dx}} f \left(g \left(x\right)\right) = - \frac{{e}^{\sqrt{1 - x}}}{2 {\left(1 - x\right)}^{\frac{3}{2}}}$

#### Explanation:

$f \left(x\right) = - {e}^{x} \mathmr{and} g \left(x\right) = \frac{1}{\sqrt{1 - x}}$

Replace $x$ in $f \left(x\right)$ with g(x)#

$\to f \left(g \left(x\right)\right) = - {e}^{\frac{1}{\sqrt{i - x}}}$

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

Apply the chain rule and standard differential

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

Apply the chain rule and power rule

$\frac{d}{\mathrm{dx}} f \left(g \left(x\right)\right) = - {e}^{{\left(1 - x\right)}^{- \frac{1}{2}}} \cdot \left(- \frac{1}{2}\right) {\left(1 - x\right)}^{- \frac{3}{2}} \cdot \frac{d}{\mathrm{dx}} \left(1 - x\right)$

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

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

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