Originally Posted by

**ugkwan** Hi there,

$\displaystyle \displaystyle \int (x^2-1)e^x dx$

I chose to integrate by parts. This is what I did.

$\displaystyle \displaystyle \int x^2 e^x dx-\int e^x dx $

1st integration $\displaystyle \displaystyle u=x^2 ,du=2x dx ,dv=e^x dx, v=e^x $

$\displaystyle \displaystyle (\int x^2 e^x dx = x^2 e^x -\int e^x 2xdx)-e^x +C $

2nd integration $\displaystyle \displaystyle u=2x, du=2dx, dv=e^x dx, v= e^x $

$\displaystyle \displaystyle \int 2x e^x dx=2xe^x -\int e^x 2dx$

My answer $\displaystyle \displaystyle x^2 e^x +2xe^x -2e^x -e^x +C$

$\displaystyle \displaystyle x^2 e^x +2xe^x -3e^x +C$

Is this correct?