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

Oct 26, 2016

The slope at $x = - 1$ is $- 2 {e}^{2}$

#### Explanation:

The slope of $f \left(x\right)$ at $x = - 1$ is determined by differentiating the function at $x = - 1$ that is by computing $\textcolor{red}{f ' \left(- 1\right)}$

Differentiate $f \left(x\right)$ is determined by using the quotient rule differentiation

Let $u \left(x\right) = x + 2 \mathmr{and} v \left(x\right) = {e}^{x - {x}^{2}}$
Then $f \left(x\right) = \frac{u \left(x\right)}{v \left(x\right)}$

color(red)(f'(x)=(color(blue)(u'(x))*v(x)-color(green)(v'(x))*u(x))/(v^2(x))

Let us determine $\textcolor{b l u e}{u ' \left(x\right)}$ and $\textcolor{g r e e n}{v ' \left(x\right)}$
$u \left(x\right) = x + 2 \Rightarrow \textcolor{b l u e}{u ' \left(x\right) = 1}$

$v \left(x\right) = {e}^{x - {x}^{2}}$
is a composite of two function ,the exponential and polynomial so its derivative is determined by using chain rule.

Let $\textcolor{b r o w n}{g \left(x\right) = {e}^{x} \mathmr{and} h \left(x\right) = x - {x}^{2}}$
$\textcolor{b r o w n}{v \left(x\right) = g \left(h \left(x\right)\right)}$

Then the derivative of the composite function is$\textcolor{g r e e n}{v ' \left(x\right) = g ' \left(h \left(x\right)\right) \cdot h ' \left(x\right)}$

$g \left(x\right) = {e}^{x} \Rightarrow g ' \left(x\right) = {e}^{x}$

$g ' \left(h \left(x\right)\right) = {e}^{h \left(x\right)}$
$\textcolor{g r e e n}{g ' \left(h \left(x\right)\right) = {e}^{x - {x}^{2}}}$

$h \left(x\right) = x - {x}^{2} \Rightarrow \textcolor{g r e e n}{h ' \left(x\right) = 1 - 2 x}$

$\textcolor{g r e e n}{v ' \left(x\right) = {e}^{x - {x}^{2}} \cdot \left(1 - 2 x\right)}$

color(red)(f'(x)=(color(blue)(u'(x))*v(x)-color(green)(v'(x))*u(x))/(v^2(x))

$\textcolor{red}{f ' \left(x\right)} = \frac{\textcolor{b l u e}{1} \left({e}^{x - {x}^{2}}\right) - \textcolor{g r e e n}{{e}^{x - {x}^{2}} \left(1 - 2 x\right)} \cdot \left(x + 2\right)}{{e}^{x - {x}^{2}}} ^ 2$

$\textcolor{red}{f ' \left(x\right)} = \frac{\left({e}^{x - {x}^{2}}\right) - \left({e}^{x - {x}^{2}}\right) \left(1 - 2 x\right) \cdot \left(x + 2\right)}{{e}^{x - {x}^{2}}} ^ 2$

$\textcolor{red}{f ' \left(x\right)} = \frac{{e}^{x - {x}^{2}} \left[1 - \left(1 - 2 x\right) \cdot \left(x + 2\right)\right]}{{e}^{x - {x}^{2}}} ^ 2$

Simplifying the quotient by ${e}^{x - {x}^{2}}$

$\textcolor{red}{f ' \left(x\right)} = \frac{1 - \left(1 - 2 x\right) \cdot \left(x + 2\right)}{{e}^{x - {x}^{2}}}$

Then,
$\textcolor{red}{f ' \left(- 1\right)} = \frac{1 - \left(1 - 2 \left(\textcolor{red}{- 1}\right)\right) \cdot \left(\textcolor{red}{- 1} + 2\right)}{{e}^{\textcolor{red}{- 1} - {\textcolor{red}{\left(- 1\right)}}^{2}}}$

$\textcolor{red}{f ' \left(x\right)} = \frac{1 - \left(1 + 2\right) \cdot \left(+ 1\right)}{{e}^{- 2}}$

$\textcolor{red}{f ' \left(x\right)} = \frac{- 2}{{e}^{- 2}}$

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