Hello, jeph!

You and your book are dropping off parts of the problem . . .

By parts:∫(x²)e^{-x} dx

. . . u = x² . . . . dv = e^{-x} dx

. . du = 2x dx . . . v = -e^{-x}

We have: .-(x²)e^{-x} + 2∫x·e^{-x} dx

By parts again . . .

. . . u = x . . . . dv = e^{-x} dx

. . du = dx . . . . v = -e^{-x}

We have: .-(x²)e^{-x} + 2[-xe^{-x} + ∫e^{-x} dx]

. . . . . .= .-(x²)e^{-x} + 2[-xe^{-x} - e^{-x}] + C

. . . . . .= .-(x²)e^{-x} - 2xe^{-x} - 2e^{-x} + C

. . . . . .= .-e^{-x} (x² + 2x + 2) + C