There may be an easier way to do this but this is the only way I know how to do it. It's long so get ready.
You have to use Integration by Parts multiple times.
Integration by parts formula: ∫ vdu = uv - ∫ udv
Set v = x^5 and du = e^x dx
So, dv = 5x^4 dx and u = e^x
Plugging this into the integration by parts formula above, we get:
∫ (x^5)(e^x) dx = (e^x)(x^5) - ∫ (e^x)(5x^4)
= (e^x)(x^5) - 5 ∫ (e^x)(x^4) dx
Now we need to use the integration by parts formula again to figure out what ∫ (e^x)(x^4) dx is equal to.
Integration by parts formula: ∫ vdu = uv - ∫ udv
This time, set v = x^4 and du = e^x dx
So, dv = 4x^3 dx and u = e^x
Plugging this into the integration by parts formula directly above, we get:
∫ (x^4)(e^x) dx = (e^x)(x^4) - ∫ (e^x)(4x^3) dx
= (e^x)(x^4) - 4 ∫ (e^x)(x^3) dx
Now, altogether we have:
∫ (x^5)(e^x) dx = (e^x)(x^5) - 5 ((e^x)(x^4) - 4 ∫ (e^x)(x^3) dx)
= (e^x)(x^5) - 5(e^x)(x^4) +20 ∫ (e^x)(x^3) dx
We need to use integration by parts yet again to figure out what ∫ (e^x)(x^3) dx is equal to.
Integration by parts formula: ∫ vdu = uv - ∫ udv
This third time, set v = x^3 and du = e^x dx
So, dv = 3x^2 and u = e^x
Plugging this into the integration by parts formula we get:
∫ (e^x)(x^3) dx = (e^x)(x^3) - ∫ (e^x)(3x^2) dx
= (e^x)(x^3) - 3 ∫ (e^x)(x^2) dx
So, once again, altogether we have:
∫ (x^5)(e^x) dx = (e^x)(x^5) - 5(e^x)(x^4) +20 ∫ (e^x)(x^3) dx
= (e^x)(x^5) - 5(e^x)(x^4) + 20((e^x)(x^3) - 3 ∫ (e^x)(x^2) dx)
= (e^x)(x^5) - 5(e^x)(x^4) + 20(e^x)(x^3) - 60 ∫ (e^x)(x^2) dx)
Yet again, we need to use integration by parts to figure out what ∫ (e^x)(x^2) dx is equal to.
Integration by parts formula: ∫ vdu = uv - ∫ udv
Set v = x^2 and du = e^x dx
So, dv = 2x dx and u = e^x
Plugging this into the integration by parts formula we get:
∫ (e^x)(x^2) dx = (e^x)(x^2) - ∫ (e^x)(2x) dx
= (e^x)(x^2) - 2 ∫ (e^x)(x) dx
Altogether we now have:
∫ (x^5)(e^x) dx = (e^x)(x^5) - 5(e^x)(x^4) + 20(e^x)(x^3) - 60 ∫ (e^x)(x^2) dx)
= (e^x)(x^5) - 5(e^x)(x^4) + 20(e^x)(x^3) - 60 ((e^x)(x^2) - 2 ∫ (e^x)(x) dx)
= (e^x)(x^5) - 5(e^x)(x^4) + 20(e^x)(x^3) - 60(e^x)(x^2) +120 ∫ (e^x)(x) dx
Now, for the last time, we need to use integration by parts to figure out what ∫ (e^x)(x) dx is equal to.
Integration by parts formula: ∫ vdu = uv - ∫ udv
Set v = x and du = e^x dx
So, dv = dx and u = e^x
Plugging this into the integration by parts formula we get:
∫ (e^x)(x) dx = (e^x)(x) - ∫ (e^x) dx
= (e^x)(x) - (e^x)
So, altogether for the last time we have:
∫ (x^5)(e^x) dx = (e^x)(x^5) - 5(e^x)(x^4) + 20(e^x)(x^3) - 60(e^x)(x^2) +120 ∫ (e^x)(x) dx
= (e^x)(x^5) - 5(e^x)(x^4) + 20(e^x)(x^3) - 60(e^x)(x^2) +120(e^x)(x) - 120(e^x)
= (e^x)(x^5 - 5x^4 + 20x^3 - 60x^2 + 120x - 120) + C <--- FINAL ANSWER
The "C" term is the constant of integration. We were supposed to add a constant every time we did integration but instead of clustering everything with constants, just add them all up, set it equal to "C" and then add that to our final answer like we've done.
Hope this helps. It's super detailed. Good luck.