Skip to main content

calculus and analysis - Integrate: Mathematica does nothing, not even repeat the code!


I need to calculate the following integral:


$$ \int_{-\infty}^{\infty}da\int_{-\infty}^{\infty}db\int_{-\infty}^{\infty}dx\int_{-\infty}^{\infty}dy~e^{\frac{-(b^{2}+(a-10g)^{2})}{g^{2}-1}}e^{\frac{-(y^{2}+(10g-x)^{2})}{g^{2}-1}}(0.3+0.7\frac{(b^{2}+(a-10g)^{2})}{g^{2}-1})(0.3+0.7\frac{(y^{2}+(10g-x)^{2})}{g^{2}-1}) $$ The corresponding mathematica code is



Integrate[E^(-(b^2 + (a - 10 g)^2)/(g^2 - 1)) E^(-((10 g - x)^2 + y^2)/(g^2 - 1)) (0.3 + 0.7 (b^2 + (a - 10 g)^2)/(g^2 - 1)) (0.3 + 
0.7 ((10 g - x)^2 + y^2)/(g^2 - 1)) E^-((a - x)^2 + (b - y)^2), {a, -∞, ∞}, {b, -∞, ∞}, {x, -∞, ∞}, {y, -∞, +∞}, Assumptions -> g > 1]

Mathematica gives nothing. It does not even repeat the integral form. Actually the calulation is finished with a beep and when I define a number (say, 0.3) using a symbol, the symbol becomes undefined.



Answer



If I use exact values for 0.3 and 0.7, it works:


Integrate[
E^(-(b^2 + (a - 10 g)^2)/(g^2 - 1)) E^(-((10 g - x)^2 + y^2)/(g^2 -
1)) (3/10 + 7/10 (b^2 + (a - 10 g)^2)/(g^2 - 1)) (3/10 +
7/10 ((10 g - x)^2 + y^2)/(g^2 - 1)) E^-((a - x)^2 + (b - y)^2),

{a, -∞, ∞}, {b, -∞, ∞}, {x, -∞, ∞}, {y, -∞, +∞},
Assumptions -> g > 1]

After a minute or so I get this:


(*  ((-1 + g^2)^2 (29 - 88 g^2 + 109 g^4) π^2)/(50 (-1 + 2 g^2)^3)  *)

When using an exact solver, it is better to use exact numbers such as 3/10 instead of 0.3. The approximate numbers 0.3 are represented by floating-point numbers that are subject to round-off error:


(0.3 + 0.6) - 0.9
(* -1.11022*10^-16 *)


And such errors can throw off exact solvers.


Comments