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

Jan 27, 2016

$\int {x}^{2} {e}^{x} \mathrm{dx} = {x}^{2} {e}^{x} - 2 x {e}^{x} + 2 {e}^{x} + c$

#### Explanation:

The integration by parts formula say

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

So, if we pick $u = {x}^{2}$ and $\mathrm{dv} = {e}^{x}$ so we'll have $\mathrm{du} = 2 x$ and $v = {e}^{x}$

$\int {x}^{2} {e}^{x} \mathrm{dx} = {x}^{2} {e}^{x} - \int 2 x {e}^{x} \mathrm{dx}$

Now we pick $u = x$ and $\mathrm{dv} = {e}^{x}$, so $v = {e}^{x}$ and $\mathrm{du} = 1$

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

This last integral is tabled, so

$\int {x}^{2} {e}^{x} \mathrm{dx} = {x}^{2} {e}^{x} - 2 x {e}^{x} + 2 {e}^{x} + c$