Is this right? (improper integral)

For the discussion of math. Duh.

Moderators: gmalivuk, Moderators General, Prelates

User avatar
Coding
Posts: 47
Joined: Thu Sep 15, 2011 6:59 pm UTC

Is this right? (improper integral)

Postby Coding » Thu Apr 12, 2012 10:46 pm UTC

Not homework, just seemed like a neat problem to me (saw just the conclusion stated in a textbook, and decided to try to get it myself; I'm currently in Calc II).
[math]\int_{0}^{\infty} x^k e^{-x}dx[/math]
Now I use the indefinite integral and integrate by parts, with u=xk and dv=e-xdx:
[math]\int x^k e^{-x}dx = x^k(-e^{-x}) - \int -e^{-x}kx^{k-1}dx[/math] [math]= -x^ke^{-x} + \int kx^{k-1}e^{-x}dx[/math]
Hey, the second term looks just like the original integral, with a different coefficient and xk-1 rather than xk. So repeatedly integrating by parts will eventually give me this:
[math]-x^ke^{-x} - kx^{k-1}e^{-x} - k(k-1)x^{k-2}e^{-x} - ... - (k!)x^{0}e^{-x}[/math]
Which I can rewrite as:
[math]\frac{-x^k - kx^{k-1} - k(k-1)x^{k-2} - ... - k!}{e^x}[/math]
So:
[math]\int_{0}^{\infty} x^k e^{-x}dx = \lim_{b \to \infty} \left( \frac{-b^k - kb^{k-1} - k(k-1)b^{k-2} - ... - k!}{e^b} - \frac{-0^k - k0^{k-1} - k(k-1)0^{k-2} - ... - k!}{e^0}\right)[/math]
[math]= \left( \lim_{b \to \infty} \frac{-b^k - kb^{k-1} - k(k-1)b^{k-2} - ... - k!}{e^b}\right) - \frac{-k!}{e^0}[/math]
I've got infinity / infinity for the limit, so I use l'Hopital's rule repeatedly, taking the 1st, 2nd,..,kth derivative, so the denominator remains eb while all terms but one (the leftmost) in the numerator disappear:
[math]\left( \lim_{b \to \infty} \frac{-k!}{e^b}\right) + k![/math]
The limit is 0, so I am left with k! and have: [imath]\int_{0}^{\infty} x^k e^{-x}dx = k![/imath]
Last edited by Coding on Fri Apr 13, 2012 12:55 am UTC, edited 1 time in total.

User avatar
Dopefish
Posts: 855
Joined: Sun Sep 20, 2009 5:46 am UTC
Location: The Well of Wishes

Re: Is this right? (improper integral)

Postby Dopefish » Thu Apr 12, 2012 11:05 pm UTC

Wolfram gives the result of the integral as gamma(k+1), which is equal to k! for positive integers, so it seems you've done it right.

You need to be a bit careful if you're not assuming that k is a positive integer however, because you're doing things like taking k-th derivatives and integration by parts k times, which could be problematic if k is negative or a non-integer.

User avatar
Coding
Posts: 47
Joined: Thu Sep 15, 2011 6:59 pm UTC

Re: Is this right? (improper integral)

Postby Coding » Thu Apr 12, 2012 11:07 pm UTC

Yeah, good point. Thanks.

User avatar
eSOANEM
:D
Posts: 3652
Joined: Sun Apr 12, 2009 9:39 pm UTC
Location: Grantabrycge

Re: Is this right? (improper integral)

Postby eSOANEM » Thu Apr 12, 2012 11:24 pm UTC

I actually got this same question (although it was explicitly stated to only do it for positive integer values of k) on a paper for a university interview (for physics). I don't remember anyone else managing it so well done!

One useful trick which might have saved a couple of lines is that e^x grows faster than any finite order polynomial as x goes to infinity (it also goes to 0 faster than any finite order polynomial grows as x goes to -infinity), this can really help when you've go limits with e^x and polynomials in it (as happened here).
my pronouns are they

Magnanimous wrote:(fuck the macrons)

Timefly
Posts: 56
Joined: Sun Nov 14, 2010 7:30 pm UTC

Re: Is this right? (improper integral)

Postby Timefly » Fri Apr 13, 2012 10:01 am UTC

Your answer is correct. Though the derivation is slightly simpler than that.
Just notice that k! = k*(k-1)! and so does your integral, also that your integral has a value of 1 when k = 0.
This means you've defined the factorial over the integers. A further proof that the function is meromorphic is required to show that you have the gamma(x+1).
http://en.wikipedia.org/wiki/Gamma_function


Return to “Mathematics”

Who is online

Users browsing this forum: No registered users and 12 guests