Mellin transforms of sine and cosine via a quarter-circle contour
Rotating the positive real axis onto the positive imaginary axis turns the oscillatory factor \(e^{ix}\) into the rapidly decaying factor \(e^{-y}\), converting oscillatory improper integrals into Euler's gamma integral. Using this idea, we will establish the formulas
Contour integration for \(0 < s < 1\)
Let \(f(z) = z^{s-1} e^{iz}\), where \(0 < s < 1\) and the principal branch of the logarithm (\(-\pi < \arg z \leq \pi\)) defines \(z^{s-1} = e^{(s-1)\log z}\). We integrate \(f(z)\) around the positively oriented indented quarter-circle contour shown below, and then let \(R \to \infty\) and \(\epsilon \to 0^+\):
Here \(C_R\) and \(C_\epsilon\) are quarter-circles centered at \(z=0\) of radii \(R\) and \(\epsilon\), respectively, and \(C_\epsilon\) avoids the branch point at \(z=0\). Since \(f(z)\) is analytic inside and on the contour, Cauchy's integral theorem gives
On the vertical segment from \(iR\) down to \(i\epsilon\), parameterizing by \(z = iy\) (\(y \in [\epsilon, R]\), \(dz = i\,dy\)) and using \((iy)^{s-1} i = i^s y^{s-1} = e^{\frac{i\pi s}{2}} y^{s-1}\) gives
Bounding the circular arcs
On \(C_R\), parameterize \(z = R e^{i\theta}\) for \(0 \leq \theta \leq \frac{\pi}{2}\). Then \(\left|e^{i R e^{i\theta}}\right| = e^{-R\sin\theta}\), and by Jordan's inequality \(\sin\theta \geq \frac{2\theta}{\pi}\) on \(\left[0, \frac{\pi}{2}\right]\), we obtain
Since \(s < 1\), we have \(R^{s-1} \to 0\) as \(R \to \infty\), so
By the exact same estimate on \(C_\epsilon\) (or simply noting \(\left|e^{i\epsilon e^{i\theta}}\right| \leq 1\) so the integral is bounded by \(\frac{\pi}{2}\epsilon^s\)), the condition \(s > 0\) ensures that \(1 - e^{-\epsilon} = O(\epsilon)\) and hence
Combining equations (1), (2), (3), and (4) in the limits \(R \to \infty\) and \(\epsilon \to 0^+\) yields
Separating the imaginary and real parts gives, for \(0 < s < 1\),
Extending the sine integral to \(-1 < s \leq 0\)
Because \(\sin x = O(x)\) near \(x=0\), the sine integral \(I(s) = \int_0^\infty x^{s-1} \sin(x)\,dx\) converges on the wider strip \(-1 < s < 1\). We have already proved that \(I(s) = \sin\left(\frac{\pi s}{2}\right)\Gamma(s)\) for \(0 < s < 1\).
Now suppose \(-1 < s < 0\). Integrating by parts with \(u = \sin x\) and \(dv = x^{s-1}\,dx\) gives
At the upper limit \(x \to \infty\), \(|x^s \sin x| \leq x^s \to 0\) because \(s < 0\); at the lower limit \(x \to 0^+\), \(x^s \sin x \sim x^{s+1} \to 0\) because \(s > -1\). Moreover, since \(0 < s+1 < 1\), we can apply equation (6) with \(s+1\) in place of \(s\), together with the functional equation \(\Gamma(s+1) = s\Gamma(s)\):
Finally, the case \(s=0\) is the classic Dirichlet integral
which matches the removable singularity of \(\sin\left(\frac{\pi s}{2}\right)\Gamma(s)\) at \(s=0\):
In a companion post, we differentiate this identity at \(s=0\) to evaluate a logarithmic Fresnel integral.