Real evaluation of an improper log integral

The problem posed in M.SE concerns real methods of evaluating

$$\int_0^{\infty} dx\frac{\log(x)}{\cosh(x) \sec(x)- \tan(x)} $$

The place I started is the nifty result, proven here, that

$$\frac{\sin{x}}{\cosh{t} – \cos{x}} = 2 \sum_{k=1}^{\infty} e^{-k t} \sin{k x} $$

Of course, the integral actually looks like

$$\int_0^{\infty} dx \frac{\cos{x}}{\cosh{x} – \sin{x}} \log{x} $$

so we need to map $x \mapsto \pi/2 – x$ and we have that the integral is actually

$$2 \sum_{m=0}^{\infty} (-1)^m \int_0^{\infty} dx \, e^{-(2 m+1) x} \cos{(2 m+1) x}\, \log{x} + 2 \sum_{m=1}^{\infty} (-1)^{m+1} \int_0^{\infty} dx \, e^{-2 m x} \sin{2 m x}\, \log{x} $$

We then note that

$$-k \int_0^{\infty} dx \, e^{-(1-i) k x} \log{x} = \frac{\log (k)}{2}+\frac{\gamma }{2}+\frac{\log (2)}{4}+\frac{\pi }{8}+i \left(\frac{\log (k)}{2}+\frac{\gamma }{2}+\frac{\log (2)}{4}-\frac{\pi }{8}\right)$$

So the integral is

$$-\sum_{m=0}^{\infty} (-1)^m \frac{\log{(2 m+1)}}{2 m+1} – \sum_{m=1}^{\infty} (-1)^{m+1} \frac{\log{(2 m)}}{2 m}\\ – \left (\gamma + \frac12 \log{2} + \frac{\pi}{4} \right )\sum_{m=0}^{\infty} \frac{(-1)^m}{2 m+1} – \left (\gamma + \frac12 \log{2} – \frac{\pi}{4} \right )\sum_{m=1}^{\infty} \frac{(-1)^{m+1}}{2 m}$$

The third and fourth sums are well known. The second is less-well known, but may be shown to be

$$\frac{1}{4} \left(3 \log ^2(2)-2 \gamma \log (2)\right)$$

(See, for example, Williams & Hardy, The Red Book of Mathematical Problems, problem 71.)

The first sum, however, is less well known. It may be evaluated by considering the derivative of a generalized zeta function (or a Lerch transcendent). The result is

$$\sum_{m=0}^{\infty} (-1)^m \frac{\log{(2 m+1)}}{2 m+1} = \frac12 \log{2} \left [\psi{\left ( \frac{3}{4} \right )} - \psi{\left ( \frac{1}{4} \right )} \right ] – \frac14 \left [ \gamma_1{\left ( \frac{3}{4} \right )}-\gamma_1{\left ( \frac{1}{4} \right )}\right ]$$

where $\gamma_1(a)$ is a generalized Stieltjes constant.

Put this all together and the result agrees with a numerical evaluation performed with Mathematica ($ \approx -1.35775$).

ADDENUDUM

Apparently I forgot that I had encountered that first sum some time ago here, and the result may be expressed in simpler terms:

$$ \sum_{m=1}^{\infty} (-1)^{m} \frac{\log{(2 m+1)}}{2 m+1} = -\frac{\pi}{4} \gamma – \frac{\pi}{4} \log{\frac{\Gamma{\left ( \frac{3}{4} \right )}^4}{\pi}} $$

so we may now put this all together as follows:

$$\frac{\pi}{4} \gamma + \frac{\pi}{4} \log{\frac{\Gamma{\left ( \frac{3}{4} \right )}^4}{\pi}} – \frac{3}{4} \log^2{2} + \frac12 \gamma \log{2} – \left (\gamma + \frac12 \log{2} + \frac{\pi}{4} \right )\frac{\pi}{4} – \left (\gamma + \frac12 \log{2} – \frac{\pi}{4} \right )\frac12 \log{2}$$

or

$$\int_0^{\infty} dx \frac{\cos{x}}{\cosh{x} – \sin{x}} \log{x} = \frac{\pi}{4} \log{\frac{\Gamma{\left ( \frac{3}{4} \right )}^4}{\pi}} – \log^2{2} – \frac{\pi^2}{16}$$

ADDENDUM II

The methodology outlined above may be applied to other, similar integrals. For example, it is a simpler matter to show that

$$\int_0^{\infty} dx \frac{x \sin{x}}{\cosh{x}-\cos{x}} \log{x} = \frac{1}{6} \pi ^2 \left(-12 \log{A}+1+\frac{\log{2}}{2}+\log{\pi} \right) $$

where $A$ is Glaisher’s constant.


Generalizing an already tough integral

I did the case $p=1$ here. The generalization to higher $p$ may involve higher-order derivatives as follows: $$\begin{align}K_p &= \int_0^{\pi/2} dx \frac{x^{2 p}}{1+\cos^2{x}} = \frac1{2^{4 p-1}} \int_{-\pi}^{\pi} dy \frac{y^{2 p}}{3+\cos{y}} \end{align}$$ So define, as before, $$J(a) = \int_{-\pi}^{\pi} dy \frac{e^{i a y}}{3+\cos{y}} $$ Then $$K_p = \frac{(-1)^p}{2^{4 p-1}} \left [\frac{d^{2 p}}{da^{2 p}} J(a) \right ]_{a=0}$$ […]


Mathematica v9.0.1 states that this integral does not converge.

The problem is to evaluate the following integral: $$\int_0^{\infty} dx \frac{\log(1+x)}{\left(1+x^2\right)\,\left(1+x^3\right)}$$ This one turned out to be messy but straightforward. What did surprise is the way in which I would need to employ the residue theorem. Clearly, the integral is more amenable to real methods than a contour integration. What happens, though, is that the […]


An unusually alternating sum

Problem: evaluate the following sum… $$\sum_{k=0}^{\infty}\dfrac{(-1)^{\frac{k(k+1)}{2}}}{(2k+1)^2}$$ This is unusual because the $-1$ is raised to the $k (k+1)/2$ power, rather than the usual $k$th power. On the surface, this problem may look hopeless, but really, it is all about determining the pattern of odd and even numbers from the sequence $k (k+1)/2$, which turns out […]


Algebraically difficult integral

Well, some integrals are not all that hard to evaluate in principle. The one I am posting here should be an open and shut application of the residue theorem, using the unit circle as a contour. The form of the integrand, however, should give a little pause. It turns out that actually computing residues on […]


An integral involving a quadratic phase

This one was first posted on the site Integrals and Series and was brought to my attention on M.SE by Cody. My solution involves a contour integration, although the approach is far from trivial. Yet again, the solution boils down to finding a contour and a function to integrate over the contour. The problem involves […]


An integral that illustrates the beauty of contour integration methods

I attack many of the integrals in this blog using contour integration methods, some of which are obvious and some of which take a little more imagination. Here is one that illustrates the beauty an power of such methods as much as any other integral here. The problem is to derive the integral representation $$\sin […]


Funky triple integral

Note: There was a sign error in the original solution, which I have since fixed. Problem: Evaluate $$ \int _0 ^{\infty}\int _0 ^{\infty}\int _0 ^{\infty} \log(x)\log(y)\log(z)\cos(x^2+y^2+z^2)dzdydx$$ Solution: One way to attack this is to exploit the symmetry of the integral. Start by expanding the cosine term into individual pieces, i.e., $$\begin{align}\cos{(x^2+y^2+z^2)} &= \cos{x^2} \cos{(y^2+z^2)} – […]


An odd-looking integral of a square root of trig functions

The integral to evaluate is $$\int_0^{\pi/3} \big((\sqrt{3}\cos x-\sin x)\sin x\big)^{1/2}\cos x \,dx $$ A cursory glance at this specimen leads to exasperation, as the $\pi/3$ in the limit seems arbitrary, and the integrand seems devoid of an antiderivative. It turns out, however, that one way to attack this integral is to transform it into a […]


Integral of function with deceptive triple pole

One integral posted came from Hermite’s integral representation of the Hurwitz zeta function. The integral is not the most difficult that I have ever evaluated, but is interesting from a pedagogical point of view. The problem is to evaluate $$\int_0^{\infty} dx \frac{x}{(e^x-1) (x^2+4 \pi^2)^2}$$ This integral may be done via the residue theorem, by considering […]


Deceptively Tricky Integral II

Evaluate the following integral $$\int_0^{\pi/2} dx \frac{x^2}{1+\cos^2 x}$$ This integral is deviously difficult. It may look like it has the solution I provided for this integral, but, as you will see, there is an additional wrinkle. As in the linked solution, I will express the integral in a form in which I may attack via […]


Improper integral of a high power of log

I feel like I’ve developed something new in evaluating this integral. Previously, when confronted with an integral of log to the n times a function, I considered the integral of log to the n+1 times the function over a keyhole contour. This gave me the original integral, but also all of the other integrals of […]


Two integrals, each easier than it looks

I start with an integral that stymied a bunch of people for the better part of an hour. The following solution had a lot of people slapping their heads. The problem is to evaluate, for any real $\alpha$, the following integral: $$\int_0^{\pi/2} \frac{dx}{1+\tan^{\alpha}{x}}$$ Solution: use the fact that $$\tan{\left (\frac{\pi}{2}-x\right)} = \frac{1}{\tan{x}}$$ i.e., $$\frac1{1+\tan^{\alpha}{x}} = […]


A crazy-ass integral, the evaluation of which got a lot of love at Math.SE

There are a lot of integrals posted at Math.SE. I attempt to evaluate quite a few of them. Many times, I fail spectacularly; you will typically not hear of those because I feel there is nothing to say. Occasionally, I succeed; of course, you will hear about those because I post and then post again […]


Deceptively tricky integral

Someone wanted us to evaluate the following integral: $$\int\limits_0^\pi dx{\frac{{{x^2}}}{{\sqrt 5-2\cos x}}}$$ This looks straightforward, although the factor of $x^2$ does seem to complicate things a little. Actually, a lot. The usual tricks to deal with powers leads us down a road that leads to interesting territory involving dilogarithms. Let’s define $$J(a) = \int_{-\pi}^{\pi} dx […]


Unlikely application of Parseval’s equality

A poster somehow got a numerical value for an integral and wondered if it could be expressed in terms of simple constants. Let $\operatorname{erfi}(x)$ be the imaginary error function $$\operatorname{erfi}(x)=\frac{2}{\sqrt{\pi}}\int_0^xe^{z^2}dz.$$ Consider the integral $$I=\int_0^\infty\frac{\sin(x)\ \operatorname{erfi}\left(\sqrt{x}\right)\ e^{-x\sqrt{2}}}{x}dx.$$ Its numeric value is approximately $0.625773669454426$ The question is: Is it possible to express $I$ in a closed form […]


A nifty integral worked out via contour integration

Problem: evaluate the following integral: $$\int_0^{\infty}dx \frac{e^{-a x^2(x^2-\pi^2)}\cos(2\pi a x^3)}{\cosh x} $$ To evaluate this integral, consider the following integral in the complex plane: $$\oint_C \frac{dz}{\sinh{z}} e^{-a (z^2-\pi^2/4)^2}$$ where $C=C_1+C_2+C_3+C_4+C_5+C_6$ as illustrated below: $$\int_{C_1} \frac{dz}{\sinh{z}} e^{-a (z^2-\pi^2/4)^2} = \int_{i \pi/2}^{R+i \pi/2} \frac{dx}{\sinh{x}} e^{-a (x^2-\pi^2/4)^2}$$ $$\int_{C_2} \frac{dz}{\sinh{z}} e^{-a (z^2-\pi^2/4)^2} = i\int_{\pi/2}^{-\pi/2} \frac{dy}{\sinh{(R+iy)}} e^{-a [(R+i y)^2-\pi^2/4]^2} $$ […]


An integral with difficult branch points

The challenge here is merely to evaluate the following integral: $$\int_0^{\infty} dx \frac{\log{(1+x^3)}}{(1+x^2)^2}$$ This integral is a tough one because of the branch points strewn throughout the complex plane, as well as the utter lack of symmetry. It turns out, however, that we may still use the residue theorem to evaluate the integral so long […]


Interesting way to compute $\pi$ and its consequences

A poster on SE wondered how he could prove the following: $$\sum_{j=2}^\infty \prod_{k=1}^j \frac{2 k}{j+k-1} = \pi$$ Well! I never would have thought of this on my own, but I’m not really here to think up stuff like this on my own. Rather, I am here to solve the problems of confused souls, and here […]


Cosine transform of sinc cubed

Some dude asked to evaluate the following integral: $$\int_0^{\infty} dt \, \frac{\sin^3{\pi t}}{(\pi t)^3} \cos{u t}$$ I propose to perform a direct computation using Cauchy’s theorem, i.e., extension into the complex plane. I will then verify the solution using the convolution theorem. DIRECT EVALUATION Rewrite the integral as $$\frac12 \int_{-\infty}^{\infty} dt \, \frac{\sin^3{\pi t}}{(\pi t)^3} […]


An integral that is much easier than it looks

This is one of those cases where some poor, inexperienced user puts up a tough-looking integral. In Math.SE, there is a large contingent that jumps on these and gets quite upset if the consensus is that it can’t be done. Thus, when such a user posted this integral for evaluation: $$I(a,b)=\int_0^1 dt \, t^{-3/2}(1-t)^{-1/2}\exp\left(-\frac{a^2}{t}-\frac{b^2}{1-t} \right)$$ […]


Integral with hyperbolic functions

The problem here is to evaluate the following integral: $$\displaystyle \int_{0}^{\infty} dx \frac{\cosh (ax) \cosh (bx)}{\cosh (\pi x)} $$ such that $|a|+|b| < \pi$. This one can be done a number of ways, including complex analysis. Atypical for me, I chose a different way, one which led to a surprising result. It should be noted […]