# How reliable this numerical integration is?

**URL:** <https://community.wolfram.com/t/how-reliable-this-numerical-integration-is/9685>\
**Category:** Questions\
**Tags:** calculus, numerical-computation\
**Created:** [November 26, 2016, 1:36pm UTC](https://community.wolfram.com/t/how-reliable-this-numerical-integration-is/9685 "2016-11-26T13:36:19Z")\
**Posts on this page:** 1\
**Page:** 1

<div class="post-metadata">

**Author:** ![jadiaz](https://yyz1.discourse-cdn.com/wolfram/user_avatar/community.wolfram.com/jadiaz/32/4034_2.png) [@jadiaz](https://community.wolfram.com/u/jadiaz)\
**Post date:** [November 26, 2016, 1:36pm UTC](https://community.wolfram.com/t/how-reliable-this-numerical-integration-is/9685/1 "2016-11-26T13:36:19Z")

</div>

I have calcuated this integral:

```
NIntegrate[Sqrt[x Exp[-100 x]] Sqrt[y Exp[-100 y]] (1 - Exp[1000 I (x + y)])/((x + y) (y - 0.001)), {x, 0, \[Infinity]}, 
{y, 0, 0.001, \[Infinity]}]

```

and due to the singularity at y=0.001, the integral should diverge.  
However, it is posible to separate the real and imaginary part, in such way that I can integrate firts wrt x symbolically, and then wrt y numerically:

```
Assuming[y >= 0, Integrate[(1 - Cos[1000. (x + y)]) Sqrt[x] Exp[-50. x], {x, 0, \[Infinity]}]]
(*0.00250663 + 0.0000182432 Cos[1000. y] + 0.0000212049 Sin[1000. y]*)

```

and then:

```
NIntegrate[1/(-0.001 + y) Sqrt[y] Exp[-50 y] (0.0025066282746310014 + 0.000018243204055544903 Cos[1000. y] 
+ 0.000021204895736310885 Sin[1000. y]), {y, 0, .001, \[Infinity]}, Method -> "DoubleExponential", 
 MaxRecursion -> 200]
(*0.000567425*)

```

Similarly for the imaginary part, I obtained `2.21313*10^-6 I`.

Threfore, my integral value is `0.000567425+2.21313*10^6 I`.

My question is, if my integral diverges, how much reliable my numerical result is as I did not get any error from MMA? Oh, I am using MMA ver 11.0.1 in a iMac with macOS Sierra ver. 10.12.1
