# A possible error related to the evaluation of a double integral

According to the Mathematica, the integral below

    NIntegrate[ Log[Log[1/(x y )]]  Log[1/(x y )]^(-0.5 - 1), {x, 0, 1}, {y, 0,1}]


might possibly evaluate to "Overflow, Indeterminate, or Infinity" for $t=-0.5 - 1$, although my calculations show that there should be no problem for all the cases with $t>-2$. More exactly, Mathematica yields this result:

NIntegrate::inumri: "The integrand Log[Log[1/(x y)]]/Log[1/(x y)]^1.5 has evaluated to Overflow, Indeterminate, or Infinity for all sampling points in the region with boundaries {{0.,3.97545*10^-31},{0,1}}"

So, is it a problem with my code or it's just another problem related to the Mathematica?

• I can see all kinds of infinities and undefined expressions for x,y -> 0 or 1. Are you really sure about your calculations? – Sjoerd C. de Vries Mar 20 '14 at 22:40
• @SjoerdC.deVries yeah, pretty sure. – user 1357113 Mar 20 '14 at 22:49
• You divide 1/(xy) and your domain contains the point (0,0). Your function is undefined there - so the integral may not converge, which is what Mma points out. Your calculations show that it does converge; this doesn't contradict Mma. Apparently it just isn't able to evaluate it. Sometimes rewriting your integrand in a different way helps. – GregH Mar 21 '14 at 0:17

If you perform the change of variables $x = u, y=v/u$, whose Jacobian is $1/u$, the square $0 \le x \le 1, 0 \le y \le 1$ is transformed to the triangle $0 \le u \le 1, 0 \le v \le u$. This triangle is the same as $0 \le v \le 1, v \le u \le 1$. Therefore the integral is equivalent to The inner integral can be done symbolically and the outer numerically:

Integrate[Log[Log[1/v]] / (u Log[1/v]^(3/2)), {u, v, 1},
Assumptions -> 0 < v < 1]
NIntegrate[%, {v, 0, 1}]
(*
Log[-Log[v]] / Sqrt[-Log[v]]
-3.48023
*)

• Good job! I also know Mathematics stuff, but the point was more related to what Mathematica does. – user 1357113 Mar 21 '14 at 7:33
• @Chris'ssis I don't know much about improper multiple integrals. Our textbook suggested that they were more difficult to deal with and that there wasn't a standard definition. That might have something to do with M's ability to deal with your integral. I also tried NLimit on the integral with the domain {x, 0 + a, 1 - a}, {y, 0 + a, 1 - a}, as a -> 0. With the option Scale -> 1/10000, the result close to the above. – Michael E2 Mar 21 '14 at 10:28
• I see. I've read it. Thanks. – Michael E2 Mar 21 '14 at 12:56
• OK. I thank you for all details offered. – user 1357113 Mar 21 '14 at 12:56

With a little more patience :

f[x_, y_] = Log[Log[1/(x y)]] Log[1/(x y)]^(-0.5 - 1) ;
g[x_?NumericQ] := NIntegrate[f[x, y], {y, 0, 1}]

NIntegrate[g[x], {x, 0, 1}]
(* -3.48023 *)


without warnings/errors.