⇒ Let
u=x2 and
v=ex, then
du=2xdx Now i ntegration by parts states that
∫u(x)v′(x)dx=u(x)v(x)−∫v(x)u′(x)dx
Hence, ∫x2exdx=x2ex−∫ex×2xdx
∫x2exdx=x2ex−2∫xexdx+C ------- ( 1 )
Now, we set u=x, then du=dx
and ∫xexdx=xex−∫ex×1×dx or
∫xexdx=xex−∫exdx=xex−ex
Putting this in ( 1 ), we get
∫x2exdx=x2ex−2(xex−ex)+C
∫x2exdx=ex(x2−2x+2)+C