2

Find $\displaystyle \int x^ne^xdx$.

I haven't been able to figure this out. Do I just keep repeatedly applying integration by parts?

Puzzled417
  • 6,956
  • 5
    Pretty much. ${}$ –  Dec 22 '15 at 03:44
  • This is a duplicate of that question of mine, in fact it's a less general case (take $b=-1$). – YoTengoUnLCD Dec 22 '15 at 03:56
  • 2
    If $n$ is assumed to be a positive integer, as suggested by the question but not made explicit, then the situation is significantly better than the one outlined in the proposed duplicate. – hardmath Dec 22 '15 at 04:46
  • Regarding repeated integration by parts, see also this: http://math.stackexchange.com/questions/70974/lesser-known-integration-tricks/71195#71195 – Hans Lundmark Dec 22 '15 at 09:54

4 Answers4

4

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.

Aurey
  • 1,332
  • 8
  • 17
3

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.$$

2

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$.

copper.hat
  • 172,524
1

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$