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.