# Using integration by parts, we find that `int x^(n)e^(-x) dx=`

### 1 Answer | Add Yours

We need to find `intx^n e^(-x)dx`.

Let's solve the problem for `n=1`.

`int xe^(-x)dx=|(u=x, dv=e^(-x)),(du=dx, v=-e^(-x))|=-xe^(-x)+e^(-x)=-e^(-x)(x+1)`` `

Let's now solve the problem for `n=2`.

`int x^2 e^(-x)dx=|(u=x^2, dv=e^(-x)),(du=2xdx, v=-e^(-x))|=-x^2e^(-x)+2int xe^(-x)dx=`

`-x^2e^(-x)-2e^(-x)(x+1)=-e^(-x)(x^2+2x+2)`

Similarly for `n=3` we would have

`int x^3e^(-x)dx=-e^(-x)(x^3+3x^2+6x+6)`

We can now see the pattern

`int x^n e^(-x)dx=-e^(-x) sum_(k=0)^n (x^n)^((k))` **<-- Solution**

where `(x^n)^((k))` is the `k`th derivation of `x^n`. If we were to expand the above formula it would look like this

`int x^n e^(-x)dx=-e^(-x)(x^n+nx^(n-1)+n(n-1)x^(n-2)+cdots+n!x+n!)`

If you wish you can prove the formula formally by using mathematical induction.