# Question #b3951

Dec 7, 2017

${\int}_{0}^{1} {\left(x - 1\right)}^{2} \cdot {e}^{x} \cdot \mathrm{dx} = 2e-5$

#### Explanation:

${\int}_{0}^{1} {\left(x - 1\right)}^{2} \cdot {e}^{x} \cdot \mathrm{dx}$

After using tabular integration,

${\int}_{0}^{1} {\left(x - 1\right)}^{2} \cdot {e}^{x} \cdot \mathrm{dx}$

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

=${\left[\left({x}^{2} - 4 x + 5\right) \cdot {e}^{x}\right]}_{0}^{1}$

=$2e-5$

Dec 7, 2017

$2e-5$

#### Explanation:

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

Since it is a product of two functions we use integration by parts:

$u = {\left(x - 1\right)}^{2}$

$\mathrm{du} = 2 \left(x - 1\right) \mathrm{dx}$

$\mathrm{dv} = {e}^{x} \mathrm{dx}$

$v = {e}^{x}$

$\int u \mathrm{dv} = u v - \int v \mathrm{du}$

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

We use integration by parts again for the remaining integral $I I$:

$w = x - 1$

$\mathrm{dw} = \mathrm{dx}$

$\mathrm{dz} = {e}^{x} \mathrm{dx}$

$z = {e}^{x}$

$\int w \mathrm{dz} = w z - \int z \mathrm{dw}$

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

$I = {e}^{x} {\left(x - 1\right)}^{2} - 2 {e}^{x} \left(x - 1\right) + 2 {e}^{x} = {e}^{x} \left({x}^{2} - 2 x + 1 - 2 x + 2 + 2\right) = {e}^{x} \left({x}^{2} - 4 x + 5\right)$

Now, we can evaluate this from $0$ to $1$

$I = e \left(1 - 4 + 5\right) - 5 = 2e-5$

Dec 7, 2017

See explanation. $2e-5$

#### Explanation:

We will solve this using integration by parts, which is essentially an inversion of the product rule.

$\left(u v\right) ' = u ' v + u v ' \to \int \left(u v\right) ' = u v = \int \left(u ' v\right) + \int \left(u v '\right) \to \int \left(u v '\right) = u v - \int \left(u ' v\right)$

It appears that we will have to perform this operation two times.

For our first operation:

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

Then...

${\int}_{0}^{1} {\left(x - 1\right)}^{2} {e}^{x} \mathrm{dx} = {\left[{\left(x - 1\right)}^{2} {e}^{x}\right]}_{0}^{1} - {\int}_{0}^{1} \left(2 \left(x - 1\right) {e}^{x}\right) \mathrm{dx}$ (A)

One more iteration must be performed, upon the second part of this. Now we have:

${u}_{2} \left(x\right) = 2 \left(x - 1\right) , {u}_{2} ' \left(x\right) = 2 , {v}_{2} \left(x\right) = {v}_{2} ' \left(x\right) = {e}^{x}$

Giving us:

${\int}_{0}^{1} \left(2 \left(x - 1\right) {e}^{x}\right) \mathrm{dx} = {\left[2 \left(x - 1\right) {e}^{x}\right]}_{0}^{1} - {\int}_{0}^{1} 2 {e}^{x} \mathrm{dx} = \left(2\right) \left(0\right) \left(e\right) - \left(2\right) \left(- 1\right) \left(1\right) - {\left[2 {e}^{x}\right]}_{0}^{1} = 0 + 2 - \left(2e-2\right) = - 2 e + 4$

Returning back to our initial integration by parts...

${\int}_{0}^{1} {\left(x - 1\right)}^{2} {e}^{x} \mathrm{dx} = {\left[{\left(x - 1\right)}^{2} {e}^{x}\right]}_{0}^{1} - {\int}_{0}^{1} \left(2 \left(x - 1\right) {e}^{x}\right) d x = - 1 - \left(- 2e+4\right) = 2e-5$