Saturday, May 7, 2022

Application of Ramanujan's master theorem III

Another nice integral solved with the Ramanujan's master thorem

Strange integral involving the Euler-Mascheroni constant $\gamma$


Today we show the proof of this strange integral posted by @integralsbot \[\int_{0}^{\infty} \frac{\cos(x^2)-\cos(x)}{x}dx = \frac{\gamma}{2} \] In the way to find the solution we also find the following Mellin transform \[ \int_{0}^{\infty}w^{s-1} \left(\cos(w) -\cos(\sqrt{w})\right) dw = \Gamma(s)\cos\left(\frac{\pi s}{2} \right) - \frac{\Gamma(s)\Gamma(1-s)}{\Gamma(1-2s)} \quad 0\lt s \lt 1 \] The proof relies on the powerful Ramanujan's master theorem.

Proof:

Recall the Ramanujan's master theorem:

If a complex-valued function $ f(x)$ has an expansion of the form \[f(x)=\sum_{k=0}^\infty \frac{\,\varphi(k)\,}{k!}(-x)^k \] then the Mellin transform of $f(x)$ is given by \[\int_0^\infty x^{s-1} f(x) dx = \Gamma(s)\,\varphi(-s) \tag{1} \] Back to the integral: \[ \int_{0}^{\infty} \frac{\cos(x^2)-\cos(x)}{x}dx = \frac{1}{2} \int_{0}^{\infty} \frac{\cos(w)-\cos(\sqrt{w})}{w}dw \quad (w \mapsto x^2) \] Consider the following Mellin transform \[ \mathscr{M}\left\{ \cos(w)-\cos(\sqrt{w}) \right\} = \int_{0}^{\infty}w^{s-1} \left(\cos(w) -\cos(\sqrt{w})\right) dw \] Note that we can expand the cosine function in the following way: \begin{align*} \cos(w) = \Re\left(e^{iw}\right) =& \Re\left(\sum_{n=0}^{\infty} \frac{i^nw^n}{n!}\right) \\ =& \Re\left(\sum_{n=0}^{\infty} \frac{(-i^n)(-w^n)}{n!}\right) \\ =& \sum_{n=0}^{\infty} \frac{\Re((-i^n))(-w^n)}{n!} \\ =& \sum_{n=0}^{\infty} \frac{\cos\left(\frac{\pi n}{2} \right) (-w^n)}{n!} \end{align*} and we can exapnd $\cos(\sqrt{w})$ in the traditional way: \begin{align*} \cos(\sqrt{w}) = \sum_{n=0}^{\infty} \frac{(-w)^n}{(2n)!} \end{align*} Therefore \begin{align*} \cos(w)-\cos(\sqrt{w}) =& \sum_{n=0}^{\infty} \frac{\cos\left(\frac{\pi n}{2} \right) (-w^n)}{n!} - \sum_{n=0}^{\infty} \frac{(-x)^n}{(2n)!}\\ =& \sum_{n=0}^{\infty}\left[ \frac{\cos\left(\frac{\pi n}{2} \right) (-w^n)}{n!} - \frac{(-w)^n}{(2n)!}\right]\\ =& \sum_{n=0}^{\infty}\underbrace{\left[ \cos\left(\frac{\pi n}{2} \right) - \frac{n!}{(2n)!}\right]}_{\varphi(n)}\frac{(-w^n)}{n!}\ \end{align*} Applying the Ramanujan's master theorem : \begin{align*} \int_{0}^{\infty}w^{s-1} \left(\cos(w) -\cos(\sqrt{w})\right) dw = &\Gamma(s) \varphi(-s) \quad \textrm{from (1)}\\ =& \Gamma(s)\left[ \cos\left(-\frac{\pi s}{2} \right) - \frac{(-s)!}{(-2s)!}\right]\\ =& \Gamma(s)\left[ \cos\left(\frac{\pi s}{2} \right) - \frac{\Gamma(1-s)}{\Gamma(1-2s)}\right]\\ =& \Gamma(s)\cos\left(\frac{\pi s}{2} \right) - \frac{\Gamma(s)\Gamma(1-s)}{\Gamma(1-2s)}\\ \end{align*} Hence \[ \int_{0}^{\infty}w^{s-1} \left(\cos(w) -\cos(\sqrt{w})\right) dw = \Gamma(s)\cos\left(\frac{\pi s}{2} \right) - \frac{\Gamma(s)\Gamma(1-s)}{\Gamma(1-2s)}\] We can use this Mellin transform to calculate our integral Taking the limit as $s \to 0+$ \begin{align*} \int_{0}^{\infty} \frac{\cos(w) -\cos(\sqrt{w}) }{w}dw =& \int_{0}^{\infty} \lim_{s \to 0+} w^{s-1} \left(\cos(w) -\cos(\sqrt{w})\right) dw\\ & \lim_{s \to 0+} \int_{0}^{\infty}w^{s-1} \left(\cos(w) -\cos(\sqrt{w})\right) dw\\ =& \lim_{s \to 0+} \Gamma(s)\left[ \cos\left(\frac{\pi s}{2} \right) - \frac{\Gamma(1-s)}{\Gamma(1-2s)}\right]\\ =& \lim_{s \to 0+} \Gamma(s+1) \lim_{s \to 0+} \frac{\left[ \cos\left(\frac{\pi s}{2} \right) - \frac{\Gamma(1-s)}{\Gamma(1-2s)}\right]}{s}\\ =& \frac{ \lim_{s \to 0+} \frac{d}{ds} \left[\cos\left(\frac{\pi s}{2} \right) - \frac{\Gamma(1-s)}{\Gamma(1-2s)}\right]}{ \lim_{s \to 0+} \frac{d}{ds} s }\\ =& \lim_{s \to 0+}-\frac{1}{2}\sin\left(\frac{\pi s}{2}\right)+ \frac{\Gamma(1-s)}{\Gamma(1-2s)} \left(\psi(1-s)-2\psi(1-2s)\right)\\ =& \lim_{s \to 0+} \psi(1-s)-2\psi(1-2s)\\ =& -\psi(1)\\ =& \gamma \end{align*} Hence \[ \int_{0}^{\infty} \frac{\cos(w) -\cos(\sqrt{w}) }{w}dw = \gamma \] Therefore we can conclude \[ \int_{0}^{\infty} \frac{\cos(x^2)-\cos(x)}{x}dx = \frac{1}{2} \int_{0}^{\infty} \frac{\cos(w)-\cos(\sqrt{w})}{w}dw = \frac{\gamma}{2} \] \[\boxed{ \int_{0}^{\infty} \frac{\cos(x^2)-\cos(x)}{x}dx = \frac{\gamma}{2} }\]

Series of the day

Series involving the digamma and the zeta functions The sum $ \displaystyle \sum\frac{1}{(n+1)^pn^q}$ ...