∫ (x^n)(e^x) dx
Integration by parts:
∫ uv' dx = uv - ∫ u'v dx
Let; u = x^n , v' = e^x
Then; u' = nx^(n-1) , v = e^x
Giving; ∫ (x^n)(e^x) dx = (x^n)(e^x) - ∫ (nx^(n-1))(e^x) dx
Now we see that we have an additional integral to deal with:
When dealt with we get the following given that you call assign u to nx^(n-1) and v' to e^x (I think you did the opposite, assigning u to e^x and v' to nx^(n-1). This resulted in you ending up with an expression identical to your inital expression, due to the - sign they canceled and you got 0:
Well, back to the proble... as I was saying... when dealing with this last integral properly we get the following ;)
∫ (x^n)(e^x) dx = (x^n)(e^x) - (nx^(n-1))(e^x) + ∫ (n(n-1)x^(n-1))(e^x) dx
So we get another integral... yaay... hmm...
Well, upon thinking, we realize that we will end up getting the below expression, as we will repeatedly be left with yet another integral. We will solve these integrals until we are left with the integral of k(e^x) dx (k = konstant = n!). All the working is shown below:
∫ (x^n)(e^x) dx = (x^n)(e^x) - (nx^(n-1))(e^x) + .... - n(n-1)*...*(n-(n-3))(n-(n-2)) + ∫ [n(n-1)*...*(n-(n-2))(n-(n-1))]x^(n-n)(e^x) dx
Note that * indicates multiplication, and that the dots (....) indicates the rest of the terms. They follow the same pattern as the before terms (the exponent of x decreases and the number in from of x increases).
The last integral in our expression so far...
∫ k(e^x) dx , where k = n(n-1)*...*(n-(n-2))(n-(n-1)) = n!
... becomes...
∫ n!(e^x) dx = n!(e^x) + C
So our final expression is gonna be:
∫ (x^n)(e^x) dx = (x^n)(e^x) - (nx^(n-1))(e^x) + .... - n(n-1)*...*(n-(n-3))(n-(n-2)) + n!(e^x) + C
Note that n! is the same as n(factorial) which is:
n(n-1)(n-2) * ... * (n-(n-2)) * (n-(n-1))
If n = 6, then n! = 6(5)(4)(3)(2)(1) = 720
ALSO NOTE THAT THE LAST TERMS OF OUR EXPRESSION ARE EITHER GOING TO BE ADDED OR SUBTRACTED DEPENDING ON WHETHER N IS EVEN OR ODD!
So we should write it using ∓ signs:
∫ (x^n)(e^x) dx = (x^n)(e^x) - (nx^(n-1))(e^x) + .... ∓ (3 n(n-1)*...*(n-(n-3))(n-(n-2)) ± n!(e^x) + C
Hope you were able to hang in there! :P
Writing such expressions on the pc is difficult and it becomes hard to read :(
I liked the problem... however, I lack the skills and knolwedge needed to solve this one in a simpler way :P
Hope my way was cool and reasonable enough though ;)