# Integration not working, can I find a closed form?

I have tried:

Integrate[((1 - x - y + x y + x Log[x] - x y Log[x] + y Log[y] - x y Log[y] + x y Log[x] Log[y]) Log[ 1 + x y])/((1 - x) x (1 - y) y Log[x] Log[y]), {x, 0, 1}, {y, 0, 1}]

and obtained:

\!$$\*SubsuperscriptBox[\(\[Integral]$$, $$0$$, $$1$$]$$\*SubsuperscriptBox[\(\[Integral]$$, $$0$$, $$1$$] \*FractionBox[$$\((1 - x + x\ Log[x])$$\ $$(1 - y + y\ Log[y])$$\ Log[ 1 + x\ y]\), $$\((\(-1$$ + x)\)\ x\ $$(\(-1$$ + y)\)\ y\ Log[ x]\ Log[y]\)] \[DifferentialD]y \[DifferentialD]x\)\)

and then trying to simplify or integrate again just spits out the exact same form.

Simplify[\!$$\*SubsuperscriptBox[\(\[Integral]$$, $$0$$, $$1$$]$$\*SubsuperscriptBox[\(\[Integral]$$, $$0$$, $$1$$] \*FractionBox[$$\((1 - x + x\ Log[x])$$\ $$(1 - y + y\ Log[y])$$\ Log[ 1 + x\ y]\), $$\((\(-1$$ + x)\)\ x\ $$(\(-1$$ + y)\)\ y\ Log[ x]\ Log[y]\)] \[DifferentialD]y \[DifferentialD]x\)\)]

How do I overcome this difficulty? Is there some trick to make it cooperate here?

Also can a closed form be completed?

• Try this % // N. – Artes Oct 31 '14 at 10:50
• @Artes Oh, that is very nice, instant numerical solution. Genius! Is there any way to work on a closed form? – Algebra Oct 31 '14 at 11:00
• @Artes I have tried WolframAlpha["NUM", IncludePods -> "PossibleClosedForm"] which works fine for closed form, but I can't seem to input my exact numerical output from the integrals. I tried WolframAlpha["%", IncludePods -> "PossibleClosedForm"] to be exact, but it told me this doesn't converge, which makes little sense, since the integral has already been calculated? – Algebra Oct 31 '14 at 11:08
• Since Log[0]==-Infinity, try integrating from a to 1 with the assumption 0<a<1 and then take the limit as a->1. That fails. Try single integral, either x or y because it is symmetric. That fails. Try expanding the numerator into a sum of nine terms and then do nine integrals, with or without a, those fail. Closed form not seeming hopeful at this point. – Bill Oct 31 '14 at 18:32
• 1) your resulting expressions simply means that MMA returns the Integrate unevaluated. 2) I don't believe that there's a closed expression for the integral. 3) But substituting {x->Exp[-u],y->Exp[-v]} leads to the integral over g = (1/u - 1/(E^u - 1))*(1/v - 1/(E^v - 1))*Log[1 + E^(-u - v)] which, after developing the Log, gives a sum of terms which factor into f1(u)*f1(v) and hence to square of a one-dimensional integral. But still I haven't found nice expressions. 4) At least the numerical value can be calculated without error Messages: NIntegrate[g] = 0.158253 – Dr. Wolfgang Hintze Oct 31 '14 at 22:26

Let's see how far we can get in expressing the double integral in terms of closed form expressions, hereby pursuing the path I indicated in my comment.

The Integrand is

f = ((1 - x - y + x y + x Log[x] - x y Log[x] + y Log[y] - x y Log[y] + x y Log[x] Log[y]) Log[1 + x y])/((1 - x) x (1 - y) y Log[x] Log[y])


and the integral in question is

fi = Integrate[f, {x, 0, 1}, {y, 0, 1}]


For orientation, the numerical value is

NIntegrate[f, {x, 0, 1}, {y, 0, 1}]


During evaluation of In[11]:= NIntegrate::slwcon: Numerical integration converging too slowly; suspect one of the following: singularity, value of the integration is 0, highly oscillatory integrand, or WorkingPrecision too small. >>

(* Out[11]= 0.158253 *)


On changing integration variables

{x -> Exp[-u], y -> Exp[-v]}


the integration limits and the integrand become, respectively

{u, 0, \[Infinity]}, {v, 0, \[Infinity]}

ff = (1/u - 1/(E^u - 1)) (1/v - 1/(E^v - 1)) Log[1 + E^(-u - v)]


NIntegrate[ff, {u, 0, \[Infinity]}, {v, 0, \[Infinity]}]

0.158253


Now expanding the Log in ff in a power series, the integrand becomes a infinite sum over k of the term

(-1)^(k+1)/k (-(1/(-1 + E^u)) + 1/u) (-(1/(-1 + E^v)) + 1/v) E^(-k u -k v)


This expression factorizes in the form h[u]*h[v] so that, exchanging summation and integration, our integral fi can be expressed as

fi = Sum[(-1)^(k + 1)/k g[k]^2, {k, 1, \[Infinity]}]


where

g[k_] := Integrate[(-(1/(-1 + E^u)) + 1/u) E^(-k u), {u, 0, \[Infinity]}]


We will show "by experiment" that MMA can do this integral to give

g[k] = HarmonicNumber[k] - EulerGamma - Log[k]


Indeed,

Table[g[k], {k, 1, 5}]

(* {1 - EulerGamma, 3/2 - EulerGamma - Log[2],
11/6 - EulerGamma - Log[3], 25/12 - EulerGamma - Log[4],
137/60 - EulerGamma - Log[5]} *)


and the fractions can easily identified to be the HarmonicNumber[k].

Hence we have our final result

$fi = \sum _{k=1}^{\infty } \frac{(-1)^{1+k} (-\text{EulerGamma}+\text{HarmonicNumber}[k]-\text{Log}[k])^2}{k}$

The numerical check is ok:

NSum[(-1)^(k + 1)/k g[k]^2, {k, 1, \[Infinity]}]

(* 0.158253 *)


Remark: the sum is fairly rapidly converging and, as the sum is alternating, the accuracy of a partial sum can be estimated by the last term.

I doubt that further reduction to closed expression would be possible.

EDIT 03.11.2014 My doubt was not completely justified. We can in fact go a little bit further.

In fact, expanding the square of g[k], and taking separate sums Mathematica obtains

fi1 = s3 - 2 s5 - EulerGamma^2 Log[2] + Log[2]^3/3 +
EulerGamma (-(\[Pi]^2/6) + Log[2]^2) - Log[4] StieltjesGamma[1]


where only the two sums

$s3 = \sum _{k=1}^{\infty } \frac{(-1)^{1+k} \text{HarmonicNumber}[k]^2}{k}$

$s5 = \sum _{k=1}^{\infty } \frac{(-1)^{1+k} \text{HarmonicNumber}[k] \text{Log}[k]}{k}$

remain unevaluated.

Their numerical values are

s3n = NSum[((-1)^(1 + k) HarmonicNumber[k]^2)/k, {k, 1, \[Infinity]}]

(* Out[164]= 0.44246 *)

s5n = NSum[((-1)^(1 + k) HarmonicNumber[k] Log[k])/k, {k, 1, \[Infinity]}]

(* Out[165]= -0.203469 *)


The well known numerical values of fi is then recovered

fin = N[s3n - 2 s5n - EulerGamma^2 Log[2] + Log[2]^3/3 +
EulerGamma (-(\[Pi]^2/6) + Log[2]^2) - Log[4] StieltjesGamma[1]]

(* Out[166]= 0.158253 *)


Although Eric Weisstein and Jonathan Sondow provide an impressive lot of formulas in http://mathworld.wolfram.com/HarmonicNumber.html I have not found s3 and s5. Also, the numerical values of s3, s5 and fi are not in http://oeis.org/

Regards, Wolfgang