Group Abstract Group Abstract

Message Boards Message Boards

Solve convergence problem in two-dimentional NIntegrate?

Posted 9 years ago
POSTED BY: F TQ
3 Replies

MMA can find symbolic solution for this double integral:

ClearAll["Global`*"];
Remove["Global`*"];

f[w_, v_] :=  Sqrt[w^2 E^(-w/l)] Sqrt[v^2 E^(-v/k)] (1 - E^(1000 I (w + v))/(w + v) (v - 1/100))

sol = Integrate[f[w, v], {w, 0, Infinity}, {v, 0, Infinity}, Assumptions -> {l, k} > 0, PrincipalValue -> True]

(* (2 k^2 l^2 (800000000 k^6 (I + 2000 l) - 
     l^3 (I + 200 I l + 400000 l^2) - 
     800000 k^5 (1 + 2000 I l + 8000000 l^2) + 
     k l^2 (I - (6000 - 1200 I) l + 800000 l^2 + 1600000000 I l^3) + 
     2000 k^4 (-1 + (800 + 4000 I) l + 1600000 I l^2 + 
        4800000000 l^3) + 
     k^2 l (I + (10000 - 600 I) l + (4400000 + 8000000 I) l^2 - 
        5600000000 I l^3 + 1600000000000 l^4) - 
     k^3 (I + (2000 + 400 I) l + (5600000 + 16000000 I) l^2 - 
        1600000000 I l^3 + 6400000000000 l^4) - 
     2 k (I + 2000 k)^2 l (I + 2000 l) (k - l + 600 k l) Log[(
       k (I + 2000 l))/((I + 2000 k) l)]))/(25 (I + 2000 k)^2 (k - 
     l)^4 (I + 2000 l))*)


     sol1 = Limit[(sol /. k -> 1/10), l -> 1/10]
     (* 153615360523216720031/96009600360006000037500 - (3190240234 I)/960096003600060000375*)
      N[sol1, 39]
      (* 0.00159999999945012915551108225908344037372 - 3.32283461449437974587676677293*10^-12 I  *)

Maple solution:

enter image description here

Numeric solution:

ClearAll["Global`*"];
Remove["Global`*"];
l = 1/10; 
(* Dont use 0.1. Better is using  exact number or alternative
 SetPrecision[0.1, 100] ,or 0.1`100 you may increase the value 100 for better result *)
k = 1/10;
f[w_, v_] := Sqrt[w^2 E^(-w/l)] Sqrt[v^2 E^(-v/k)] (1 - E^(1000 I (w + v))/(w + v) (v - 1/100))
NIntegrate[f[w, v], {w, 0, Infinity}, {v, 0, Infinity}, Method -> "GlobalAdaptive", WorkingPrecision -> 19]
(*0.001599999999406708480 - 3.323499234519002782*10^-12 I*)

For better result increase WorkingPrecision.

POSTED BY: Mariusz Iwaniuk
POSTED BY: Mariusz Iwaniuk
Posted 9 years ago

Sorry. By looking at the Maple code I realized that the input code was incorrect. I corrected the code. Also, I posted the code in the informal Mathematica forum, here. Please analyze this code.

POSTED BY: F TQ
Reply to this discussion
Community posts can be styled and formatted using the Markdown syntax.
Reply Preview
Attachments
Remove
or Discard