How do you find intx^2 e^(1-x)dx using integration by parts?

intx^2 e^(1-x)dx

The answer is supposedly -x^2 e^(1-x) -2xe^(1-x) -2e^(1-x) + C, but I don't understand how it came to be.

Please explain. Thanks in advance!

1 Answer
Apr 21, 2018

intx^2e^(1-x)dx=-x^2e^(1-x)-2xe^(1-x)-2e^(1-x)+C

Explanation:

We'll make the following selections:

u=x^2

Take its differential:

du=2xdx

dv=e^(1-x)dx

Take its integral:

v=inte^(1-x)dx=-e^(1-x)

Apply the integration by parts formula.

uv-intvdu=-x^2e^(1-x)-int-2xe^(1-x)dx

The negatives cancel each other out.

=-x^2e^(1-x)+int2xe^(1-x)dx

For int2xe^(1-x)dx we're going to have to apply integration by parts again, making the following selections:

u=2x

du=2dx

dv=e^(1-x)dx

v=-e^(1-x)

uv-intvdu=-2xe^(1-x)+2inte^(1-x)dx

inte^(1-x)dx=-e^(1-x), so we get

int2xe^(1-x)dx=-2xe^(1-x)-2e^(1-x)

Thus, the entire integral becomes

intx^2e^(1-x)dx=-x^2e^(1-x)-2xe^(1-x)-2e^(1-x)+C, adding in the constant of integration.