Feynman's Trick

Evaluating a logarithmic Fresnel integral by differentiating under the integral sign

A factor of \(\ln x\) in an integrand can often be generated by differentiating a family of power integrals \(x^{s-1}\) with respect to the exponent \(s\). Combining this principle with the Mellin transform of \(\sin t\) proved in an earlier post, we will show that

\[ \int_0^\infty \frac{\sin\left(x^2\right)\ln(x)}{x}\,dx = -\frac{\gamma \pi}{8}, \]

where \(\gamma\) is the Euler-Mascheroni constant.

Reducing to a Mellin derivative

First, the substitution \(t = x^2\) (so that \(\frac{dx}{x} = \frac{dt}{2t}\) and \(\ln x = \frac{1}{2}\ln t\)) removes the quadratic argument inside the sine:

\[ \int_0^\infty \frac{\sin\left(x^2\right)\ln(x)}{x}\,dx = \frac{1}{4}\int_0^\infty \frac{\sin(t) \ln(t)}{t}\,dt. \tag{1} \]

Recall from our post on the Mellin transforms of sine and cosine that for \(s \in (-1, 1) \setminus \{0\}\),

\[ \int_0^\infty t^{s-1}\sin(t)\,dt = \sin\left(\frac{\pi s}{2}\right)\Gamma(s), \]

with removable singularity at \(s = 0\) matching the Dirichlet integral \(\frac{\pi}{2}\). Differentiating under the integral sign with respect to \(s\) at \(s = 0\) produces the logarithmic factor \(\ln t\):

\[ \begin{aligned} \int_0^\infty \frac{\sin(t)\ln(t)}{t}\,dt &= \lim_{s\to 0}\frac{d}{ds}\int_0^\infty t^{s-1} \sin(t)\,dt \\ &= \lim_{s\to 0} \frac{d}{ds}\left[\sin\left(\frac{\pi s}{2}\right) \Gamma(s)\right] \\ &= \lim_{s\to 0} \left[ \frac{\pi}{2}\cos\left(\frac{\pi s}{2}\right)\Gamma(s) + \sin\left(\frac{\pi s}{2}\right)\Gamma'(s)\right]. \end{aligned} \]

Taking the limit via Laurent expansions

Near \(s = 0\), the gamma function and its derivative have the Laurent expansions

\[ \Gamma(s) = \frac{1}{s} - \gamma + O(s), \qquad \Gamma'(s) = -\frac{1}{s^2} + \frac{6\gamma^2+\pi^2}{12} + O(s). \]

Substituting these into the limit gives

\[ \begin{aligned} \int_0^\infty \frac{\sin(t)\ln(t)}{t}\,dt &= \lim_{s\to 0} \left[ \frac{\pi}{2}\cos\left(\frac{\pi s}{2}\right)\left(\frac{1}{s}-\gamma+O(s) \right) + \sin\left(\frac{\pi s}{2}\right)\left(-\frac{1}{s^2}+\frac{6\gamma^2+\pi^2}{12}+O(s) \right) \right] \\ &= \lim_{s\to 0} \left[-\frac{\pi \gamma}{2} + \left( \frac{\pi}{2}\cos\left(\frac{\pi s}{2}\right) \frac{1}{s} - \sin\left(\frac{\pi s}{2}\right)\frac{1}{s^2}\right) + O(s)\right]. \end{aligned} \]

Using the Taylor series \(\cos\left(\frac{\pi s}{2}\right) = 1 - O(s^2)\) and \(\sin\left(\frac{\pi s}{2}\right) = \frac{\pi s}{2} - O(s^3)\), the singular \(1/s\) terms cancel identically:

\[ \frac{\pi}{2}\cos\left(\frac{\pi s}{2}\right) \frac{1}{s} - \sin\left(\frac{\pi s}{2}\right)\frac{1}{s^2} = \frac{\pi}{2s} - \frac{\pi}{2s} + O(s) = O(s). \]

Therefore,

\[ \int_0^\infty \frac{\sin(t)\ln(t)}{t}\,dt = -\frac{\pi \gamma}{2}. \tag{2} \]

A shortcut via \(\Gamma(s+1) = s\Gamma(s)\)

We can also see why the singular terms cancel without writing out the second-order Laurent coefficients by factoring \(\sin\left(\frac{\pi s}{2}\right)\Gamma(s)\) as

\[ \sin\left(\frac{\pi s}{2}\right)\Gamma(s) = \frac{\sin\left(\frac{\pi s}{2}\right)}{s}\Gamma(1+s). \]

Here \(g(s) = \frac{\sin(\pi s/2)}{s}\) is a smooth, even function with \(g(0) = \frac{\pi}{2}\) and \(g'(0) = 0\), while \(\Gamma(1) = 1\) and \(\Gamma'(1) = -\gamma\). Applying the product rule at \(s=0\) immediately yields \(g'(0)\Gamma(1) + g(0)\Gamma'(1) = -\frac{\pi\gamma}{2}\).

Substituting equation (2) into equation (1) completes the proof:

\[ \int_0^\infty \frac{\sin\left(x^2\right)\ln(x)}{x}\,dx = -\frac{\gamma \pi}{8}. \]
← All articles