12

I'm having trouble with this integral

Evaluate $$\int_0^\infty \frac{e^{-x}}{x}\ln\left(\frac{1}{x}\right) \sin(x)dx$$

$$I=\int_0^\infty \frac{e^{-x}}{x}\ln\left(\frac{1}{x}\right) \sin(x)dx=\Im\left[\int_0^\infty \frac{e^{-x+ix}}{x}\ln\left(\frac{1}{x}\right) dx\right]$$ How would one proceed from here ? $u$ substitute $u=\ln(x)$? How do you solve this integral? Thank you for your time.

Hanul Jeon
  • 27,376
hwood87
  • 1,352
  • Are you expected to use complex analysis to solve it? Have you solved or seen similar integrals before? You might want to search MSE with Approach0 for similar integrals : usually this allows you to at least get a better attempt in, for example. – Sarvesh Ravichandran Iyer Sep 08 '21 at 03:23
  • @TeresaLisbon I'm just learning it at the moment through problems – hwood87 Sep 08 '21 at 03:25
  • I see! I'd probably start with seeing that $\ln(\frac 1x) = -\ln x$. I've also got the exact expression for the answer over here, so this is for others : it's equal to $\frac{\pi}{8}(2 \gamma + \log 2)$, so you might want to think about integrals involving $\gamma$. – Sarvesh Ravichandran Iyer Sep 08 '21 at 03:27
  • 3
    Note that $\int_0^\infty \frac{e^{-x(1-i)}}{x^a}\log x, \mathrm dx=-\frac{\mathrm d}{\mathrm da}\int_0^\infty \frac{e^{-x(1-i)}}{x^a}$ –  Sep 08 '21 at 03:32
  • 1
    @NoName Very close, it's just the $\frac 1x$ that's not been accounted for. The Frullani integral and contour approaches can possibly be modified to solve this one, though. – Sarvesh Ravichandran Iyer Sep 08 '21 at 05:14
  • @TeresaLisbon In fact I didn't spot the slight difference. Thanks for pointing that out. I've now posted a solution to this question. – NoName Sep 09 '21 at 05:17
  • 2
    @NoName Noticed it, loved it, up voted it! – Sarvesh Ravichandran Iyer Sep 09 '21 at 05:32

3 Answers3

8

We want to evaluate

$$I = -\int_0^\infty \frac{e^{-x}}{x}\ln (x)\sin(x)\, dx $$

We start with the result

$$ \int_0^\infty e^{-ax}\sin(x)\, dx = \frac{1}{a^2+1} = \frac{1}{2i}\Big(\frac{1}{a-i}-\frac{1}{a+i}\Big) $$

Differentiating both sides $ b-1$ times w.r.t. $a$ and setting $a=1$, we get

$$\int_0^\infty x^{b-1}e^{-x}\sin(x) \, dx = \frac{\Gamma(b)\sin\frac{\pi b}{4}}{2^{b/2}} $$

Now, differentiating w.r.t. $b$, $$\int_0^\infty x^{b-1}\ln(x)e^{-x}\sin(x)\, dx = \frac{\Gamma(b)\psi(b)\sin\frac{\pi b}{4}}{2^{b/2}}+\frac{\pi}{4}\cdot\frac{\Gamma(b)\cos\frac{\pi b}{4}}{2^{b/2}}- \frac{\ln 2}{2}\cdot \frac{\Gamma(b)\sin\frac{\pi b}{4}}{2^{b/2}}$$ Now, taking the limit $b\to 0$, for which I used Wolfram|Alpha, we get the result $$ I = \frac{\pi}{8}(2\gamma+\ln 2)$$ Where $\gamma$ denotes the Euler-Mascheroni constant.

  • 8
    It'd be nice if you could solve the limit as well, without requiring Wolfram Alpha. For example, it's well known that $b\Gamma(b) \to 1$ as $b \to 0$, and the first term involves the asymptotics of $\psi$, for which you can think about the series here, shift the parameter up if necessary. – Sarvesh Ravichandran Iyer Sep 08 '21 at 06:53
  • 4
    I would simply use $\int_0^\infty x^{b-1}e^{-ax},dx=a^{-b}\Gamma(b)$ for $\Re a, \Re b>0$, avoiding strange things like "differentiating $b-1$ times" (when $b$ is not an integer). – metamorphy Sep 08 '21 at 09:16
  • @metamorphy. There are also nice solutions using hypergeometric functions and even the expansion of $\sin(x)$ since $$\int_0^\infty \frac{(-1)^{n+1} e^{-x} x^{2 n} \log (x)}{(2 n+1)!}=\frac{(-1)^{n+1} \psi (2 n+1)}{2 n+1}$$ – Claude Leibovici Sep 08 '21 at 10:43
  • @metamorphy Actually, I avoid using complex numbers while I solve integrals, as I have not studied and am not much familiar to complex analysis. I am much familiar with the real methods I use. – Laxmi Narayan Bhandari Sep 08 '21 at 14:01
  • @Teresa Well, I would try to figure it out. I think I have to use the asymptotic series representations of gamma and digamma functions. Any more hint you know? – Laxmi Narayan Bhandari Sep 08 '21 at 14:02
  • @LaxmiNarayanBhandari The hints I gave will be enough, thankfully. I will anyway try a complex analytic approach, although metamorphy has given me food for thought! – Sarvesh Ravichandran Iyer Sep 08 '21 at 14:09
  • @Teresa Yep. I feel really sad that I haven't learned complex analysis. I am trying to get the foundations required to learn it like multivariable calculus, algebra and real analysis. Only the last two are left. – Laxmi Narayan Bhandari Sep 08 '21 at 14:12
  • @LaxmiNarayanBhandari This is the best resource that I can suggest to you, apart from questions and answers on MSE of course. There aren't too many contour shapes or principles behind this , at least in simple cases. In fact, doing stuff while keeping your theorems real-analytic is plenty of fun on its own, so if you like you can continue avoiding complex integrations. – Sarvesh Ravichandran Iyer Sep 08 '21 at 14:14
  • @Teresa If you can suggest me a good real and complex analysis book, it would be really helpful. I am almost done with my multivariable calculus, and want to learn real analysis after that. – Laxmi Narayan Bhandari Sep 08 '21 at 14:16
  • 1
    @LaxmiNarayanBhandari How about Rudin's Real and Complex analysis (and Rudin's "Principles of Mathematical Analysis" as a precursor)? A solutions manual for it was created by Trang Tuan. For complex analysis alone, try Conway or Gamelin. For exercises in complex analysis, look at "A collection of problems in complex analysis" by Volkovyskii, Lunts and Aramanovich. These will help you get a move on very quickly! – Sarvesh Ravichandran Iyer Sep 08 '21 at 14:20
  • @Teresa How about Apostol's real analysis? Would be better as an introduction? – Laxmi Narayan Bhandari Sep 08 '21 at 14:39
  • @LaxmiNarayanBhandari Yes, that would work as well. – Sarvesh Ravichandran Iyer Sep 08 '21 at 14:39
  • @Teresa for complex analysis, I was considering Schaum's complex variables and Frietag-Busam. Which would be better, in your opinion? – Laxmi Narayan Bhandari Sep 08 '21 at 14:41
  • @LaxmiNarayanBhandari Haven't read either, sorry about that. The texts I have suggested are common undergraduate texts, so they will definitely have you on your way for sure. – Sarvesh Ravichandran Iyer Sep 08 '21 at 14:41
  • 2
    @Teresa I will try them when I learn complex analysis. Thanks. – Laxmi Narayan Bhandari Sep 08 '21 at 14:54
7

We'll use the following two crucial facts to calculate the integral. The first is that:

$$\boxed{\tan^{-1}x\ln(1+x^2)=-2\sum_{ n \ge 1}\frac{(-1)^nH_{2n}}{2n+1}x^{2n+1}}$$

which is shown in here. The second is that

$$\displaystyle \boxed{\Gamma'(2k-1) = (2k-2)! \bigg(-2\gamma +2\sum_{n=1}^{2k-2}\frac{1}{n} \bigg)} $$

Which follows from logarithmic differentiation of $$\Gamma(2z-1)=e^{-\gamma (2z-2)}\cdot\prod_{n\geq 1}\left(1+\frac{2z-2}{n}\right)^{-1}e^{\frac{{2z-2}}n}$$

i.e. taking log of both sides and differenting w.r.t. $z.$


Let $\displaystyle I = \int_0^{\infty} \frac{1}{x} \log\left(\frac{1}{x}\right)\sin x \, \mathrm dx. $ Using the taylor series for sine, we have:

$$\begin{aligned} I & = -\int_0^{\infty} \frac{1}{x} e^{-x} \log x \sin{x}\, \mathrm dx \\& = -\int_0^{\infty} e^{-x} \log x \sum_{k \ge 1} \frac{(-1)^{k-1} x^{2k-2}}{(2k-1)!}\, \mathrm dx \\& = -\sum_{k \ge 1} \frac{(-1)^{k-1}}{(2k-1)!}\int_0^{\infty} x^{2k-2}e^{-x} \log x \, \mathrm dx \\& = -\frac{1}{2}\sum_{k \ge 1} \frac{(-1)^{k-1}}{(2k-1)!} \frac{\partial}{\partial k } \int_0^{\infty} x^{2k-2}e^{-x} \, \mathrm dx \\&= -\frac{1}{2}\sum_{k \ge 1} \frac{(-1)^{k-1}}{(2k-1)!} \frac{\partial \Gamma (2k-1)}{\partial k } \\&= -\frac{1}{2}\sum_{k \ge 1} \frac{(-1)^{k-1}}{(2k-1)!} \cdot (2k-2)! \bigg(-2\gamma +2\sum_{n=1}^{2k-2}\frac{1}{n} \bigg) \\&= -\frac{1}{2}\sum_{k \ge 1} \frac{(-1)^{k-1}}{(2k-1)} \cdot \bigg(-2\gamma +2\sum_{n=1}^{2k-2}\frac{1}{n}\bigg) \\& = \gamma \sum_{k \ge 1} \frac{(-1)^{k-1}}{(2k-1)} -\sum_{k \ge 1} \frac{(-1)^{k-1}}{(2k-1)}\sum_{n=1}^{2k-2}\frac{1}{n} \\&= \frac{\gamma \pi }{4}- \sum_{k \ge 1} \frac{(-1)^{k-1} H_{2k-2}}{2k-1} \\& = \gamma \frac{\pi}{4}- \sum_{k \ge 1} \frac{(-1)^k H_{2k}}{2k+1} \\& = \gamma \frac{\pi}{4}-\left( -\frac{1}{2} \cdot \tan^{-1}x \cdot \ln(1+x^2)\right)\bigg|_{x=1} \\& = \gamma \frac{\pi}{4}+ \frac{1}{2} \cdot \frac{\pi}{4} \cdot \log{2} \\& = \frac{\pi}{8} \left(2\gamma + \log 2\right). \end{aligned}$$

NoName
  • 2,820
  • 1
  • 12
  • 21
6

Using the identities \begin{align*} \frac{1}{x} &= \int_0^\infty \mathrm{e}^{-x t}\, \mathrm{d} t, \\ \ln x &= \int_0^\infty \frac{\mathrm{e}^{-s} - \mathrm{e}^{-xs}}{s}\,\mathrm{d} s, \end{align*} we have \begin{align*} I &= \int_0^\infty \mathrm{e}^{-x}\sin x \left(\int_0^\infty \mathrm{e}^{-x t}\, \mathrm{d} t\right) \left(\int_0^\infty \frac{\mathrm{e}^{-xs} - \mathrm{e}^{-s}}{s}\,\mathrm{d} s\right)\mathrm{d}x\\[8pt] &= \int_0^\infty \frac{1}{s} \left[\int_0^\infty \left(\int_0^\infty \mathrm{e}^{-x(1 + s + t)}\sin x \, \mathrm{d} x - \int_0^\infty \mathrm{e}^{-x(1 + t) - s}\sin x\, \mathrm{d} x\right)\mathrm{d} t\right]\mathrm{d} s\\[8pt] &= \int_0^\infty \frac{1}{s} \left[\int_0^\infty \left(\frac{1}{(1 + s + t)^2 + 1} - \mathrm{e}^{-s}\, \frac{1}{(1 + t)^2 + 1}\right)\mathrm{d} t\right]\mathrm{d} s \tag{1}\\[8pt] &= \int_0^\infty \frac{1}{s} \left[\frac{\pi}{2} - \arctan(1 + s) - \mathrm{e}^{-s}\,\frac{\pi}{4}\right]\mathrm{d} s\\[8pt] &= \lim_{c\to 0^{+}} \int_c^\infty \frac{1}{s} \left[\frac{\pi}{2} - \arctan(1 + s) - \mathrm{e}^{-s}\,\frac{\pi}{4}\right]\mathrm{d} s\\[8pt] &= \lim_{c\to 0^{+}} \left[ \Big(\frac{\pi}{4}\mathrm{e}^{-c} - \frac{\pi}{2} + \arctan(1 + c)\Big)\ln c - \frac{\pi}{4}\int_c^\infty \mathrm{e}^{-s}\ln s \, \mathrm{d} s\right. \\[6pt] &\qquad\qquad\left. + \int_c^\infty \frac{\ln s}{s^2 + 2s + 2}\,\mathrm{d} s\right] \tag{2}\\[12pt] &= \frac{\pi}{4}\gamma + \frac{\pi}{8}\ln 2. \tag{3} \end{align*} Explanations:
(1): $\int \mathrm{e}^{-bx}\sin x \, \mathrm{d} x = -\frac{b\sin x + \cos x}{b^2 + 1}\mathrm{e}^{-bx} + C$;
(2): the IBP (Integration By Parts);
(3): $\lim_{c\to 0^{+}} (\frac{\pi}{4}\mathrm{e}^{-c} - \frac{\pi}{2} + \arctan(1 + c))\ln c = 0$ (use L'Hopital rule),
and $\int_0^\infty \mathrm{e}^{-s}\ln s \, \mathrm{d} s = - \gamma$ where $\gamma$ is the Euler-Mascheroni constant,
and $\int_0^\infty \frac{\ln s}{s^2 + 2s + 2}\,\mathrm{d} s = \frac{\pi}{8}\ln 2$ (the proof is given at the end).


A very nice proof of $\int_0^\infty \frac{\ln s}{s^2 + 2s + 2}\,\mathrm{d} s = \frac{\pi}{8}\ln 2$ by @Kelenner:

Let $J = \int_0^\infty \frac{\ln s}{s^2 + 2s + 2}\,\mathrm{d} s$.

With the substitution $s = \frac{2}{u}$, we have $$J = \int_0^\infty \frac{\ln 2 - \ln u}{u^2 + 2u + 2}\,\mathrm{d} u = \int_0^\infty \frac{\ln 2 }{u^2 + 2u + 2}\,\mathrm{d} u - J$$ which results in $J = \frac{1}{2} \int_0^\infty \frac{\ln 2 }{u^2 + 2u + 2}\,\mathrm{d} u = \frac{\ln 2}{2}\arctan(1 + u)\vert_0^\infty = \frac{\pi}{8}\ln 2$. We are done.

River Li
  • 37,323