views:

78

answers:

3

Hey everyone,

I'm trying to perform the following integral in Maple:

simplify(int(a*x^2*e^(-a*x^2), x = -infinity .. infinity))

But instead of returning an answer, Maple just returns back the integral statement itself:

int(a*x^2*e^(-a*x^2), x = -infinity .. infinity)

In the prettier form though (with the actual integral sign, etc). I've tried removing the "simplify()" but it doesn't make any difference.

Any idea why that is? It should return a value.

Thanks!

Amit

+1  A: 

For what it's worth Wolfram Alpha seems to be able to do this: http://www.wolframalpha.com/input/?i=integrate%28a*x%5E2*e%5E%28-a*x%5E2%29%2C+x+%3D+-infinity+..+infinity%29

It gives an answer of sqrt(pi) / (2 * sqrt (a)) (assuming Re(a) > 0).

Paul R
That's definitely helpful as it confirms my previously obtained value. I wonder why Maple hates it :/
Amit
A: 

You have to tell maple that a has positive real part. Otherwise, the integral does not exist. Consult the manual for how to do this.

IIRC, there is a assume function, and a symbolic option you can pass to various functions (including simplify and int).

Alexandre C.
Even if I declare a=1 I still get the same thing back. Why is Maple hating me?
Amit
+2  A: 

You may have just a syntax problem. The exponential function applied to x is exp(x) not e^x.

> int(a*x^2*exp(-a*x^2), x = -infinity .. infinity);
                /               (1/2)           \
                |             Pi                |
       piecewise|csgn(a) = 1, --------, infinity|
                |                (1/2)          |
                \             2 a               /
acer
You are right. This worked. Perfect
Amit