0
$\begingroup$

This question is still related to my question 3 days ago about inverse laplace transform. Here is the link: enter link description here. Now, i'm working on path $L_1$ which led me to this integral when i set the radius around branch point goes to $0$. Now forget about my question 3 days ago, and my question here is how to evaluate this improper integral:

$$\int_{-\infty}^{-1}e^{\lambda t}\operatorname{Log}\left(\frac{\lambda+1}{\lambda}\right) \Bbb d\lambda$$.

$\lambda$ is now real variable instead of complex variable since my path goes close to real axis. I need to compute this integral but the problem is $t$ is unkown and i can't approximate it using geogebra. How to process this? I haven't tried to taylor it then integrating term by term cz i'm not sure if the given answer will be as my desired result.

$\endgroup$
3
  • 1
    $\begingroup$ The substitution $\lambda\to -\lambda$ renders this in the somewhat more attractive form $$\int_1^\infty e^{-\lambda t}\operatorname{Log}(1-\lambda^{-1})\,d\lambda.$$ ...in which case it's back to being a Laplace transform, amusingly. $\endgroup$ – Semiclassical Jan 18 at 4:44
  • 1
    $\begingroup$ (Reposted due to typo) Mathematica gives the closed-form $$\int_1^\infty e^{-\lambda t}\operatorname{Log}(1-\lambda^{-1})\,d\lambda = -\frac{1}{t}e^{-t}(\gamma+\log t)-\frac{1}{t}\Gamma(0,t)$$ where $\gamma$ is the Euler-Mascheroni constant and $\Gamma(x,s):=\int_x^\infty t^{s-1} e^{-t}\,dt$ is the upper incomplete gamma function. (The similarity between the definition of $\Gamma(x,s)$ and your integral seems suggestive.) $\endgroup$ – Semiclassical Jan 18 at 5:31
  • $\begingroup$ @Semiclassical according to your first comment. Seems like im getting closer to the answer if i subs again $\lambda t = u$. But i still haven't found the answer. $\endgroup$ – user516076 Jan 18 at 5:53
1
$\begingroup$

Integral in terms of $\boldsymbol{\Gamma(0,t)}$

$$ \begin{align} &\int_{-\infty}^{-1}e^{\lambda t}\log\left(\frac{\lambda+1}\lambda\right)\,\mathrm{d}\lambda\\ &=e^{-t}\int_0^\infty e^{-tx}\log\left(\frac{x}{x+1}\right)\,\mathrm{d}x\tag1\\ &=\frac{e^{-t}}t\int_0^\infty e^{-x}\log\left(\frac{x}{x+t}\right)\,\mathrm{d}x\tag2\\ &=\frac{e^{-t}}t\int_0^\infty e^{-x}\log(x)\,\mathrm{d}x-\frac{e^{-t}}t\int_0^\infty e^{-x}\log(x+t)\,\mathrm{d}x\tag3\\ &=-\frac{\gamma e^{-t}}t-\frac1t\int_t^\infty e^{-x}\log(x)\,\mathrm{d}x\tag4\\ &=-\frac{\gamma e^{-t}}t-\frac{e^{-t}\log(t)}t-\frac1t\int_t^\infty\frac{e^{-x}}x\,\mathrm{d}x\tag5\\ &=-\frac{\gamma+\log(t)}te^{-t}-\frac1t\Gamma(0,t)\tag6 \end{align} $$ Explanation:
$(1)$: substitute $\lambda\mapsto-x-1$
$(2)$: substitute $x\mapsto x/t$
$(3)$: $\log(a/b)=\log(a)-\log(b)$
$(4)$: $\int_0^\infty e^{-x}\log(x)\,\mathrm{d}x=-\gamma$, see this answer or $(4)$ from this answer
$\phantom{\text{(4):}}$ substitute $x\mapsto x-t$ in the right-hand integral
$(5)$: integrate by parts
$(6)$: apply the Upper Incomplete Gamma function


Asymptotic Expansion for $\boldsymbol{\Gamma(0,t)}$

We can integrate by parts multiple times to get $$ \begin{align} \int_t^\infty\frac{e^{-x}}x\,\mathrm{d}x &=e^{-t}\sum_{k=0}^{n-1}\frac{(-1)^kk!}{t^{k+1}}+(-1)^n\overbrace{n!\int_t^\infty\frac{e^{-x}}{x^{n+1}}\,\mathrm{d}x}^{\le n!\frac{e^{-t}}{t^{n+1}}}\tag7\\ &\sim e^{-t}\left(\frac1t-\frac1{t^2}+\frac2{t^3}-\frac6{t^4}+\dots\right)\tag8 \end{align} $$ Note that the contribution by the integral is no more than the next term in the series.

According to $(7)$, the right-most term in $(6)$ $$ \frac1t\Gamma(0,t)\le\frac{e^{-t}}{t^2}\tag9 $$ is much smaller than the preceding terms as $t\to\infty$.


Series Expansion for $\boldsymbol{\Gamma(0,1)-\Gamma(0,t)}$ $$ \begin{align} \int_1^t\frac{e^{-x}}{x}\,\mathrm{d}x &=\int_1^t\left(\frac1x+\sum_{k=1}^\infty(-1)^k\frac{x^{k-1}}{k!}\right)\mathrm{d}x\tag{10}\\ &=\log(t)+\sum_{k=1}^\infty(-1)^k\frac{t^k-1}{k\,k!}\tag{11} \end{align} $$ For $k\ge et$, the terms are decreasing in absolute value and so the alternating series test says that the error from truncating the series at that point is at most the next term in the series.


Combining the Series and Asymptotic Expansions

The error when using the sum in $(7)$ is $\le\frac{n!\,e^{-t}}{t^{n+1}}$. For a given $t$, we don't want to use $n\gt t$ since the error gets bigger. For $t=n$, we get an error of $\sim\sqrt{\frac{2\pi}n}\,e^{-2n}$. Since $\frac2{\log(10)}\ge\frac67$, using $t\ge n\ge\frac76d$ will give at least $d$ digits of precision.

To get a similar error in $(11)$, we want to use $n\ge\frac{d\log(10)}{\operatorname{W}\left(\frac{d}{et}\log(10)\right)}$.

To compute $\Gamma(0,1)$ to $30$ places, we want to use $t=n=35$ in $(7)$, then $n=150$ in $(11)$ which gives $$ \Gamma(0,1)=0.219383934395520273677163775460\tag{12} $$ Having the value of $\Gamma(0,1)$ allows us to compute $\Gamma(0,t)$ with $(11)$ when that can give a more precise result than $(7)$.

$\endgroup$
5
  • $\begingroup$ Very awesome. Nice and detailed explanation. I got the same result with you. Btw, if you have a free time don't you mind to visit my question here: math.stackexchange.com/q/3985776/664855. It's my previous question about 4-5 days ago but still not answered. Would be happy if you can help me. I've been stuck cz the contour seems cancel each other and gives me 0. And it's impossible since i know $\operatorname{Log}(1+1/s)$ has an inverse laplace transform $1/t(1-e^{-t})$ by taking the derivative from both sides. But i don't want to differentiate and calculate it in he log form. $\endgroup$ – user516076 Jan 20 at 0:05
  • $\begingroup$ Another downvote on what I thought was a decent answer. The question, being a follow up question, seemed to be a perfectly fine question to answer. Perhaps there is a personal reason for the downvote. If there is something really wrong with this answer, it would be nice to know. $\endgroup$ – robjohn Feb 14 at 3:21
  • 1
    $\begingroup$ I see that the question was also downvoted at about the same time. However, the other answer, which missed the imaginary part of $\int^{-1}_{-\infty}e^{\lambda t}\ln(\lambda+1)d\lambda$ received none. I am not advocating that that answer receive a downvote, but question the validity of the downvotes given. $\endgroup$ – robjohn Feb 14 at 7:50
  • $\begingroup$ There is nothing wrong with this answer in my personal opinion, sir. It's not something new that this site finds a lot of random downvotes that show someone hates this site. I've had my off topic and someone who spoke with utmost disrespect. At least they should gave a hint,instead of insulting the questioner. And btw, I've +1 this answer. $\endgroup$ – user516076 Feb 15 at 5:22
  • $\begingroup$ It looks like you only have 1 downvote. Also, I have given you an upvote as well $\endgroup$ – Some Guy Feb 15 at 5:32
1
$\begingroup$

Note that $\ln\left(\frac{\lambda+1}\lambda\right)=\ln(\lambda+1)-\ln\lambda$. Given this, we write

$$\int^{-1}_{-\infty} e^{\lambda t}(\ln(\lambda+1)-\ln\lambda)d\lambda=\int^{-1}_{-\infty} e^{\lambda t}\ln(\lambda+1)d\lambda-\int^{-1}_{-\infty} e^{\lambda t}\ln\lambda d\lambda$$

Let's first evaluate $\int^{-1}_{-\infty} e^{\lambda t}\ln\lambda d\lambda$ since it looks simpler.


We first substitute $u=\lambda t$, which means $\lambda=\frac ut$ and $d\lambda=\frac1t du$.

$$\int^{-1}_{-\infty} e^{\lambda t}\ln\lambda d\lambda=\frac1t\int^{-t}_{-\infty} e^u\ln\frac ut du=\frac1t\int^{-t}_{-\infty} e^u(\ln u-\ln t) du=\frac1t\left(\int^{-t}_{-\infty} e^u\ln u du-\int^{-t}_{-\infty}\ln te^udu\right)$$

$\int^{-t}_{-\infty}\ln te^udu$ is trivial. One can clearly see $\int^{-t}_{-\infty}\ln te^udu=\ln t\int^{-t}_{-\infty}e^udu=\ln t \left.e^u\right|^{-t}_{-\infty}=\ln t e^{-t}$

$\int^{-t}_{-\infty} e^u\ln u du$ is trickier, but doable. We use integration by parts.

Let $v=\ln u$, $dw=e^u du$. Then $dv=\frac1u$, $w=e^u$.

Thus, we have

$$\int^{-t}_{-\infty} e^u\ln u du=\left. \ln u e^u\right|^{-t}_{-\infty}-\int^{-t}_{-\infty}\frac{e^u}u du$$

$\left.\ln u e^u\right|^{-t}_{-\infty}=\ln(-t)e^{-t}-\ln(-\infty)e^{-\infty}=(\ln t+i\pi)e^{-t}-\left(\ln\infty+i\pi\right) e^{-\infty}$. You can show that $\lim_{x\to\infty}\ln xe^{-x}=0$, so $(\ln t+i\pi)e^{-t}-\left(\ln\infty+i\pi\right) e^{-\infty}=(\ln t+i\pi)e^{-t}.$

$\int^{-t}_{-\infty}\frac{e^u}u du$ is the Exponential integral, which has no closed form. However, we can write $\int^{-t}_{-\infty}\frac{e^u}u du=\operatorname{Ei}(-t)$.

Combining the two integrals, we have

$$\int^{-1}_{-\infty} e^{\lambda t}\ln\lambda d\lambda=\frac1t\left((\ln t+i\pi)e^{-t}-\operatorname{Ei}(-t))-\ln t e^{-t}\right)=\frac1t\left(i\pi e^{-t}-\operatorname{Ei}(-t)\right)$$


To evaluate $\int^{-1}_{-\infty} e^{\lambda t}\ln(\lambda+1)d\lambda$, we first write $u=\lambda+1$, which means $\lambda=u-1$ and $du=d\lambda$. Hence

$$\int^{-1}_{-\infty} e^{\lambda t}\ln(\lambda+1)d\lambda=\int^0_{-\infty} e^{(u-1)t}\ln udu=\int^0_{-\infty} e^{ut}e^{-t}\ln udu=e^{-t}\int^0_{-\infty} e^{ut}\ln udu$$

Does $\int^0_{-\infty} e^{ut}\ln udu$ look familiar to you? It should, since we evaluated this $\int^{-1}_{-\infty} e^{ut}\ln udu$ earlier. Using the same substitutions, but replacing $-1$ and $-t$ with $0$ in the upper bound, we arrive with

$$\int^0_{-\infty} e^{\lambda t}\ln(\lambda+1)d\lambda=\frac1t\left(\ln u \left.e^u\right|^0_{-\infty}-\operatorname{Ei}(0)-\ln t \left.e^u\right|^0_{-\infty}\right)=\frac1t(\ln0-\operatorname{Ei}(0)-\ln t)$$

Inserting this back in,

$$e^{-t}\int^{-1}_{-\infty} e^{ut}\ln udu=\frac{e^{-t}}t(\ln0-\operatorname{Ei}(0)-\ln t)$$

$\ln0-\operatorname{Ei}(0)$ is undetermined as $\ln0=\operatorname{Ei}(0)=-\infty$, but we can squeeze some meaning out of it by interpreting it as $\lim_{x\to0}\ln x-\operatorname{Ei}(x)$ instead. To evaluate this, we first use the integral definitions of $\ln x$ $\operatorname{Ei}(x)$:

$$\lim_{x\to0}\ln x-\operatorname{Ei}(x)=\lim_{x\to0}\int^x_1\frac1zdz-\int^x_{-\infty}\frac{e^z}zdz$$ $$=\int^x_1\frac1zdz-\int^x_1\frac{e^z}zdz-\int^1_{-\infty}\frac{e^z}zdz$$

You may recall that $\int^b_a [f(x)-g(x)]dx=\int^b_a f(x)dx-\int^b_a g(x)dx$. The opposite also applies, i.e $\int^b_a f(x)dx-\int^b_a g(x)dx=\int^b_a [f(x)-g(x)]dx$. Knowing this, we can combine $\int^x_1\frac1zdz-\int^x_1\frac{e^z}zdz$:

$$\lim_{x\to0}\int^x_1\frac1zdz-\int^x_1\frac{e^z}zdz-\int^1_{-\infty}\frac{e^z}zdz=\lim_{x\to0}\int^x_1\frac{1-e^z}zdz-\operatorname{Ei}(1)$$

Now apply the sum definition of $e^z$:

$$\lim_{x\to0}\int^x_1\frac{1-e^z}zdz-\operatorname{Ei}(1)=\lim_{x\to0}\int^x_1\frac{1-\sum^\infty_{n=0}\frac{z^n}{n!}}zdz-\operatorname{Ei}(1)$$

$$=\lim_{x\to0}\int^x_1\frac{1-1-\sum^\infty_{n=1}\frac{z^n}{n!}}zdz-\operatorname{Ei}(1)$$

$$=\lim_{x\to0}\int^x_1\sum^\infty_{n=1}\frac{z^{n-1}}{n!}dz-\operatorname{Ei}(1)$$

$$=\sum^\infty_{n=1}\frac1{n!}\int^1_0z^{n-1}dz-\operatorname{Ei}(1)=\sum^\infty_{n=1}\frac1{n!}\cdot\frac1n-\operatorname{Ei}(1)$$

Interestingly, according to MathWorld $\operatorname{Ei}(x)=\gamma+\ln x+\sum^\infty_{n=1}\frac{x^n}{n\cdot n!}$. This means $\operatorname{Ei}(1)=\gamma+\ln 1+\sum^\infty_{n=1}\frac{1^n}{n\cdot n!}\Rightarrow \sum^\infty_{n=1}\frac1{n\cdot n!}=\operatorname{Ei}(1)-\gamma$. An interesting coincidence. Inserting this back:

$$\sum^\infty_{n=1}\frac1{n!}\cdot\frac1n-\operatorname{Ei}(1)=\operatorname{Ei}(1)-\gamma+\operatorname{Ei}(1)=-\gamma$$

Hence,

$$\int^{-1}_{-\infty} e^{\lambda t}\ln(\lambda+1)d\lambda=\frac{e^{-t}}t(-\gamma-\ln t)=-\frac{e^{-t}}t(\gamma+\ln t)$$


Thus,

$$\int^{-1}_{-\infty} e^{\lambda t}\ln(\lambda+1)d\lambda-\int^{-1}_{-\infty} e^{\lambda t}\ln\lambda d\lambda=-\frac{e^{-t}}t(\gamma+\ln t)-\frac1t\left(i\pi e^{-t}-\operatorname{Ei}(-t)\right)=-\frac{e^{-t}}t(\gamma+\ln t+i\pi)+\frac{\operatorname{Ei}(-t)}t$$

(Note 1: If $\Gamma(x,y)$ refers to the upper incomplete gamma function, $\Gamma(0,t)=\int^\infty_t s^{-1}e^{-s} ds=\int^\infty_t\frac{e^{-s}}s ds$. Let $z=-s$, $-dz=ds$. $\int^\infty_t\frac{e^{-s}}s ds=\int^{-\infty}_{-t}\frac{e^z}{-z}-dz=-\int^{-t}_{\infty}\frac{e^z}zdz=-\operatorname{Ei}(-t)$. Hence, $\Gamma(0,t)=-\operatorname{Ei}(-t)$, and the $-\frac{\Gamma(0,t)}t$ that appears in Mathematica's answer is equivalent to the $\frac{\operatorname{Ei}(-t)}t$ that appears in my answer.)

(Note 2: There appears to be a $-\frac{e^{-t}}ti\pi$ term that appears in my derivation but not in Mathematica's. I'm assuming that it's because Mathematica only shows the real part of the integral. Let's hope that's the case.)

$\endgroup$
8
  • $\begingroup$ Hi. First, thank you so much fo the answer! So can i really ignore $\ln(0)-\operatorname{Ei}(0)$ and treat them as $0$ since both equal $-\infty$? $\endgroup$ – user516076 Jan 18 at 6:13
  • $\begingroup$ No. Consider for example, $2\ln(0)-\ln(0)$. Both terms equal to $-\infty$ but $\lim_{x\to0}2\ln(0)-\ln(0)=\lim_{x\to0}\ln(0)=-\infty$. So you can't just treat the expression as being equal to $0$. $\endgroup$ – Kyky Jan 18 at 6:17
  • $\begingroup$ @user516076 I believe that $\lim_{x\to0}\ln(0)-\operatorname{Ei}(0)=-\gamma$ ($\gamma$ being the Euler-Mascheroni constant, believe it or not), and inserting that into what I have so far gives me the same answer as Semicalssical/Mathematica. I will post a derivation later. $\endgroup$ – Kyky Jan 18 at 6:25
  • 1
    $\begingroup$ @user516076 updated to explain why $\lim_{x\to0}\ln x-\operatorname{Ei}(x)=-\gamma$. $\endgroup$ – Kyky Jan 18 at 8:02
  • 1
    $\begingroup$ I believe it is Integrate[E^(\[Lambda]*t) Log[(\[Lambda] + 1)/\[Lambda]], {\[Lambda], -Infinity, -1}]. Though you should consult The Mathematica Reference before asking. $\endgroup$ – Kyky Jan 18 at 10:01

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.