0

I am trying to evaluate $$\int_{0}^{\infty} \frac{\cos(x)-e^{-x}}{x} dx$$

I did manage to get the correct value of this integral through the use of Frullani's Integral Theorem, which states that $$\int_{0}^{\infty} \frac{f(ax)-f(bx)}{x} dx = (f(\infty)-f(0))\Big(\ln\Big(\frac{a}{b}\Big)\Big)$$

So from here, I substitute $e^{ix}-i\sin(x)$ for $\cos(x)$ to get this into something of the Frullani Integral form. It seems from the response here: Frullani 's theorem in a complex context., that we can extend the Frullani Theorem to a complex setting with a lot of work and on a case-by-case basis. However, I would like to approach this integral in a way that does not involve complex numbers. This integral was originally meant to be evaluated with just "advanced calc"/elementary real analysis methods, so I am looking for such an approach.

2 Answers2

4

You can use feynmans trick to evaluate this. $$I=\int _0^{\infty }\frac{\cos \left(x\right)-e^{-x}}{x}\:dx$$ $$I\left(a\right)=\int _0^{\infty }e^{-ax}\frac{\cos \left(x\right)-e^{-x}}{x}\:dx$$ $$I'\left(a\right)=-\int _0^{\infty }e^{-ax}\left(\cos \left(x\right)-e^{-x}\right)\:dx=-\int _0^{\infty }e^{-ax}\cos \left(x\right)+\int _0^{\infty }\:e^{-x\left(a+1\right)}\:dx$$ $$=-\frac{a}{a^2+1}+\frac{1}{a+1}$$ Now integrating again: $$\int _0^{\infty }I'\left(a\right)\:da=\int _0^{\infty }-\frac{a}{a^2+1}\:da+\int _0^{\infty }\frac{1}{a+1}\:da$$ $$-I=\underbrace{-\frac{1}{2}\ln \left(a^2+1\right)+\ln \left(a+1\right)}_{0}|^{\infty }_0$$ Thus $$I=\int _0^{\infty }\frac{\cos \left(x\right)-e^{-x}}{x}\:dx=0$$

Infiniticism
  • 8,644
  • 1
  • 22
  • 67
Dennis Orton
  • 2,646
0

In fact this integral is a special case of: $$\int _0^{\infty }\frac{e^{-ax}\cos \left(cx\right)-e^{-bx}\cos \left(dx\right)}{x}\:dx$$ Which can also be evaluated with Feynman's trick: $$I\left(a\right)=\int _0^{\infty }\frac{e^{-ax}\cos \left(cx\right)-e^{-bx}\cos \left(dx\right)}{x}\:dx$$ $$I'\left(a\right)=-\int _0^{\infty }e^{-ax}\cos \left(cx\right)\:dx=-\frac{a}{c^2+a^2}$$ $$-\int _a^{\infty }I'\left(a\right)\:da=\int _a^{\infty }\frac{a}{c^2+a^2}\:da$$


$$I\left(\infty \right)=I\left(b \right)=-\int _0^{\infty }\frac{e^{-bx}\cos \left(dx\right)}{x}\:dx$$ $$I'\left(b\right)=\int _0^{\infty }e^{-bx}\cos \left(dx\right)\:dx=\frac{b}{d^2+b^2}$$ $$-\int _b^{\infty }I'\left(b\right)\:db=-\int _b^{\infty }\frac{b}{d^2+b^2}\:db$$ $$I\left(\infty \right)=I\left(b\right)=-\int _b^{\infty }\frac{b}{d^2+b^2}\:db$$


$$-\left(I\left(\infty \right)-I\left(a\right)\right)=\int _a^{\infty }\frac{a}{c^2+a^2}\:da$$ $$I\left(a\right)=\int _a^{\infty }\frac{a}{c^2+a^2}\:da-\int _b^{\infty }\frac{a}{d^2+a^2}\:da$$ $$=\frac{1}{2}\ln \left(c^2+a^2\right)\biggr|_a^{\infty }-\frac{1}{2}\ln \left(d^2+a^2\right)\biggr|_b^{\infty }=\frac{1}{2}\ln \left(\frac{d^2+b^2}{c^2+a^2}\right)$$ Thus: $$\boxed{I\left(a\right)=\int _0^{\infty }\frac{e^{-ax}\cos \left(cx\right)-e^{-bx}\cos \left(dx\right)}{x}\:dx=\frac{1}{2}\ln \left(\frac{d^2+b^2}{c^2+a^2}\right)}$$


We can verify the result obtained in the other answer with this letting $a=d=0,c=b=1$. $$\int _0^{\infty }\frac{\cos \left(x\right)-e^{-x}}{x}\:dx=\frac{1}{2}\ln \left(\frac{0+1}{1+0}\right)=0$$

Dennis Orton
  • 2,646