# How do you integrate int x^2 e^(4-x) dx  using integration by parts?

Mar 5, 2016

$- {x}^{2} {e}^{4 - x} - 2 x {e}^{4 - x} + 2 {e}^{4 - x} + c o n s t .$

#### Explanation:

For integration by parts it's used this scheme:

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

Making
$\mathrm{dv} = {e}^{4 - x} \mathrm{dx}$ => $v = - {e}^{4 - x}$
$u = {x}^{2}$ => $\mathrm{du} = 2 x \mathrm{dx}$
Then the original expression becomes
$= {x}^{2} \left(- {e}^{4 - x}\right) - \int - {e}^{4 - x} 2 x \mathrm{dx} = - {x}^{2} {e}^{4 - x} + 2 \int x {e}^{4 - x} \mathrm{dx}$

Applying integration by parts to $\int x {e}^{4 - x} \mathrm{dx}$
Making
$\mathrm{dv} = {e}^{4 - x} \mathrm{dx}$ => $v = - {e}^{4 - x}$
$u = x$ => $\mathrm{du} = \mathrm{dx}$
We get
$= x \left(- {e}^{4 - x}\right) - \int {e}^{4 - x} \mathrm{dx} = - x {e}^{4 - x} + {e}^{4 - x}$

Using the partial results in the main expression, we get
$= - {x}^{2} {e}^{4 - x} + 2 \left(- x {e}^{4 - x} + {e}^{4 - x}\right)$
$= - {x}^{2} {e}^{4 - x} - 2 x {e}^{4 - x} + 2 {e}^{4 - x} + c o n s t .$