Message Boards Message Boards

1
|
4116 Views
|
2 Replies
|
3 Total Likes
View groups...
Share
Share this post:
GROUPS:

Help with double integration

Posted 12 years ago
I'm trying to integrate this using double integrals:
Integrate [(1)/(sqrt(1-x^2-y^2))*exp((-(a-x)^2-(b-y)^2)*(mu^2/2)), {x,-Infinity, Infinity} ,{y,-Infinity, Infinity}]
Mathematica keeps saying that the integration isn't valid becauseĀ 
Integrate::ilim: "Invalid integration variable or limit(s) in {-\[Infinity],0,2}."
Infinity::indet: "Indeterminate expression 0\ exp\ (-\[Infinity])\ Sign[c]^2 encountered."
I want to integrate this expression (which is the product of a 2 dimensional Gaussian function and the surface area element of a sphere with respect to x and y). I also want the final expression to be left in terms of a, b, and mu, which are parameters in this case. How do I do this?
POSTED BY: Omar Khan
2 Replies
Since double integration can be broken up to doing integration once w.r.t "x" and then integrate the result again with respect to the second variable "y", there is a direct way to see where the hard spot in this. It comes down to this form
integrand = 1/Sqrt[1 - x^2] Exp[(-(a - x)^2)];
This has pole at when a=1. Assuming a!=1 does not help, since integrand is complex
Assuming[a != 1, Integrate[1/Sqrt[1 - x^2] Exp[(-(a - x)^2)], {x, 0, Infinity}]]
For example
1/Sqrt[1 - x^2] Exp[(-(a - x)^2)] /. {a -> 2, x -> 3}//N
gives
0. - 0.130065023755722 I
But NIntegrate works (for some numerical value of the parameters)
ClearAll[a, x];
NIntegrate[1/Sqrt[1 - x^2] Exp[(-(2 - x)^2)], {x, 0, Infinity}]
(*0.301179596024786 - 1.19177370812431 I*)
So in summary the problem is this:
integrand = 1/Sqrt[1 - x^2] Exp[(-(a - x)^2)];
producing comlplex integrand and also a pole at a=1
POSTED BY: Nasser M. Abbasi
I am not sure what is causing the error messages, but it is most likely related to a value you previously defined that you are using within Integrate in a way that violates the function's syntax. Please try restarting Mathematica to begin with.

The first step is to make sure you are using Mathematica's syntax. In Mathematica, built-in functions are capitalized and wrap their arguments in square brackets. So the integral can be written out as:
Integrate[(1)/(Sqrt[1 - x^2 - y^2])*
  Exp[(-(a - x)^2 - (b - y)^2)*(mu^2/2)], {x, -Infinity,
  Infinity}, {y, -Infinity, Infinity}]

This integral appears to be difficult to solve for generic values of a, b, and mu. You can use the Assuming expression to give Mathematica assumptions about the values of those parameters. For example, we could assume that they are Real numbers:
Assuming[Element[{a, b, mu}, Reals],
Integrate[(1)/(Sqrt[1 - x^2 - y^2])*
   Exp[(-(a - x)^2 - (b - y)^2)*(mu^2/2)], {x, -Infinity,
   Infinity}, {y, -Infinity, Infinity}]
]

Mathematica takes a while with this expression and hasn't produced a solution for me yet. It is possible that it may not find a symbolic solution or that a symbolic solution doesn't exist. If that is the case, then this problem has to be evaluted numerically.
POSTED BY: Sean Clarke
Reply to this discussion
Community posts can be styled and formatted using the Markdown syntax.
Reply Preview
Attachments
Remove
or Discard

Group Abstract Group Abstract