# What is the equation of the normal line of f(x)=(2+x)e^-x  at x=0 ?

Nov 14, 2015

$y = x + 2$

#### Explanation:

The normal line is perpendicular to the tangent line at a given point. Therefore, we must find the slope of the tangent when $x = 0$, and to do that, we must find $f ' \left(x\right)$.

We'll need to use the Product Rule.
f'(x)=color(red)(d/(dx)[2+x])*e^-x+(2+x)*color(blue)(d/(dx)[e^-x]

Before we continue, we have to know what the derivatives of these functions are.
color(red)(d/(dx)[2+x]=1

The next derivative requires use of the Chain Rule.
color(blue)(d/(dx)[e^-x])=d/(dx)[-x]*e^-x=-1*e^-x=color(blue)(-e^-x

Let's plug our derivatives back in.
$f ' \left(x\right) = \textcolor{red}{1} \cdot {e}^{-} x + \left(2 + x\right) \cdot \textcolor{b l u e}{- {e}^{-} x}$
$f ' \left(x\right) = {e}^{-} x - \left(2 + x\right) {e}^{-} x$

Factor out an ${e}^{-} x$.
$f ' \left(x\right) = {e}^{-} x \left(1 - \left(2 + x\right)\right)$
$f ' \left(x\right) = {e}^{-} x \left(- x - 1\right)$
color(green)(f'(x)=frac(-x-1)(e^x)

Now, we can compute $f ' \left(0\right)$ to find the slope of the tangent line at $x = 0$.
$f ' \left(0\right) = \frac{- 1}{{e}^{0}} = \frac{- 1}{1} = - 1$

Now, since the normal line is perpendicular to the tangent line, its slope will be the opposite reciprocal of $- 1$, which is $\textcolor{b r o w n}{1}$.

In order to write the equation of the normal line, we should use point-slope form: $y - {y}_{1} = m \left(x - {x}_{1}\right)$

The point through which the normal line passes can be obtained through finding $f \left(0\right)$, since that is the point on the original function where we have found the slope of the normal line will be equal to $\textcolor{b r o w n}{1}$.

$f \left(0\right) = \left(2 + 0\right) {e}^{-} 0 = 2 {e}^{0} = 2 \left(1\right) = 2$
We know that the normal line has slope $\textcolor{b r o w n}{1}$ and passes through the point $\left(0 , 2\right)$.

We can plug this all into point-slope form: $y - 2 = 1 \left(x - 0\right)$
Simplified: color(purple)(y=x+2