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?

  • $\begingroup$ I can see all kinds of infinities and undefined expressions for x,y -> 0 or 1. Are you really sure about your calculations? $\endgroup$ Mar 20, 2014 at 22:40
  • $\begingroup$ @SjoerdC.deVries yeah, pretty sure. $\endgroup$ Mar 20, 2014 at 22:49
  • $\begingroup$ 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. $\endgroup$
    – GregH
    Mar 21, 2014 at 0:17

2 Answers 2


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

Mathematica graphics

is equivalent to

Mathematica graphics

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]]
  • $\begingroup$ Good job! I also know Mathematics stuff, but the point was more related to what Mathematica does. $\endgroup$ Mar 21, 2014 at 7:33
  • $\begingroup$ @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. $\endgroup$
    – Michael E2
    Mar 21, 2014 at 10:28
  • $\begingroup$ I see. I've read it. Thanks. $\endgroup$
    – Michael E2
    Mar 21, 2014 at 12:56
  • $\begingroup$ OK. I thank you for all details offered. $\endgroup$ Mar 21, 2014 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.


Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.