# Solution of $\mathrm{sinc}(x)$ integral using Frullani integral formula gives incorrect result

I recently came across the Frullani integral and wanted to try it out by seeing if solving $$\int_0^\infty{\mathrm{sinc}(x)}$$ would give the familiar answer of $$\pi/2$$, but instead I got $$-\pi/2$$. I did the following:

\begin{align} \int_0^\infty{\frac{\sin x}{x}}\ dx &= \int_0^\infty{\frac{e^{ix}-e^{-ix}}{2ix}}\ dx = \frac{1}{2i}\int_0^\infty{\frac{e^{ix}-e^{-ix}}{x}}\ dx \\ &= \frac{1}{2i}\int_0^\infty{\frac{e^{-(-i)x}-e^{-(i)x}}{x}}\ dx \end{align}

Then, taking $$f(x)=e^{-x}$$, $$a=-i$$ and $$b=i$$, the solution becomes

\begin{align} \frac{1}{2i}\int_0^\infty{\frac{e^{-(-i)x}-e^{-(i)x}}{x}}\ dx &= \frac{1}{2i}(e^{-\infty}-e^{-0})\ln \frac{-i}{i} \\ &= \frac{1}{2i}(-1)\ln(-1) \\ &= -\frac{1}{2i} \cdot i\pi = -\frac{\pi}{2} \end{align}

I believe the error may be due to my use of $$\ln(-1)=i\pi$$ being invalid in this scenario, but I am not certain about this. For now, I have found two ways to "correct" the formula so that the answer gives $$\pi/2$$ instead of $$-\pi/2$$:

• Since $$-1=\frac{1}{-1}$$, I can deduce that $$\ln(-1)=\ln((-1)^{-1})=-\ln(-1)=-i\pi$$, and the two negatives cancel out. However, I'm pretty sure there's something very wrong with this and I should not be allowed to do this.
• If I instead do: \begin{align} \frac{1}{2i}\int_0^\infty{\frac{e^{ix}-e^{-ix}}{x}}\ dx &= \frac{1}{2i}\int_0^\infty{\frac{-(e^{-ix}-e^{ix})}{x}}\ dx \\ &= -\frac{1}{2i}\int_0^\infty{\frac{e^{-ix}-e^{ix}}{x}}\ dx \end{align} and then take $$f(x)=e^{-x}$$, $$a=i$$ and $$b=-i$$, there are again two negatives that cancel out and give $$\pi/2$$. This works, but it still does not answer my question of why my first attempt didn't.
• In the reference you stated, f(x) should be a function defined for all non-negative real numbers and a and b are real too.
– Lai
Apr 18, 2023 at 0:13
• @Lai you're right, I read through it multiple times and still missed it, no clue how. The fact that it's so close to being correct still makes me wonder though. I did some further checking around and found math.stackexchange.com/questions/1807410/… ; could the answers here apply to this case? Apr 18, 2023 at 5:06
• Thank you for your reference which extends the Frullani’s Theorem for complex numbers.
– Lai
Apr 18, 2023 at 7:40