# How do you differentiate y=(r^2-2r)e^r?

Dec 10, 2017

$y ' = - 2 {e}^{r} + {e}^{r} {r}^{2}$

#### Explanation:

Apply the product rule:

The product rule states: $\left(f \cdot g\right) ' \left(x\right) = \left[f ' \left(x\right) \cdot g \left(x\right)\right] + \left[f \left(x\right) \cdot g ' \left(x\right)\right]$

Let $f \left(x\right) = {r}^{2} - 2 r$ and $g \left(x\right) = {e}^{r}$ And...

$f ' \left(x\right) = 2 r - 2$

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

So

$y ' = \left(2 r - 2 \cdot {e}^{r}\right) + \left({r}^{2} - 2 r \cdot {e}^{r}\right)$

Simplify:

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

=cancel(e^r2r)-2e^r+e^rr^2cancel(-e^r2r_

$= - 2 {e}^{r} + {e}^{r} {r}^{2}$