Find $\displaystyle \int x^ne^xdx$.
I haven't been able to figure this out. Do I just keep repeatedly applying integration by parts?
Find $\displaystyle \int x^ne^xdx$.
I haven't been able to figure this out. Do I just keep repeatedly applying integration by parts?
May I recommend integration by undetermined coefficients, where given some $n$, we know the solution will take the form $P(x)e^x + C$, where $P(x)$ is some polynomial of degree $n$. (It really can't be anything else). So write $P(x)$ as $a_0 + a_1x + ... + a_nx^n$, take the derivative, and back out the coefficients.
Or if you want to get practice, use integration by parts. But that's really nasty.
Finding an explicit formula for the antiderivative will involve the incomplete Gamma function.
What you could do (and what is usually standard) is get a recurrence relation.
Let $$I_n = \int x^n e^x dx, \ n\in \mathbb{N}\cup{0}$$ Integration by parts yields
$$I_n = x^n e^x -n \int x^{n-1} e^x dx = x^n e^x - n I_{n-1}.$$
The first term in this recurrence relation is $$I_0 = e^x.$$
Here is another approach for definite integrals:
Let $I(t) = \int_a^b e^{tx} dx = {1 \over t} (e^{tb}-e^{ta})$.
Then $I^{(n)}(1) = \int_a^b x^n e^{x} dx$.
Notice, integrating by parts as follows $$\int x^ne^x\ dx$$ $$=x^n\int e^x\ dx-\int nx^{n-1}e^x\ dx$$ $$=x^ne^x-nx^{n-1}e^x+n\int (n-1)x^{n-2}e^x\ dx$$ $$=x^ne^x-nx^{n-1}e^x+n(n-1)x^{n-2}e^x-n(n-1)\int (n-2)x^{n-3}e^x\ dx$$ $$................$$ $=\left(x^n-nx^{n-1}+n(n-1)x^{n-2}-n(n-1)(n-2)x^{n-3}+\ldots +(-1)^{n+1}n!\right)e^x+C$
$\forall \ \ n\in N$