# Question #96976

Mar 8, 2016

$x {e}^{x}$ is differentiated using the product rule because it is a product of two functions. (The fact that the derivative of ${e}^{x}$ is also ${e}^{x}$ does not change the fact that $x {e}^{x}$ is a product.)

#### Explanation:

$\frac{d}{\mathrm{dx}} \left[x {e}^{x}\right] \ne 1 \cdot {e}^{x}$ in a way similar to the way that

$\frac{d}{\mathrm{dx}} \left[x \sin x\right] \ne 1 \cdot \sin x$ and $\frac{d}{\mathrm{dx}} \left[x \cdot x\right] \ne 1 \cdot 1$ and $\frac{d}{\mathrm{dx}} \left[5 x\right] \ne 0 \cdot 1$

For differentiable functions $f \left(x\right)$ and $g \left(x\right)$, the derivative of the product is

$\frac{d}{\mathrm{dx}} \left[f \left(x\right) g \left(x\right)\right] = {\lim}_{h \rightarrow 0} \frac{\left[f \left(x + h\right) g \left(x + h\right)\right] - \left[f \left(x\right) g \left(x\right)\right]}{h}$

$= {\lim}_{h \rightarrow 0} \frac{\left[f \left(x + h\right) g \left(x + h\right)\right] - \left[f \left(x\right) g \left(x + h\right)\right] + \left[f \left(x\right) g \left(x + h\right)\right] - \left[f \left(x\right) g \left(x\right)\right]}{h}$

$= {\lim}_{h \rightarrow 0} \frac{\left[f \left(x + h\right) g \left(x + h\right)\right] - \left[f \left(x\right) g \left(x + h\right)\right]}{h} + \frac{\left[f \left(x\right) g \left(x + h\right)\right] - \left[f \left(x\right) g \left(x\right)\right]}{h}$

$= {\lim}_{h \rightarrow 0} \frac{f \left(x + h\right) - f \left(x\right)}{h} g \left(x + h\right) + f \left(x\right) \frac{g \left(x + h\right) - g \left(x\right)}{h}$

$= {\lim}_{h \rightarrow 0} \frac{f \left(x + h\right) - f \left(x\right)}{h} {\lim}_{h \rightarrow 0} g \left(x + h\right) + {\lim}_{h \rightarrow 0} f \left(x\right) {\lim}_{h \rightarrow 0} \frac{g \left(x + h\right) - g \left(x\right)}{h}$

$= \frac{d}{\mathrm{dx}} \left[f \left(x\right)\right] g \left(x\right) + f \left(x\right) \frac{d}{\mathrm{dx}} \left[g \left(x\right)\right]$

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

Applied to $x {e}^{x}$

$\frac{d}{\mathrm{dx}} \left[x {e}^{x}\right] = \frac{d}{\mathrm{dx}} \left(x\right) {e}^{x} + x \frac{d}{\mathrm{dx}} \left({e}^{x}\right)$

$= 1 \cdot {e}^{x} + x {e}^{x}$

In the function for this question, we have a quotient $f \left(x\right) = \frac{u}{v}$ with

$u = 1 - x {e}^{x}$ and $v = x + {e}^{x}$.

We'll be using the quotient rule, so we need

$u ' = 0 - \left[1 {e}^{x} + x {e}^{x}\right] = - \left({e}^{x} + x {e}^{x}\right)$ and $v ' = 1 + {e}^{x}$

$f ' \left(x\right) = \frac{u ' v - u v '}{v} ^ 2 = \frac{- \left({e}^{x} + x {e}^{x}\right) \left(x + {e}^{x}\right) - \left(1 - x {e}^{x}\right) \left(1 + {e}^{x}\right)}{x + {e}^{x}} ^ 2$

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

Expand and simplify to get:

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