In the second episode of season $8$ of "The Big Bang Theory," which aired yesterday night, it is stated that one can integrate $x^2e^{-x}$ by using Feynman's trick of differentiating under the integral. Is this actually true, and if so, how to do it? And is it "better," in any sense, than the usual way of doing it by integration by parts?
-
1I wasn't the only one who immediately went to try this when I heard that?! – Robin Goodfellow Sep 23 '14 at 16:48
-
1This is the second question today that comes from this episode. Funny. – Asaf Karagila Sep 23 '14 at 16:52
-
What's the first? – Nishant Sep 23 '14 at 19:54
-
1@Nishant http://math.stackexchange.com/questions/942581/big-bang-theory-reference-to-formal-logic – Jonas Dahlbæk Sep 23 '14 at 20:22
1 Answers
If we just compute without thinking about problems such as interchanging integration and differentiation, the derivation is very simple. $$ \int_0^{\infty} x^2e^{-x}dx=\left.\left(\frac{d}{d\alpha}\right)^2\right|_{\alpha=1}\int_0^{\infty} e^{-\alpha x}dx=\left.\left(\frac{d}{d\alpha}\right)^2\right|_{\alpha=1} \frac{1}{\alpha}=\left.\frac{2}{\alpha^3}\right|_{\alpha=1}=2. $$
If you want limits other than the positive real axis, the same trick allows you to arrive at $$ \int_a^{b} x^2e^{-x}dx=\left.\left(\frac{d}{d\alpha}\right)^2\right|_{\alpha=1}\int_a^{b} e^{-\alpha x}dx=\left.\left(\frac{d}{d\alpha}\right)^2\right|_{\alpha=1} \frac{1}{\alpha}(e^{-a\alpha}-e^{-b\alpha}). $$ Of course, this can also be evaluated explicitly by using the Leibniz rule, but I will leave that up to you.
- 4,776
-
-
-
1
-
-
1Gives: $a^2 e^{-a}-b^2 e^{-b} + 2 \left(e^{-a}-e^{-b}\right)-2 \left(b e^{-b}-a e^{-a}\right)$ – amcalde Sep 23 '14 at 17:11
-
Can you elaborate a little more on how you get $$\int_0^{\infty} x^2e^{-x}dx=\left.\left(\frac{d}{d\alpha}\right)^2\right|_{\alpha=1} \int_0^{\infty} e^{-\alpha x}dx$$? I've seen differentiation under the integral sign before, but we have to let $I(x)$ with an $a$ inside, find $I_a$, then integrate back. How do you do this? Do you do all the additional steps in one? Can you make it more detailed? Also, I'm lost on how $x^2$ dissapears. – UserX Sep 25 '14 at 16:27
-
Time's up, sorry for second comment. Why do we choose the second derivative instead of the first? – UserX Sep 25 '14 at 16:34
-
1@UserX Here are some notes by Jie Yang that explain the procedure better than I ever could. – Jonas Dahlbæk Sep 26 '14 at 08:35
-
I understand the proccess in general, I don't understand YOUR process in THIS problem. – UserX Sep 26 '14 at 09:50
-
2@UserX It is a two-fold application of Theorem 5 in the notes I linked to. The integrals are uniformly convergent because you have a bound of the type $x^n e^{-\alpha x}\leq C_n e^{-\alpha x/2}$ on the positive axis. As for setting $\alpha=1$, this is an application of Theorem 4 in the notes I linked to. – Jonas Dahlbæk Sep 26 '14 at 10:01
-
1@UserX We use the second derivative because it works. The Feynman trick is a trick in the true sense of the word; you really need to come up with a clever way to make your integral simpler by introducing an additional parameter. In this case, by introducing $\alpha$ in the integrand and differentiating twice, we get rid of $x^2$ and are left with the integral of an exponential, which we can carry out easily (we know a positive anti-derivative, so we can use the Fundamental Theorem of Calculus combined with monotone convergence). – Jonas Dahlbæk Sep 26 '14 at 10:48
-
How do we get rid of the $x^2$? I get $$\frac{\partial^2}{\partial a^2} x^2 e^{-ax} =x^4 e^{-ax}$$ – UserX Sep 26 '14 at 11:07
-
3Almost right. We use $$\frac{\partial^2}{\partial a^2} e^{-ax} =x^2 e^{-ax}.$$ – Jonas Dahlbæk Sep 26 '14 at 11:09
-
-