Let $\{\}$ denote the fractional part function, does the following double integral have a closed-form ? $$\int_{0}^{1}\int_{0}^{1}\bigg\{\frac{1}{\,x}\bigg\}\bigg\{\frac{1}{x\,y}\bigg\}dx\,dy\,$$

  • 4
    $\begingroup$ What diabolical human told you to do this. $\endgroup$ – Don Thousand Aug 11 '18 at 19:58
  • $\begingroup$ I removed irrelevant comments. $\{w\}\in[0,1)$ so the given integral is blatantly convergent. $\endgroup$ – Jack D'Aurizio Aug 11 '18 at 21:51
  • $\begingroup$ @Rushab Mehta A meta remark: Isn't this problem exactly of the type which is normally rejected by the moderators (no context, no own effort)? In my opinion a rejection would be a deplorable decision. I have upvoted the problem which I find very interesting. $\endgroup$ – Dr. Wolfgang Hintze Aug 12 '18 at 4:24
  • $\begingroup$ @Dr.WolfgangHintze I'm no expert honestly. You'd be better off asking someone more experienced. $\endgroup$ – Don Thousand Aug 12 '18 at 19:12
  • 1
    $\begingroup$ @ Kays Tomy You might be interested that I have solved your problem completely in my new answer. Anyway, thank you for posting this interesting problem which gave me a lot of fun and many new insights. $\endgroup$ – Dr. Wolfgang Hintze Sep 2 '18 at 16:58

So we are looking for $$ \iint_{(1,+\infty)^2}\frac{\{x\}\{xy\}}{x^2 y^2}\,dx\,dy=\int_{1}^{+\infty}\frac{\{x\}}{x}\int_{x}^{+\infty}\frac{\{t\}}{t^2}\,dt\,dx. $$ We may recall that $\int_{1}^{+\infty}\frac{\{x\}}{x^2}\,dx =\sum_{n\geq 0}\int_{0}^{1}\frac{x\,dx}{(x+n+1)^2}=\sum_{n\geq 0}\left[\log(n+2)-\log(n+1)-\frac{1}{n+2}\right]$ equals $1-\gamma$ and $$\{t\}=\frac{1}{2}-\sum_{n\geq 1}\frac{\sin(2\pi n t)}{\pi n},\qquad \frac{\{x\}}{x}=\frac{1}{2x}-\sum_{m\geq 1}\frac{\sin(2\pi m x)}{\pi m x} $$ hold almost everywhere, such that $$ \int_{x}^{+\infty}\frac{\{t\}}{t^2}\,dt = \frac{1}{2x}-\sum_{n\geq 1}\frac{\sin(2\pi n x)-2\pi n x\,\text{Ci}(2\pi n x)}{\pi n x} $$ and our integral equals

$$ \frac{1}{4}-\int_{1}^{+\infty}\frac{1}{2x}\sum_{m\geq 1}\frac{\sin(2\pi m x)}{\pi m x}\,dx-\int_{1}^{+\infty}\frac{1}{2x}\sum_{n\geq 1}\frac{\sin(2\pi n x)-2\pi n x\,\text{Ci}(2\pi n x)}{\pi n x}\,dx $$ plus $$ \int_{1}^{+\infty}\sum_{m\geq 1}\sum_{n\geq 1}\frac{\sin(2\pi m x)}{\pi m x}\cdot\frac{\sin(2\pi n x)-2\pi n x\,\text{Ci}(2\pi n x)}{\pi n x}\,dx. $$ After some simplification we get

$$ \frac{1}{4}+\overbrace{2\sum_{m\geq 1}\text{Ci}(2m\pi)}^{\frac{1}{2}-\gamma}+\sum_{n\geq 1}\int_{1}^{+\infty}\text{Ci}(2\pi n x)\frac{dx}{x}+\sum_{m,n\geq 1}\frac{\pi\min(m,n)+(m-n)\text{Si}(2\pi(m-n))-(m+n)\text{Si}(2\pi(m+n))}{\pi mn}-2\sum_{m,n\geq 1}\int_{1}^{+\infty}\frac{\sin(2\pi m x)}{\pi m x}\text{Ci}(2\pi n x)\,dx $$ and probably these pieces can be further simplified by recalling that the Laplace transform of $\text{Ci}$ (the cosine integral) is essentially a logarithm and the Laplace transform of $\text{sinc}$ is essentially an arctangent. Anyway, just in its current state the previous representation allows to find arbitrarily accurate approximations of the wanted integral, since the behaviour of $\text{Ci}$ and $\text{sinc}$ over $(1,+\infty)$ is extremely regular.

A simple and non-trivial upper bound can be derived from the Cauchy-Schwarz inequality. We have $$ \int_{0}^{1}\left\{\frac{1}{x}\right\}^2\,dx = \int_{1}^{+\infty}\frac{\{x\}^2}{x^2}\,dx = -1-\gamma+\log(2\pi),$$

$$ \int_{0}^{1}\int_{0}^{1}\left\{\frac{1}{xy}\right\}^2\,dx\,dy = \int_{1}^{+\infty}\int_{1}^{+\infty}\frac{\{xy\}}{x^2 y^2}\,dx \,dy=\\=1-\gamma+2\sum_{n\geq 1}\int_{1}^{+\infty}\frac{\sin(2\pi n x)}{2\pi n}\cdot\frac{1-\log x}{x^2}\,dx=\\ =1-\gamma+\int_{1}^{+\infty}(1-2\{x\})\frac{1-\log x}{x^2}\,dx\leq \frac{1}{2}$$ hence $$ \int_{0}^{1}\int_{0}^{1}\left\{\frac{1}{x}\right\}\left\{\frac{1}{xy}\right\}\,dx\,dy \leq \sqrt{\frac{\log(2\pi)-\gamma-1}{2}}<\frac{13}{36}. $$

| cite | improve this answer | |
  • $\begingroup$ Irrelevant side-note: by applying piecewise the Hermite-Hadamard inequality for the computation of $\int_{0}^{1}\left\{\frac{1}{x}\right\}^2\,dx$ it follows that $\log(2\pi)<\frac{4}{3}+\gamma$. This is not very sharp but the technique is interesting and maybe it can be substantially improved. $\endgroup$ – Jack D'Aurizio Aug 11 '18 at 22:55
  • $\begingroup$ @ Jack D'Aurizio Nice development. What is the numerical result you find for the integral of the OP from your formula? $\endgroup$ – Dr. Wolfgang Hintze Aug 14 '18 at 11:41
  • $\begingroup$ @ Jack D'Aurizio Your result contains a double series which is more complicated than the single series of my solution. Can I expect a comment from your side? $\endgroup$ – Dr. Wolfgang Hintze Aug 14 '18 at 22:26

Upper bound on the above double integral

As we have $\forall (x,y)\in (0;1)^2, 0\leq \{1/{x\,y}\} <1$ then it follows the accompanied inequality :

$$\int_{0}^{1}\int_{0}^{1}\bigg\{\frac{1}{x}\bigg\}\bigg\{\frac{1}{x\,y}\bigg\}dx\,dy\,< \int_{0}^{1}\int_{0}^{1}\bigg\{\frac{1}{x}\bigg\}dx\,dy\ =1-\gamma$$ where $\gamma$ represents the Euler-Mascheroni constant.

| cite | improve this answer | |
  • $\begingroup$ This upper bound can be largely improved via Cauchy-Schwarz, please see above/below. $\endgroup$ – Jack D'Aurizio Aug 11 '18 at 22:29
  • $\begingroup$ @JackD'Aurizio Yeah for sure, I just was proving for one user that the above integral is convergent yet one might find a much sharpner upper bound using Cauchy-Schwarz inequality and since we know already the closed form of $\int_{0}^{1}\int_{0}^{1}\{1/{x\,y}\}^2 dx\,dy $ $\endgroup$ – Kays Tomy Aug 11 '18 at 22:44

One possible approach is to write

$$ I := \int_{0}^{1}\int_{0}^{1}\left\{\frac{1}{x}\right\}\left\{\frac{1}{xy}\right\}\,dxdy = \left(\frac{1}{2} - \gamma\right)\log(2\pi) - \gamma_1 - 2 + C_1 - \frac{C_2}{2}, $$

where $\gamma_1$ is the Stieltjes constant and

\begin{align*} C_1 &:= \lim_{N\to\infty} \bigg[ \sum_{n=1}^{N} \frac{\log(n!)}{n} - \left( N\log N - 2N + \frac{1}{4}\log^2 N + \frac{1+\log(2\pi)}{2}\log N \right) \bigg], \\ C_2 &:= \lim_{N\to\infty} \bigg[ \sum_{n=1}^{N} \log^2 n - \left( N \log^2 N - 2N \log N + 2N + \frac{1+\gamma}{2}\log^2 N \right) \bigg]. \end{align*}

I would be surprised if these constants are expressed in closed forms, much like Stieltjes constants are not known to be so.

Derivation of the above formula is not hard. Indeed, we can begin from

$$ I = \int_{1}^{\infty} \frac{\{x\}}{x} \left( \int_{x}^{\infty} \frac{\{y\}}{y^2} \, dy \right) \, dx. $$

Plugging the identity $\int_{x}^{\infty} \frac{\{y\}}{y^2} \, dy = H_{\lfloor x\rfloor} - \log x - \gamma + \frac{\{x\}}{x}$ and evaluating the integral term-by-term,

\begin{align*} \int_{1}^{N+1} \frac{\{x\}}{x} H_{\lfloor x \rfloor} \, dx &= \sum_{n=1}^{N} H_n \left( 1 - n ( \log(n+1) - \log n) \right), \\ -\int_{1}^{N+1} \frac{\{x\}}{x} \log x \, dx &= N - (N+1)\log(N+1) + \frac{1}{2}N\log^2(N+1) - \frac{1}{2} \sum_{n=1}^{N} \log^2 n, \\ -\gamma \int_{1}^{N+1} \frac{\{x\}}{x} \, dx &= \gamma \left(-N + N\log(N+1) - \log (N!) \right), \\ \int_{1}^{\infty} \left( \frac{\{x\}}{x} \right)^2 \, dx &= -1 - \gamma + \log(2\pi) \end{align*}

and a bit of algebra together with Stirling's formula for $\log (N!)$ gives the desired identity above.

| cite | improve this answer | |
  • $\begingroup$ @ Sangchul Lee Interesating. But I find that one new constant is sufficient. See my 2nd answer here. $\endgroup$ – Dr. Wolfgang Hintze Sep 2 '18 at 14:21

EDIT 24.08.18

I have calculated the closed form expression for the sum over $w_{1}$.

It is given by

$$sw1_{c}=-\kappa_{a} +\kappa_{b} -\frac{\pi ^2}{48}-1+\frac{1}{4} \left(\gamma ^2-\log ^2(2 \pi )\right)-2 (\gamma -\log (2 \pi ))\\\simeq 0.0393327238...$$

Here two new (?) constants appear

$$\kappa_{a} =-\sum _{m=2}^{\infty } (-1)^m \zeta '(m) = 0.7885305659...$$


$$\kappa_{b} =-\sum _{m=2}^{\infty } \frac{(-1)^m \zeta '(m)}{m+1}= 0.2733107919...$$

The index shows the basic sum $\sigma_{x}$ where the constant originates.

$\kappa_{b}$ was introduced previously as $\kappa$ in skbmoore's very enlightning partial answer to Asymptotic behaviour of sums involving $k$, $\log(k)$ and $H_{k}$.

EDIT 23.08.18

I have added the paragraph "Reduction to basic sums". Here the partial sums which represent the original integral in the limit are reduced to essentially three basic sums. The knowledge of their asymptotic behaviour would give us the closed form.

Work in progress.

Original post (13.08.18): Result

The (double) integral to be calculated is

$$w = \int_{x=0}^1 \int_{y=0}^1 \{\frac{1}{x}\}\{\frac{1}{x y}\} dxdy\tag{1}$$

My result is given as an infinite sum

$$w = \sum_{k=1}^\infty w_{0}(k)$$

with the summand $w_{0}(k) = w_{1}(k) + w_{2}(k)$ where

$$w_{1}(k)=\frac{3 k+1}{k+1}-\frac{1}{2} k \log ^2\left(1+\frac{1}{k}\right)-\frac{k (3 k+2)}{k+1} \log \left(1+\frac{1}{k}\right)$$


$$w_{2}(k) = \left(1-k \log \left(1+\frac{1}{k}\right)\right) \left(H_{k+1}-\log (k+1)-\gamma \right)$$

The numerical value of $w$ caculated by Mathematica with $10^7$ terms is

$$w_{N,10^7} = 0.212445804$$

Notice that this result is appreciably smaller than the estimates of the upper bound previously provided by others.

The asymptotic behaviour for large $k$ is

$$w_{1}(k \to \infty) = \frac{1}{8 k^3}-\frac{4}{15 k^4}+ O(\frac{1}{k^5})$$


$$w_{2}(k \to \infty) = \frac{1}{4 k^2} -\frac{11}{24 k^3}+\frac{47}{72 k^4}+ O(\frac{1}{k^5})$$

Which shows that the the sums over both $w_{1}(k)$ and $w_{2}(k)$ are convergent sepratetly.


I carried out the steps indicated in my original post. In contrast to Jack D'Aurizio I did not use the Fourier expansion of the fractionl part but just dealt with integrals and sums.

Transforming the integration variables $x=1/r$, $y=r/s$ in $(1)$ gives

$$w=\int_{r=1}^\infty \int_{s=r}^\infty \frac{1}{r s^2}\{r\}\{s\} drds\tag{2}$$

This decouples the formation of the fractional part.

Next the double integral will be replaced by a double sum letting $r=k+\xi$, $s=m+\eta$. Here $k$ and $m$ are the integer parts, and $\xi$ and $\eta$ are the fractional parts, resp.

Then the s-integral becomes

$$i_{s}=\int_{s=r}^\infty \frac{1}{s^2}\{s\} ds = i_{s1}+ i_{s2}$$


$$i_{s1} =\int_{0}^{1-\xi}\frac{\xi+\eta}{(k+\xi+\eta)^2} d\eta\\=\frac{k}{k+1}-\frac{k}{k+\xi }+\log \left(\frac{k+1}{k+\xi }\right)\tag{3}$$


$$i_{s2}=\sum_{m=k+1}^\infty \int_{0}^{1}\frac{\eta}{(m+\eta)^2} d\eta=\sum_{m=k+1}^\infty \log(\frac{m+1}{m})-\frac{1}{m+1}\\= H_{k+1}-\gamma -\log(k+1)$$

Here $H_{n}=1+1/2+1/3+...+1/n$ is the harmonic number. The evaluation of the sum in $i_{s2}$ is left as an exercise to the reader.

The two terms result from splitting the integral as follows

$$\int_{s=r}^\infty . ds = \int_{s=k+\xi}^\infty . ds= \int_{s=k+\xi}^{k+1} . ds +\int_{s=k+1}^\infty . ds $$

Finally we turn to the r-integral

$$w=\int_{r=1}^\infty \frac{1}{r}\{r\} i_{s}dr= \sum_{k\ge 1} \int_{\xi = 0}^1 \frac{\xi}{k+\xi}(i_{s1}+i_{s2})d\xi=i_{r1}+i_{r2}$$

The $\xi$ integrals are elementary

$$i_{r1}=\int_{\xi = 0}^1 \frac{\xi}{k+\xi}\left(\frac{k}{k+1}-\frac{k}{k+\xi }+\log \left(\frac{k+1}{k+\xi }\right)\right)d\xi = w_{1}$$

$$i_{r2}=\int_{\xi = 0}^1 \frac{\xi}{k+\xi} i_{s2}d\xi= i_{s2} (1-k \log(1+\frac{1}{k}))$$

Identifying $i_{r1}$ with $w_{1}$ and $i_{r2}$ with $w_{2}$, resp., completes the drivation.

Reduction to "basic" sums

In order to find possible closed expressions for both $w_{1}$ and $w_{2}$ we reduce the sums to basic sums.

If not stated otherwise we consider partial sums with $m$ being the upper summation index. The infinite sums are then found by applying the limit $m\to\infty$ which is most properly done uwing the asymptotic expressions.

Define the basic sums

$$\sigma_{a}(m) = \sum_{k=1}^m \frac{\log(k)}{k+1}$$

$$\sigma_{b}(m) = \sum_{k=1}^m k \log(k+1)\log(k)$$

$$\sigma_{c}(m) = \sum_{k=1}^m H_{k}\log(k)$$

and the auxiliary sums

$$\eta_{1}(m) = \sum_{k=1}^m k \log(k)^2$$ $$\eta_{2}(m) = \sum_{k=1}^m \log(k)^2$$ $$\eta_{4}(m) = \sum_{k=1}^m \frac{\log(k)}{k}$$

The auxiliary sums are "easy" as they can be expressed by known functions.

$$\eta_{1}(m) =\zeta ''(-1)-\zeta ^{(2,0)}(-1,m+1)$$

$$\eta_{2}(m)=-\zeta ^{(2,0)}(0,m+1)+\gamma _1+\frac{\gamma ^2}{2}-\frac{\pi ^2}{24}-\frac{1}{2} (\log (2\pi))^2$$

$$\eta_{4}(m) =\gamma _1-\gamma _{1}(m+1)$$

Here $\zeta(s,a) = \sum_{k=0}^\infty (k+a)^{-s}$ is the generalized Riemann zeta function. The derivatives are taken with respect to the first argument. And $\gamma _{1}(m+1)$ is the generalized Stieltjes constant.

Then the sum over $w_{1}$ can be written as

$$s_1(m):=\sum_{k=1}^m w_{1}\\=3 \log ((m+1)!)-2 H_{m+1}-\frac{1}{2} \eta_{1}(m+1)+\eta_{1}(m))+\frac{1}{2} \eta_{2}(m+1)-\sigma_{4}(m+1)+\sigma_{a}(m)+\sigma_{b}(m)+3 m-(3 m+2) \log (m+1)+2$$

The sum over $w_{2}$ is given by

$$s_2(m):=\sum_{k=1}^m w_{2}\\=-\gamma (\log ((m+1)!)+m-(m+1) \log (m+1))+(m+2) \left(H_{m+1}-1\right)-(m+1) H_{m+1} \log (m+1)+\eta_{1}(m+1)-\eta_{2}(m+1)-\sigma_{a}(m)-\sigma_{b}(m)+\sigma_{c}(m+1)-\log (m+1)$$

I have asked for help with the asyptotic behaviour of the basic sums here Asymptotic behaviour of sums involving $k$, $\log(k)$ and $H_{k}$. The first answer is already very promising and a new constant has appeared.

| cite | improve this answer | |


It was a long and interesting journey at the end of which I have found that the integral in question indeed has a closed form

$$i = \int _0^1\int _0^1\{\frac{1}{x}\} \{\frac{1}{x y}\}\,dydx \\= \text{$\kappa $c}+\frac{\gamma ^2}{4}-\frac{3}{2}-\frac{\pi ^2}{48}-\frac{1}{4} \log ^2(2 \pi )+\frac{3}{2} \log (2 \pi )\tag{1}$$

Here $\kappa_{c}$ is a new constant. If it is really new or is expressible through known constants is an open question.

$\kappa_{c}$ appears in the asymptotic expression of the sum

$$\sigma_{c}(n) = \sum_{k=1}^n H_{k} \log(k)$$

to which I devoted a separate question [1]. In the self answer to [1] I have found that the asymptotic expression can be written as

$$\sigma_{c}(n) = \kappa_{c}+\sigma_{c,a}(n)+O(\log(n)/n^6)\tag{2}$$


$$\sigma_{c,a}(n) =-\frac{\gamma }{360 n^3}+\frac{1}{2160 n^3}+\frac{\log (n)}{180 n^3}+\frac{1}{24 n^2}-\frac{\log (n)}{12 n^2}-\gamma n+2 n+\frac{\gamma }{12 n}+\frac{1}{12 n}+n \log ^2(n)+\frac{3 \log ^2(n)}{4}+\gamma n \log (n)\\-2 n \log (n)+\frac{\log (n)}{2 n}+\frac{1}{2} \gamma \log (n)+\frac{\gamma ^2}{4}-\frac{3}{2}-\frac{\pi ^2}{48}-\frac{1}{4} \log ^2(2 \pi )+\frac{3}{2} \log (2 \pi )\tag{3} $$

There are at least two equivalent ways to define $\kappa_{c}$

(a) as a limit (b) as a formal (divergent) series

Case (a) limit

From (B) we deduce that $\kappa_{c}$ can be found as a Limit of the exact sum minus the asyptotic expression of that sum without the constant:

$$\kappa_{c} = \lim_{n\to\infty} \big(\sigma_{c}(n) - \sigma_{c,a}(n)\big)\tag{4}$$

Although this formula is not very useful to find an analytic expression it can easily be used to find the numerical value

$$\kappa_{c,lim}= -0.077595902214757...$$

This gives for $i$

$$N(i_{s}) = 0.2124493921868... $$

Which compares reasonably with the value Mathematica calculates (with NIntegrate) directly numerically

$$N(i_{int}) = \int _0^1\int _0^1\{\frac{1}{x}\} \{\frac{1}{x y}\}\,dydx = 0.2124766752133 ... $$

Case (b) formal (divergent) series

In [1] I have calculated the formal expression (formula (9))

$$\kappa_{c} {\dot=} \sum_{k=1}^\infty \frac{B(2k)}{2k} \zeta'(2k)\tag{9}$$

The dot indicates that the r.h.s. is a divergent series. This series has afterwards been ingeniously given a valid meaning by skbmoore in an answer to [1] who found the following analytic expression in the form of double integral

$$\kappa_{c,i}=\int_0^\infty \frac{dt/t}{e^t-1}\Big(\, \log{t}\big(\frac{t}{e^t-1}-1+t/2\big) - \Psi(t)\Big) = -0.077596...\tag{9a}$$


$$\Psi(t)=-\int_0^t \frac{\log{(1-u/t)}}{e^u-1}\Big(1-\frac{u\,e^u}{e^u-1}\Big)\,du- \gamma\Big(\frac{t}{e^t-1} - 1\Big)+ \big(1-\frac{\gamma}{2}\big)t + \log{\big(\frac{t}{e^t-1}\big) }\tag{9b}$$


As shown in my first answer here the integral can be reduced to the $\lim_{n\to\infty}$ of this partial sum

$$i_{s}(n) = \sum_{k=1}^n w(k) $$


$$w(k) = w_{1}(k) + w_2(k)$$


$$ w_{1}(k) =\frac{3 k+1}{k+1}-\frac{1}{2} k \log ^2\left(\frac{1}{k}+1\right)-\frac{k (3 k+2) \log \left(\frac{1}{k}+1\right)}{k+1}\tag{10a}$$

$$ w_{2}(k) = \left(1-k \log \left(\frac{1}{k}+1\right)\right) \left(H_{k+1}-\log (k+1)-\gamma \right)\tag{10b}$$

It was then shown that $i_{s}(n)$ can be simplified to

$$i_{s}(n) = 3 \log ((n+1)!)-\gamma (\log ((n+1)!)+n-(n+1) \log (n+1))+(n+2) \left(H_{n+1}-1\right)-2 H_{n+1}-(n+1) H_{n+1} \log (n+1)+\left(\frac{1}{2} (-\eta_{1}(n)-\eta_{1}(n+1))+\eta_{1}(n+1)-\frac{1}{2} \eta_{2}(n+1)-\eta_{4}(n+1)+\sigma_{c}(n+1)\right)+3 n-(3 n+2) \log (n+1)-\log (n+1)+2\tag{11}$$

This sum consists of known functions of $n$ and the "basic sums"

$$\eta_{1}(n) = \sum _{k=1}^n k \log ^2(k)$$ $$\eta_{2}(n) = \sum _{k=1}^n \log ^2(k)$$ $$\eta_{4}(n) = \sum _{k=1}^n \frac{\log (k)}{k}$$ $$\sigma_{c}(n) =\sum _{k=1}^n H_k \log (k) $$

(Originally I had split the complete expression into the two separate parts $w_{1}$ and $w_{2}$. This, however, made things more complicated than necessary introducing two other "basic sums" $\sigma_{a,b}$ which exactly cancel out in the complete expression).

In order to calculate the limit of the partial sum $i_{s}(n)$ we need to determine the asymptotic behaviour of the basic sums. This task was sourced out to a separate question [1] and was solved there.

By far the most complicated (and interesting) sum is $\sigma_{c}(n)$.


The contribution of user skbmoore, both methodically and in detail, is greatly acknowledged.


[1] Asymptotic behaviour of sums involving $k$, $\log(k)$ and $H_{k}$

| cite | improve this answer | |
  • $\begingroup$ @ Dr. Wolfgang Hintze, good job you have achived, thanks ! $\endgroup$ – Kays Tomy Sep 2 '18 at 19:21

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

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