I was wondering how to determine $$\int x^2 e^{-x^2}\mathrm dx?$$ I tried to move the exponential into the integrator, and apply integration by parts, but that will make the integrand more complicated. Thank you!
How to determine $\int x^2 e^{-x^2}\mathrm dx$?
-
3Integration by parts will work. Try writing the integrad as $x\cdot xe^{-x^2}$. – 2011-09-12
-
3In general: for $\int t^n \exp(-t^2)\mathrm dt$ with $n$ a nonnegative integer, the integral is elementary for odd $n$ and requires the use of the error function for even $n$ – 2011-09-12
-
0It's fun to find a formula (or recursion) for $\int x^n e^{-x^2}$. – 2011-09-12
-
0The _definite_ integral has a simple closed-form expression. – 2011-09-12
-
0Actually, I seem to recall that there is a nice simple formula for $\int p(x) e^{-x^2}$ in terms of the polynomial $p$. – 2011-09-12
3 Answers
Uhm.. of course you can't calculate it since your integral involves error function which is not a elementary function. Indeed you have $$\int x^2e^{-x^2}\mathrm d x=\frac{1}{2}\int x\cdot 2x e^{-x^2}=-\frac{1}{2}xe^{-x^2}+\frac{1}{2}\int e^{-x^2}=-\frac{1}{2}xe^{-x^2}+\frac{1}{4}\sqrt \pi\text{ erf}(x).$$
-
5erf$(x)$ can be computed for any real $x$ just as $\ln(x)$, $\sin(x)$, $\arctan(x)$ can be computed. It's true that erf is not on the list of Elementary Functions, but that is an arbitrary list. As an example, both $\ln(2)$ and erf$(2)$ have meaning as the exact value of a real number. Both can be computed to an arbitrarily high level of decimal precision using calclulus-based techniques. – 2011-09-12
-
0edited.. i removed that ugly sentence of mine.. – 2011-09-12
-
1@alex: I don't agree that the list of elementary functions is completely arbitrary. The elementary functions are defined in a purely algebraic manner in terms of the natural field operations (addition, multiplication, conjugation,...), so they are "elementary" in the sense that they don't require you to introduce any limiting procedures in order to compute them (at least for rational values, for arbitrary real/complex numbers this is obviously unfeasible). – 2011-09-12
-
0This is also apparent from the fact that polynomials, exponentials and logarithms have generalizations to some other algebraic structures (groups, fields), at least as partially defined multivalued functions, while the error function does not. – 2011-09-12
-
0@Mark: To play devil's advocate (since I think "the List" is well-chosen), how do you use addition, multiplication, composition, etc. to define trigonometric and inverse trigonometric functions? Also, it sounds like you avoid irrational numbers and limiting processes in your definition of exponentiation and logarithms, but then what are $2^{1/2}$ and $\log_{10}(2)$?. On your last comment, erf can generalize to some other algebraic structures using power series in the same way that exp does (although I couldn't say why you would do that). – 2011-09-12
-
0$2^{1/2}$ is the positive number $x$ such that $x^2 = 2$, similarly for $\log_{10}(2)$. The definition is purely algebraic, though questions of existence and uniqueness (of such a number $x$) pertain to analytic properties of the real field. What I meant is that you can define $2^{1/2}$ (or $a^{1/2}$ in general) as above, in any field or multiplicative group. The definition won't always makes sense but merely stating it requires nothing but the existing algebra. As for trigonometric functions, $\cos(z)=\frac{\exp(iz)+\overline{\exp(iz)}}{2}$, etc. – 2011-09-13
-
1@Mark: I'm not alerted to your response unless you tag me. What is "exp", if you are not using limiting processes? If you refer to $e$, I'll ask what $e$ is without access to limits, and then I'll ask what $e$ would mean in other algebraic structures. But let's take it back a step. Your argument is that "the list" is not arbitrary because it follows in a natural way from $+,-,\times,\div$,^, and $\circ$: four binary operations on numbers and a binary option on functions. Why is that list less arbitrary than one with a monary operation on functions too: $\lim_{x\rightarrow\infty}$? – 2011-09-14
-
1Not to mention that you have thrown in complex conjugation into the mix. And that you are invoking complex numbers to provide a definition for a function on the rationals. (If you intend the above to be a definition for $\cos(z)$, then $\exp(iz)$ needs to make sense first - again, without access to limits.) Or that I think the questions of existence and uniqueness are important. – 2011-09-14
-
0@alex: these are good questions. ;) – 2011-09-14
-
1@Mark: I'm just playing devil's advocate. I like the list of elementary functions; I think you're right - it's not really arbitrary. I can't explain why I feel this way though. Maybe it's like you say in that only finite processes are used. If you allow a finite-dimensional (2-D) space into the conversation, then maybe you can get trig functions defined too. Maybe we should post a soft question about it :) – 2011-09-14
If you integrate by parts using $u=x, dv=x\exp(-x^2)\;dx$ you can get an integral in terms of the error function. You can see it at Wolfram Alpha
An alternative is to set $y = x^2$ to convert the integral into $$ \int_0^\infty x^2 e^{-x^2} dx = \frac{1}{2}\int_0^\infty \sqrt{y} e^{-y} dy $$ which can be expressed as $\frac{1}{2}\Gamma(\frac{3}{2}) = \frac{1}{4}\Gamma(\frac{1}{2}) = \frac{\sqrt{\pi}}{4}$ if the definite integral from $0$ to $\infty$ is meant. Otherwise, as mentioned by others, there is no expression in elementary terms for the antiderivative of $x^2 e^{-x^2}$
-
0That's actually how I was taught how to do it,Dilip. Works nicely as long as you change the limits when necessary. – 2011-09-12