# What is the slope of f(x)=xe^(x-x^2)  at x=-1?

Feb 16, 2016

The slope of the function at x=-1 is $- \frac{2}{e} ^ 2$

#### Explanation:

In order to find the slope of a function,we have to firstly determine its derivative.
so,
$\frac{d}{\mathrm{dx}} \left(x {e}^{x - {x}^{2}}\right)$

Applying product rule,

$\left(f . g\right) ' = f ' . g + g . f '$

so, $f = x , \setminus g = {e}^{x - {x}^{2}}$

$\setminus \frac{d}{\mathrm{dx}} \left(x\right) {e}^{x - {x}^{2}} + \setminus \frac{d}{\mathrm{dx}} \left({e}^{x - {x}^{2}}\right) x$

We know...
$\frac{d}{\mathrm{dx}} \left(x\right) = 1$

and,
$\setminus \frac{d}{\mathrm{dx}} \left({e}^{x - {x}^{2}}\right)$
Applying chain rule, $\setminus \frac{\mathrm{df} \left(u \setminus\right)}{\mathrm{dx}} = \setminus \frac{\mathrm{df}}{\mathrm{du}} \setminus \cdot \setminus \frac{\mathrm{du}}{\mathrm{dx}}$

let $x - {x}^{2} = u$

$\setminus \frac{d}{\mathrm{du}} \left({e}^{u} \setminus\right) \setminus \frac{d}{\mathrm{dx}} \setminus \left(x - {x}^{2}\right)$

We get,

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

Substituting back $x - {x}^{2} = u$,

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

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

Simplifying it,

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

Finally when $x = - 1$
${e}^{\left(- 1\right) - {\left(- 1\right)}^{2}} \left[- 2 {\left(- 1\right)}^{2} + \left(- 1\right) + 1\right]$ = ${e}^{-} 2 . \left(- 2\right)$= $- \frac{2}{e} ^ 2$