8

I need help computing the value of the following definite improper integral: $$\int_0^\infty \frac{x dx}{(1+x^2)(1+e^{\pi x})}=\text{?}$$ Here are my thoughts and attempts:

  • I tried using the Laplace Transform identity for definite integrals, with no luck (since I can only compute the Laplace Transform of $\frac{1}{e^{\pi x}+1}$ in terms of the digamma function... yuck)
  • I can't use the residue theorem, since the integral is from $0$ to $\infty$ and the integrand is not an even function
  • I would like to expand $\frac{x}{1+x^2}=\frac{1/x}{1-(-1/x^2)}$ as a geometric series, but it wouldn't always converge since $x$ goes from $0$ to $\infty$

CONTEXT: The integral came up in Jack D'Aurizio's answer to this question.

Any ideas?

Franklin Pezzuti Dyer
  • 39,754
  • 9
  • 73
  • 166
  • 1
    Did you try integration by parts, like he suggests.. – mathworker21 Mar 15 '18 at 23:21
  • @mathworker21 Haha yes, of course, but to no avail. It gives me the integral $$\frac{\pi}{2}\int_0^\infty \frac{e^{\pi x}\ln(x^2+1)}{(e^{\pi x}+1)^2}dx$$ ... which seems even nastier than the original problem. IBP with the opposite $u$ and $v$ also fails to produce anything simpler. – Franklin Pezzuti Dyer Mar 15 '18 at 23:23
  • Just to clarify, we expect it to be $\frac{\ln(2)-\gamma}{2}$, right? – mathworker21 Mar 15 '18 at 23:28
  • @Winther As already explained, expanding $\frac{1}{1+x^2}$ can't really be done w/o splitting up my integral, since the geometric series doesn't converge on $(0,\infty)$. Also, I'd prefer not to expand $\frac{1}{e^{\pi x}(1+e^{-\pi x})}$, because, as indicated by the link in my question, I'm actually trying to use this integral to calculate the value of the series that would result, so expansion would just be circular. – Franklin Pezzuti Dyer Mar 15 '18 at 23:28
  • Yes you are right – Winther Mar 15 '18 at 23:29
  • Did you try replacing infinity with t, to make it look cleaner, and rearrange it in such a form, where you can easily take a limit with $x\to\infty$? – KKZiomek Mar 15 '18 at 23:29
  • @KKZiomek I can't see that helping unless I can calculate an antiderivative (which isn't gonna happen). – Franklin Pezzuti Dyer Mar 15 '18 at 23:31
  • What do you mean it isn't a function? – Thomas Andrews Mar 15 '18 at 23:40
  • I keep trying to use contour integration, even though the integrand is not even. Something like the contour in the link below with say $\theta = \frac{\pi}{4}$... The nice thing is that residues of the poles at 3,5,7,... cancel with those at -3,-5,-7,...

    .

    https://gyazo.com/dabf723c8b16344f194a9d10caa3e77b

    – mathworker21 Mar 16 '18 at 00:02
  • You have that if $h$ is an odd function and $$f(x)=\frac{h(x)}{1+e^{ax}}$$ then

    $$f(-x)=\frac{-h(x)}{1+e^{-ax}}=-e^{ax}f(x)$$

    Or, if $g(x)=f(x)e^{ax/2}$ then $g$ is odd.

    We also have $$f(x)-f(-x)=h(x).$$

    Not sure how that helps.

    – Thomas Andrews Mar 16 '18 at 00:34
  • @mathworker21 Can you perhaps more easily estimate $$\int_{-T}^{T}\frac {x(1-e^{ax})}{(1+x^2)(1+e^{ax})},dx?$$ – Thomas Andrews Mar 16 '18 at 04:10
  • This might be a stupid question, but how can Wolfram Alpha calculate the exact value? Might this give us a clue how we can evaluate it? – mathworker21 Mar 16 '18 at 04:25
  • I think I know how to do it. Let $I(a) = \int_0^\infty \frac{x}{x^2+1}\frac{1}{1+e^{a\pi x}}dx$. I claim $I(a) = \psi(a)+\frac{1}{2}[\log(\frac{1}{2a})-\psi(\frac{a}{2})]$ where $\psi(a) = \frac{\Gamma'}{\Gamma}(a)$. The idea is to integrate both sides from $A$ to $B$ for some positive reals $A,B$. If we can show that the integrals coincide for all $A,B$, we're done. This amounts to showing that $$\int_0^\infty \frac{1}{\pi}\frac{1}{1+x^2}\ln(1+e^{-A \pi x})dx = -\ln \Gamma(A)+\frac{1}{2}\ln \Gamma(\frac{A}{2}) + \frac{1}{2}A\log A + (\frac{\log 2 - 1}{2})A$$ – mathworker21 Mar 16 '18 at 05:04
  • And since this just involves the (log of the) Gamma function, it should be easy. Someone experienced with the Gamma function should be able to finish it up... I'm trying to – mathworker21 Mar 16 '18 at 05:17

4 Answers4

10

We use the formula (valid for $\Re (z) > 0$): $$\psi(z) = \ln z - \frac{1}{2z} - 2 \int_0^\infty \frac{x}{(x^2+1)(e^{2\pi xz}-1)} dx$$ which $\psi(z)$ is the digamma function, this follows from differentiating Binet's second formula.

Since $$\int_0^\infty \frac{x dx}{(1+x^2)(1+e^{\pi x})} = \int_0^\infty \frac{x dx}{(1+x^2)(e^{\pi x}-1)} - 2\int_0^\infty \frac{x dx}{(1+x^2)(e^{2\pi x}-1)}$$

applying the formula gives the result: $$\int_0^\infty \frac{x dx}{(1+x^2)(1+e^{\pi x})} = \frac{\ln 2 - \gamma}{2}$$

pisco
  • 18,983
  • (+1) I agree that differentiating Binet's second $\log\Gamma$ formula is a slick idea, this probably is an underestimated trick. – Jack D'Aurizio Apr 04 '18 at 03:50
2

You were on a promising track. By the Laplace transform

$$ A_k=\int_{0}^{+\infty}\frac{x}{1+x^2}e^{-\pi k x}\,dx =(-1)^k\int_{k\pi}^{+\infty}\frac{\cos x}{x}\,dx=(-1)^k\int_{k}^{+\infty}\frac{\cos(\pi x)}{x}\,dx\tag{1}$$ hence $$ \int_{0}^{+\infty}\frac{x\,dx}{(1+x^2)(e^{\pi x}+1)}=\sum_{k\geq 1}(-1)^{k+1}A_k=-\sum_{k\geq 1}\int_{k}^{+\infty}\frac{\cos(\pi x)}{x}\,dx \\=-\frac{1}{\pi}\int_{1}^{+\infty}\frac{\lfloor x\rfloor \sin(\pi x) }{x}\,dx\tag{2}$$ and the claim follows by exploiting the Fourier sine series of $\lfloor x\rfloor-\frac{1}{2}$, Dirichlet's integral $\int_{0}^{+\infty}\frac{\sin(mx)}{x}\,dx=\frac{\pi}{2}$, its generalization $\int_{0}^{+\infty}\frac{\sin(\pi x)\sin(\pi m x)}{x}\,dx =\frac{1}{2}\log\frac{m+1}{m-1}$ granted by the complex version of Frullani's theorem, the series definition of $\gamma$.

Jack D'Aurizio
  • 353,855
1

Using Fourier sine transform and generalized method:

$$\color{Blue}{\int_0^{\infty } \frac{x}{\left(1+x^2\right) (1+\exp (\pi x))} \, dx}=\\\int_0^{\infty } \text{FourierSinTransform}\left[\frac{x}{1+x^2},x,s\right] \text{FourierSinTransform}\left[\frac{1}{1+\exp (\pi x)},x,s\right] \, ds=\\\int_0^{\infty } \left(\frac{e^{-s}}{2 s}-\frac{1}{2} e^{-s} \text{csch}(s)\right) \, ds=\color{blue}{\\\frac{1}{2} (-\gamma +\ln (2))}$$

1

$\newcommand{\bbx}[1]{\,\bbox[15px,border:1px groove navy]{\displaystyle{#1}}\,} \newcommand{\braces}[1]{\left\lbrace\,{#1}\,\right\rbrace} \newcommand{\bracks}[1]{\left\lbrack\,{#1}\,\right\rbrack} \newcommand{\dd}{\mathrm{d}} \newcommand{\ds}[1]{\displaystyle{#1}} \newcommand{\expo}[1]{\,\mathrm{e}^{#1}\,} \newcommand{\ic}{\mathrm{i}} \newcommand{\mc}[1]{\mathcal{#1}} \newcommand{\mrm}[1]{\mathrm{#1}} \newcommand{\pars}[1]{\left(\,{#1}\,\right)} \newcommand{\partiald}[3][]{\frac{\partial^{#1} #2}{\partial #3^{#1}}} \newcommand{\root}[2][]{\,\sqrt[#1]{\,{#2}\,}\,} \newcommand{\totald}[3][]{\frac{\mathrm{d}^{#1} #2}{\mathrm{d} #3^{#1}}} \newcommand{\verts}[1]{\left\vert\,{#1}\,\right\vert}$ \begin{align} &\bbox[10px,#ffd]{\ds{% \int_{0}^{\infty}{x\,\dd x \over \pars{1 + x^{2}}\pars{1 + \expo{\pi x}}}}} = \\[5mm] = &\ \int_{0}^{\infty}{x \over 1 + x^{2}} \pars{{1 \over \expo{\pi x} + 1} - {1 \over \expo{\pi x} - 1}}\dd x + \int_{0}^{\infty}{x \over 1 + x^{2}} {1 \over \expo{\pi x} - 1}\dd x \\[5mm] = &\ -2\int_{0}^{\infty}{x \over 1 + x^{2}} {1 \over \expo{2\pi x} - 1}\dd x + \int_{0}^{\infty}{x \over 1/4 + x^{2}} {1 \over \expo{2\pi x} - 1}\dd x \\[5mm] = &\ \int_{0}^{\infty}\pars{{x \over 1/4 + x^{2}} - {2x \over 1 + x^{2}}} {1 \over \expo{2\pi x} - 1}\dd x \\[5mm] = &\ -\,{1 \over 2}\bracks{-2\,\Im\int_{0}^{\infty}\pars{{2 \over 1 + x\ic} - {1 \over 1/2 + x\ic}} {1 \over \expo{2\pi x} - 1}\dd x} \end{align}

With the Abel-Plana Formula:

\begin{align} &\bbox[10px,#ffd]{\ds{% \int_{0}^{\infty}{x\,\dd x \over \pars{1 + x^{2}}\pars{1 + \expo{\pi x}}}}} = \\[5mm] = &\ -\,{1 \over 2}\,\lim_{N \to \infty}\bracks{% \sum_{k = 0}^{N}\pars{{2 \over k + 1} - {1 \over k + 1/2}} - \int_{0}^{N}\pars{{2 \over x + 1} - {1 \over x + 1/2}}\,\dd x} \label{1}\tag{1} \end{align}


Note that \begin{equation} \left\{\begin{array}{rclcl} \ds{\sum_{k = 0}^{N}{2 \over k + 1}} & \ds{=} & \ds{2\sum_{k = 0}^{\infty}\pars{{1 \over k + 1} - {1 \over k + N + 2}}} & \ds{=} & \ds{2\pars{H_{N + 1} + \gamma}} \\[1mm] \ds{\sum_{k = 0}^{N}{1 \over k + 1/2}} & \ds{=} & \ds{\sum_{k = 0}^{\infty}\pars{{1 \over k + 1/2} - {1 \over k + N + 3/2}}} & \ds{=} & \ds{H_{N + 1/2} + \gamma + 2\ln\pars{2}} \end{array}\right. \label{2}\tag{2} \end{equation} where $\ds{H_{z}}$ is a Harmonic Number, $\ds{\gamma}$ is the Euler-Mascheroni Constant and \begin{equation} \int_{0}^{N}\pars{{2 \over x + 1} - {1 \over x + 1/2}}\,\dd x = 2\ln\pars{N + 1} - \ln\pars{N + {1 \over 2}} - \ln\pars{2} \label{3}\tag{3} \end{equation}

With \eqref{1}, \eqref{2} and \eqref{3}:

$$ \bbx{\int_{0}^{\infty}{x\,\dd x \over \pars{1 + x^{2}}\pars{1 + \expo{\pi x}}} = {1 \over 2}\bracks{\ln\pars{2} - \gamma}} \approx 0.0580 $$ where we used the $\ds{H_{z}}$ asymptotic behaviour as $\ds{\verts{z} \to \infty}$.

Felix Marin
  • 89,464