Solution
For the integral ∫x2exdx, use integration by parts ∫udv=uv−∫vdu.
Let u=x2 and dv=exdx.
Then du=(x2)′dx=2xdx (steps can be seen ») and v=∫exdx=ex (steps can be seen »).
Therefore,
∫x2exdx=(x2⋅ex−∫ex⋅2xdx)=(x2ex−∫2xexdx)
Apply the constant multiple rule ∫cf(x)dx=c∫f(x)dx with c=2 and f(x)=xex:
x2ex−∫2xexdx=x2ex−(2∫xexdx)
For the integral ∫xexdx, use integration by parts ∫udv=uv−∫vdu.
Let u=x and dv=exdx.
Then du=(x)′dx=1dx (steps can be seen ») and v=∫exdx=ex (steps can be seen »).
Therefore,
x2ex−2∫xexdx=x2ex−2(x⋅ex−∫ex⋅1dx)=x2ex−2(xex−∫exdx)
The integral of the exponential function is ∫exdx=ex:
x2ex−2xex+2∫exdx=x2ex−2xex+2ex
Therefore,
∫x2exdx=x2ex−2xex+2ex
Simplify:
∫x2exdx=(x2−2x+2)ex
Add the constant of integration:
∫x2exdx=(x2−2x+2)ex+C