Skip to content
ISEGORIABenjamin Haire

Daily Mathematics / Solutions

Solutions for 14 October 2026

Two cards went out that day: a hard definite integral and an original Putnam-style problem. Try each one first; the solutions are folded away below.

Integral

An arctangent against a Bose weight

Card: An arctangent against a Bose weight

Evaluate in closed form.

\[\int_{0}^{\infty}\frac{\arctan x}{e^{2\pi x}-1}\,dx\]
Show the solution

We show that the integral \(I\) equals \(\tfrac12-\tfrac14\ln(2\pi)\approx0.0405307\). This is the case \(z=1\) of Binet's second formula for \(\ln\Gamma(z)\); we prove everything we need from scratch.

Why the obvious route stalls. Expanding \(1/(e^{2\pi x}-1)=\sum_{k\ge1}e^{-2\pi kx}\) and integrating term by term against \(\arctan x\) gives \(\int_0^\infty e^{-2\pi kx}\arctan x\,dx=\frac{1}{2\pi k}\int_0^\infty\frac{e^{-2\pi kx}}{1+x^2}\,dx\), which is an auxiliary sine and cosine integral with no closed form, so the sum over \(k\) is hopeless as it stands. The fix is to expand \(\arctan x\) instead, so that the \(x\)-integral is taken against a sine.

Step 1: a Laplace representation of arctan. For \(x\ge0\) we have \(\int_0^\infty e^{-u}\frac{\sin xu}{u}\,du=\arctan x\): both sides vanish at \(x=0\), and the derivative of the left side is \(\int_0^\infty e^{-u}\cos xu\,du=\frac{1}{1+x^2}\).

Step 2: the sine kernel. For \(u>0\), using \(\int_0^\infty e^{-2\pi kx}\sin xu\,dx=\frac{u}{u^2+4\pi^2k^2}\), we get

\[\int_0^\infty\frac{\sin xu}{e^{2\pi x}-1}\,dx=\sum_{k\ge1}\frac{u}{u^2+4\pi^2k^2}=\frac14\coth\frac u2-\frac1{2u}\]

where the last equality is the partial fraction expansion \(\frac12\coth\frac u2=\frac1u+\sum_{k\ge1}\frac{2u}{u^2+4\pi^2k^2}\) (the expansion of \(\pi\cot\pi z\) at \(z=iu/(2\pi)\)). Termwise integration is justified because \(|\sin xu|\le xu\) and \(\sum_k\int_0^\infty xu\,e^{-2\pi kx}\,dx\lt\infty\).

Step 3: swap the integrals. The double integrand \(e^{-u}\sin(xu)/\big(u(e^{2\pi x}-1)\big)\) is bounded in absolute value by \(e^{-u}x/(e^{2\pi x}-1)\), which is integrable on \((0,\infty)^2\). By Fubini and Step 1,

\[I=\int_0^\infty\frac{e^{-u}}{u}\Big(\frac14\coth\frac u2-\frac1{2u}\Big)du=\frac12\,\varphi(1),\qquad \varphi(z)=\int_0^\infty\Big(\frac1{e^u-1}-\frac1u+\frac12\Big)\frac{e^{-zu}}{u}\,du\]

because \(\frac12\coth\frac u2=\frac1{e^u-1}+\frac12\). The bracket \(b(u)=\frac1{e^u-1}-\frac1u+\frac12\) satisfies \(0\le b(u)\le\min(u/12,\,1/2)\), so \(\varphi(z)\) converges for every \(z>0\) and \(0\le\varphi(z)\le\frac1{12z}\to0\) as \(z\to\infty\).

Step 4: a difference equation. Put \(D(z)=\varphi(z)-\varphi(z+1)=\int_0^\infty b(u)(1-e^{-u})e^{-zu}\,\frac{du}u\). Since \(b(u)(1-e^{-u})=e^{-u}-\frac{1-e^{-u}}u+\frac{1-e^{-u}}2\), differentiating under the integral sign gives

\[D'(z)=-\int_0^\infty b(u)\,(1-e^{-u})\,e^{-zu}\,du=-\frac1{z+1}+\ln\frac{z+1}z-\frac12\Big(\frac1z-\frac1{z+1}\Big)=\ln\Big(1+\frac1z\Big)-\frac{z+\frac12}{z(z+1)}\]

where we used the Frullani integral \(\int_0^\infty\frac{e^{-zu}-e^{-(z+1)u}}u\,du=\ln\frac{z+1}z\). The right side is the derivative of \(g(z)=(z+\frac12)\ln(1+\frac1z)-1\). Both \(D(z)\) and \(g(z)\) tend to \(0\) as \(z\to\infty\), so \(D=g\).

Step 5: telescoping to Stirling's constant. Hence \(\varphi(1)=\sum_{k=1}^{N}g(k)+\varphi(N+1)\) for every \(N\). A direct computation gives \(\sum_{k=1}^{N}\big[(k+\tfrac12)\ln\tfrac{k+1}k-1\big]=(N+\tfrac12)\ln(N+1)-\ln N!-N\). By Stirling's formula \(\ln N!=(N+\frac12)\ln N-N+\frac12\ln(2\pi)+o(1)\), this equals \((N+\frac12)\ln(1+\frac1N)-\frac12\ln(2\pi)+o(1)\to1-\frac12\ln(2\pi)\), while \(\varphi(N+1)\to0\). So \(\varphi(1)=1-\frac12\ln(2\pi)\) and \(I=\frac12-\frac14\ln(2\pi)\).

Check. Composite 100-node Gauss-Legendre quadrature on \([0,1]\) and on \([1,\infty)\) mapped by \(x=1+t/(1-t)\), with 40 and with 200 panels, gives \(0.04053073339766\ldots\), agreeing with \(\frac12-\frac14\ln(2\pi)\) to about \(10^{-16}\).

Answer. \(\displaystyle \frac12-\frac14\ln(2\pi)\approx0.0405307\)

Competition problem

How fast increasing triples become unavoidable

Card: How fast increasing triples become unavoidable

Choose \(X_1,X_2,X_3,\dots\) independently and uniformly at random from \([0,1]\), and let \(p_n\) be the probability that no index \(k\le n-2\) satisfies \(X_k<X_{k+1}<X_{k+2}\). Find

\[\lim_{n\to\infty}\frac{p_{n+1}}{p_n}.\]
Show the solution

The limit is \(\dfrac{3\sqrt3}{2\pi}\approx0.8269933\). In fact we find the generating function of \(p_n\) in closed form.

Why counting is awkward. The \(X_i\) are almost surely distinct and exchangeable, so \(p_n=a_n/n!\) where \(a_n\) counts permutations of \(\{1,\dots,n\}\) with no three consecutive increasing entries: \(1,1,2,5,17,70,349,\dots\). There is no simple recursion for \(a_n\) alone, because whether a new entry may be appended depends on its rank relative to the last entry and on whether the last step was a rise. The way out is to keep the actual values and work with densities.

Step 1: two densities. Call the event that no \(k\le n-2\) has \(X_k<X_{k+1}<X_{k+2}\) the good event at time \(n\). Let \(u_n(x)\) be the density of \(X_n\) on the good event intersected with \(\{n=1\text{ or }X_{n-1}>X_n\}\), and let \(v_n(x)\) be the same with \(X_{n-1}<X_n\) instead. Then \(u_1=1\), \(v_1=0\), \(p_n=\int_0^1(u_n+v_n)\), and conditioning on \(X_n\) gives

\[u_{n+1}(x)=\int_x^1\big(u_n(y)+v_n(y)\big)\,dy,\qquad v_{n+1}(x)=\int_0^x u_n(y)\,dy,\]

since a fall may follow anything, while a rise may only follow a fall or the first term.

Step 2: generating functions and an ODE. By induction \(0\le u_n,v_n\le1\), so for \(|t|<1\) the series \(U(x)=\sum_{n\ge1}u_n(x)t^n\) and \(V(x)=\sum_{n\ge1}v_n(x)t^n\) converge uniformly on \([0,1]\), and

\[U(x)=t+t\int_x^1(U+V),\qquad V(x)=t\int_0^xU.\]

Thus \(U'=-t(U+V)\), \(V'=tU\), \(V(0)=0\), \(U(1)=t\), and eliminating \(U\) gives \(V''+tV'+t^2V=0\). With \(s=\frac{\sqrt3}2t\), the solution with \(V(0)=0\) is \(V=c\,e^{-tx/2}\sin sx\), and then \(U=V'/t=c\,e^{-tx/2}\cos\big(sx+\frac\pi6\big)\). The condition \(U(1)=t\) gives \(c=t\,e^{t/2}/\cos\big(s+\frac\pi6\big)\), which is legitimate for small \(|t|\).

Step 3: the generating function of \(p_n\). Integrating \(U'=-t(U+V)\) over \([0,1]\) gives \(t\int_0^1(U+V)=U(0)-U(1)\), that is \(\sum_{n\ge1}p_nt^{n+1}=U(0)-t\). Since \(U(0)=c\cos\frac\pi6\), we obtain

\[P(t):=1+\sum_{n\ge1}p_nt^n=\frac{\sqrt3}{2}\cdot\frac{e^{t/2}}{\cos\big(\frac{\sqrt3}{2}t+\frac\pi6\big)}.\]

Its expansion \(1+t+t^2+\frac56t^3+\frac{17}{24}t^4+\cdots\) agrees with the counts above. The identity holds for small \(|t|\), and the right side is meromorphic on \(\mathbb C\), so the radius of convergence of the series is the distance from \(0\) to the nearest pole, and the coefficients are governed by the poles.

Step 4: the dominant pole. The numerator never vanishes, and the zeros of the cosine are the real points \(t_k=\frac{2}{\sqrt3}\big(\frac\pi3+k\pi\big)\), \(k\in\mathbb Z\), all simple. The nearest to the origin is \(t_0=\frac{2\pi}{3\sqrt3}\approx1.2092\), and the next nearest is \(t_{-1}=-\frac{4\pi}{3\sqrt3}=-2t_0\). Near \(t_0\) we have \(\cos\big(\frac{\sqrt3}2t+\frac\pi6\big)=\frac{\sqrt3}2(t_0-t)+O\big((t-t_0)^2\big)\), so \(P(t)-\frac{e^{t_0/2}}{t_0-t}\) is analytic on \(|t|<2t_0\) and its coefficients are \(O(\rho^{-n})\) for every \(\rho<2t_0\). Since \(\frac{1}{t_0-t}=\sum_n t_0^{-n-1}t^n\),

\[p_n=e^{t_0/2}\,t_0^{-n-1}+O(\rho^{-n})\quad\text{for every }\rho<2t_0,\]

and therefore \(p_{n+1}/p_n\to1/t_0=\dfrac{3\sqrt3}{2\pi}\).

Check. An exact rational dynamic programme over the relative rank of the last entry and the current run length reproduces \(p_n\) for all \(n\le320\). The ratio \(p_{n+1}/p_n\) agrees with \(3\sqrt3/(2\pi)\) to 16 digits from \(n=100\) on, and \(p_n\,t_0^{n+1}\) agrees with \(e^{t_0/2}\approx1.8305195\). As a side check, \(P(1)\approx7.9244\) is the expected index of the first increasing triple, and a simulation of \(4\times10^5\) sequences gave \(7.926\).

Answer. \(\dfrac{3\sqrt3}{2\pi}\approx0.8269933\)

All solutions · 日本語