1. ## Integration Help

How do you integrate (x^2+x+1)e^-x?
Please show all work and explain, thank you.

How do you integrate (x^2+x+1)e^-x?
Please show all work and explain, thank you.
Integration by parts, because your integral is a product of two functions.

In your problem let $u= x^2+x+1$ and $dv=e^{-x}$. (The acronym LIATE will help you remember the order for choosing u and dv).

How do you integrate (x^2+x+1)e^-x?
Please show all work and explain, thank you.
Use integration by parts.

$\int{u\,dv} = uv - \int{v\,du}$.

In your case, let $u = x^2 + x + 1$ so that $du = 2x + 1$

Let $dv = e^{-x}$ so that $v = -e^{-x}$.

So $\int{(x^2 + x + 1)e^{-x}\,dx} = -e^{-x}(x^2 + x + 1) - \int{-e^{-x}(2x + 1)\,dx}$

$= -e^{-x}(x^2 + x + 1) + \int{e^{-x}(2x + 1)\,dx}$.

Use integration by parts again.

Let $u = 2x + 1$ so that $du = 2$

Let $dv = e^{-x}$ so that $v = -e^{-x}$.

$-e^{-x}(x^2 + x + 1) + \int{e^{-x}(2x + 1)\,dx}$

$= -e^{-x}(x^2 + x + 1) -e^{-x}(2x + 1) - \int{-2e^{-x}\,dx}$

$= -e^{-x}(x^2 + x + 1) - e^{-x}(2x + 1) + 2\int{e^{-x}\,dx}$

$= -e^{-x}(x^2 + x + 1) - e^{-x}(2x + 1) - 2e^{-x} + C$

$= -e^{-x}(x^2 + x + 1 + 2x + 1 + 2) + C$

$= -e^{-x}(x^2 + 3x + 4) + C$.