# How do you integrate  (x-1) e^(-x^2+2x) dx?

Jul 31, 2016

$- \frac{1}{2} {e}^{- {x}^{2} + 2 x} + C$

#### Explanation:

$\int \textcolor{red}{\left(x - 1\right) {e}^{- {x}^{2} + 2 x}} \setminus \mathrm{dx}$

the easy way, look for the pattern

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

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

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

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

so
$\int \left(x - 1\right) {e}^{- {x}^{2} + 2 x} \setminus \mathrm{dx}$

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

$= - \frac{1}{2} {e}^{- {x}^{2} + 2 x} + C$

Jul 31, 2016

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

#### Explanation:

Let, $I = \int \left(x - 1\right) {e}^{- {x}^{2} + 2 x} \mathrm{dx}$

We take subst. $- {x}^{2} + 2 x = t , s o , \left(- 2 x + 2\right) \mathrm{dx} = - 2 \left(x - 1\right) \mathrm{dx} = \mathrm{dt}$, or,

$\left(x - 1\right) \mathrm{dx} = - \frac{1}{2} \mathrm{dt}$.

Therefore,

$I = \int \left(x - 1\right) {e}^{- {x}^{2} + 2 x} \mathrm{dx} = - \frac{1}{2} \int {e}^{t} \mathrm{dt} = - \frac{1}{2} {e}^{t}$

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