# Numerical Integration involving multiple singularities [closed]

I want to solve the following double integral numerically. This integral has singularities in two points.

 a = 10^-6;
b = 10^-9;
Δ =10^-3;
h = 10^-1;
δ = 10^-5;
Ω = -h Sqrt[Δ^2 + δ^2];
θ = 1/2 ArcTan[Δ/δ];
t = 10000;

NIntegrate[E^(-ω/(2a)) E^(-w/(2b))
((1 - Cos[(ω +w + Ω) t ])/(Sqrt[2] (ω + w + Ω)(ω + Ω)))
Sqrt[w ω],{w, 0,1},{ω, 0, 1}, MaxRecursion -> 300, AccuracyGoal -> 10]


Note: singularities are $ω+w=-Ω$ and $ω=-Ω$. It can be solved in Mathematica and the answer is $1.7*10^{-12}$. But we know that the function has two singularities. Is this result authentic? How can I exclude the singularity points?

Thank you

• Your code contains syntax errors when I copied it and pasted it to my notebook !Mathematica graphics I know 2D math and subscripts notations is popular with the masses, but it makes for bad formatting when used outside the notebook and it causes more trouble than it is worth it. – Nasser Jul 13 '16 at 7:26
• what is the question here? the code runs just fine for me – glS Jul 13 '16 at 9:35

There are several ways to handle singularities with NIntegrate. Concerning your question, Since you already know the location of singularities, simply remove them with Exclusions during integration.

NIntegrate[E^(-ω/(2 a)) E^(-w/(2b))((1 - Cos[(ω +w + Ω) t ])/(Sqrt[2] (ω + w + Ω)(ω + Ω)))
Sqrt[w ω],{w, 0,1},{ω, 0, 1}, MaxRecursion -> 300, AccuracyGoal -> 10,
Exclusions -> {ω + w + Ω==0, ω + Ω==0}]


1.75579*10^-12

The short answer is no, the result is insignificant (as is). The error, according to AccuracyGoal -> 10 is around 10^-10, which is 100 times larger than the result.

To check 10^-12, you should bump AccuracyGoal up above that, say to 12 plus half MachinePrecision, or 12 + 8.

NIntegrate[
E^(-ω/(2 a)) E^(-w/(2 b)) ((1 - Cos[(ω + w + Ω) t]) /
(Sqrt[2] (ω + w + Ω) (ω + Ω))) Sqrt[w ω],
{w, 0, 1}, {ω, 0, 1}, AccuracyGoal -> 12 + 8]
(*  0.  *)


To double check this answer, increase WorkingPrecision to see if the result is stable:

NIntegrate[
E^(-ω/(2 a)) E^(-w/(2 b)) ((1 - Cos[(ω + w + Ω) t]) /
(Sqrt[2] (ω + w + Ω) (ω + Ω))) Sqrt[w ω],
{w, 0, 1}, {ω, 0, 1}, AccuracyGoal -> 12 + 8,
WorkingPrecision -> 20]
(*  2.9063486435043377577*10^-5449  *)


So you can have some confidence that the answer is approximately zero.