Re: Problems on definit integratiion of gaussian profiles

• To: mathgroup at smc.vnet.net
• Subject: [mg86830] Re: [mg86785] Problems on definit integratiion of gaussian profiles
• From: Bob Hanlon <hanlonr at cox.net>
• Date: Sat, 22 Mar 2008 00:54:54 -0500 (EST)

```Your first expression

expr1 = Power[E,
Plus[Times[-1, Power[a, 2], Power[c, -2]],
Times[-1, Power[d, -2], Power[Plus[b, Times[-1, x]], 2]]]]

E^(-(a^2/c^2)-(b-x)^2/d^2)

expr21 = Power[E,
Plus[Times[-1, Power[a, 2], Power[c, -2]],
Times[-1, Power[b, 2],  Power[d, -2]], Times[2, b, Power[d, -1], x],
Times[-1, Power[d, -2], Power[x,  2]]]]

E^(-(a^2/c^2) - x^2/d^2 + (2*b*x)/d -
b^2/d^2)

What your second expression should be

expr22 = Power[E,
Plus[Times[-1, Power[a, 2], Power[c, -2]],
Times[-1, Power[b, 2],  Power[d, -2]], Times[2, b, Power[d, -2], x],
Times[-1, Power[d, -2], Power[x,  2]]]]

E^(-(a^2/c^2) - x^2/d^2 + (2*b*x)/d^2 -
b^2/d^2)

expr1 == expr22 // Simplify

True

int1 = Integrate[expr1, {x, -Infinity, Infinity}, Assumptions -> {d > 0}]

(d*Sqrt[Pi])/E^(a^2/c^2)

int2 = Integrate[expr22, {x, -Infinity, Infinity}, Assumptions -> {d > 0}]

(d*Sqrt[Pi])/E^(a^2/c^2)

As expected, the results are identical.

Bob Hanlon

---- Regaly Zsolt <regaly at konkoly.hu> wrote:
> Dear All Mathgroup Fellows!
>
> I dont understand the behavoir of Mathematica integrating
> exponential functions. I try to integrate the same functions in
> different forms. The integrands are
>
> Power[E, Plus[Times[-1, Power[a, 2], Power[c, -2]], Times[-1, Power
> [d, -2], \
> Power[Plus[b, Times[-1, x]], 2]]]]
>
> or
>
> Power[E, Plus[Times[-1, Power[a, 2], Power[c, -2]], Times[-1, Power
> [b, 2], \
> Power[d, -2]], Times[2, b, Power[d, -1], x], Times[-1, Power[d, -2],
> Power[x, \
> 2]]]]
>
> which are the same, but the results will differ. Indeed calculating
> definit integral in a -Infinity to Infinity domain, assuming that all
> variables are larger than 0, the result will be completly different!
>
> 1'st case the result will be:
>
> Times[d, Power[E, Times[-1, Power[a, 2], Power[c, -2]]], Power[Pi, \
> Rational[1, 2]]]
>
> while in the 2'nd case
>
> Times[d, Power[E, Plus[Power[b, 2], Times[-1, Power[a, 2], Power[c,
> -2]], \
> Times[-1, Power[b, 2], Power[d, -2]]]], Power[Pi, Rational[1, 2]]]
>
> As You can see the 1'st result is completly independent of b! I dont
> understand. How can it be fixed?
>
> Cheers,
> Zsolt Regaly
>

```

• Prev by Date: Re: Saving Packages
• Next by Date: Re: Mathematica hangs...
• Previous by thread: Re: Problems on definit integratiion of gaussian profiles
• Next by thread: Variable Order Markov Models in Mathematica