# How do you differentiate f(x)=sqrt(e^(-x^2+x)  using the chain rule?

Mar 21, 2016

$\frac{\mathrm{df}}{\mathrm{dx}} = \frac{1 - 2 x}{2} \sqrt{{e}^{- {x}^{2} + x}}$

#### Explanation:

We have to use here the concept of function of a function which uses the formula of chain rule.

As $f \left(x\right) = \sqrt{g \left(x\right)}$ where $g \left(x\right) = {e}^{h \left(x\right)}$ and $h \left(x\right) = = - {x}^{2} + x$ according to chain rule

$\frac{\mathrm{df}}{\mathrm{dx}} = \frac{\mathrm{df}}{\mathrm{dg}} \times \frac{\mathrm{dg}}{\mathrm{dx}} \times \frac{\mathrm{dh}}{\mathrm{dx}}$

Hence $\frac{\mathrm{df}}{\mathrm{dx}} = \frac{1}{2 \sqrt{{e}^{- {x}^{2} + x}}} \times {e}^{- {x}^{2} + x} \times \left(- 2 x + 1\right)$

or $\frac{\mathrm{df}}{\mathrm{dx}} = \frac{1 - 2 x}{2} \sqrt{{e}^{- {x}^{2} + x}}$