<?xml version="1.0" encoding="utf-8"?>
<feed xmlns="http://www.w3.org/2005/Atom"><title>Integrals and Series</title><link href="https://integralsandseries.in/" rel="alternate"/><link href="https://integralsandseries.in/feeds/all.atom.xml" rel="self"/><id>https://integralsandseries.in/</id><updated>2026-10-24T10:12:00+05:30</updated><subtitle>Notes on integrals, infinite series, and number theory</subtitle><entry><title>Lobachevsky-type logarithmic integrals via partial-fraction series</title><link href="https://integralsandseries.in/2026/10/24/lobachevsky-type-logarithmic-integrals-via-partial-fraction-series/" rel="alternate"/><published>2026-10-24T10:12:00+05:30</published><updated>2026-10-24T10:12:00+05:30</updated><author><name>Shobhit Bhatnagar</name></author><id>tag:integralsandseries.in,2026-10-24:/2026/10/24/lobachevsky-type-logarithmic-integrals-via-partial-fraction-series/</id><summary type="html">&lt;p&gt;Periodizing improper integrals via the partial-fraction expansion of cosecant squared reduces trigonometric-logarithmic integrals on the half-line to finite intervals.&lt;/p&gt;</summary><content type="html">&lt;p&gt;Whenever an even, &lt;span class="arithmatex"&gt;\(\pi\)&lt;/span&gt;-periodic function &lt;span class="arithmatex"&gt;\(f(t)\)&lt;/span&gt; is integrated against &lt;span class="arithmatex"&gt;\(\frac{1}{t^2}\)&lt;/span&gt; over the entire real line, splitting &lt;span class="arithmatex"&gt;\(\mathbb{R}\)&lt;/span&gt; into intervals of length &lt;span class="arithmatex"&gt;\(\pi\)&lt;/span&gt; and summing the translates &lt;span class="arithmatex"&gt;\(\frac{1}{(t+n\pi)^2}\)&lt;/span&gt; folds the integral onto &lt;span class="arithmatex"&gt;\(\left[0, \frac{\pi}{2}\right]\)&lt;/span&gt;. We will use this Lobachevsky periodization method to prove that for &lt;span class="arithmatex"&gt;\(|a| &amp;lt; 1\)&lt;/span&gt; and &lt;span class="arithmatex"&gt;\(b &amp;gt; 0\)&lt;/span&gt;,&lt;/p&gt;
&lt;div class="arithmatex"&gt;\[
\int_{0}^{\infty} \ln \left(\frac{1+a \sin^{2} (bx)}{1-a \sin^{2} (bx)} \right) \frac{1}{x^{2}}\,dx = \pi b \left( \sqrt{1+a} - \sqrt{1-a} \right),
\]&lt;/div&gt;
&lt;p&gt;and then record three related consequences.&lt;/p&gt;
&lt;h2&gt;Folding the real line onto &lt;span class="arithmatex"&gt;\(\left[0, \frac{\pi}{2}\right]\)&lt;/span&gt;&lt;/h2&gt;
&lt;p&gt;We make use of Euler's partial-fraction expansion for the squared cosecant:&lt;/p&gt;
&lt;div class="arithmatex"&gt;\[
\sum_{n=-\infty}^\infty \frac{1}{(t+n\pi)^2} = \frac{1}{\sin^2 (t)}.
\]&lt;/div&gt;
&lt;p&gt;Let &lt;span class="arithmatex"&gt;\(I\)&lt;/span&gt; denote the target integral. Using the evenness of the integrand and substituting &lt;span class="arithmatex"&gt;\(t = bx\)&lt;/span&gt;, we decompose &lt;span class="arithmatex"&gt;\(\mathbb{R}\)&lt;/span&gt; into the intervals &lt;span class="arithmatex"&gt;\(\left[n\pi - \frac{\pi}{2}, n\pi + \frac{\pi}{2}\right]\)&lt;/span&gt; for &lt;span class="arithmatex"&gt;\(n \in \mathbb{Z}\)&lt;/span&gt;:&lt;/p&gt;
&lt;div class="arithmatex"&gt;\[
\begin{aligned}
I &amp;amp;= \frac{1}{2}\int_{-\infty}^\infty \ln \left(\frac{1+a \sin^{2} (bx)}{1-a \sin^{2} (bx)} \right)\frac{1}{x^2}\,dx \\
&amp;amp;= \frac{b}{2}\int_{-\infty}^\infty \ln \left(\frac{1+a \sin^{2} (t)}{1-a \sin^{2} (t)} \right)\frac{1}{t^2}\,dt \quad (t=bx) \\
&amp;amp;= \frac{b}{2}\sum_{n=-\infty}^\infty \int_{n\pi - \frac{\pi}{2}}^{n\pi + \frac{\pi}{2}} \ln \left(\frac{1+a \sin^{2} (t)}{1-a \sin^{2} (t)} \right)\frac{1}{t^2}\,dt \\
&amp;amp;= \frac{b}{2}\sum_{n=-\infty}^\infty \int_{-\frac{\pi}{2}}^{\frac{\pi}{2}} \ln \left(\frac{1+a \sin^{2} (t)}{1-a \sin^{2} (t)} \right)\frac{1}{(t+n\pi)^2}\,dt \\
&amp;amp;= \frac{b}{2} \int_{-\frac{\pi}{2}}^{\frac{\pi}{2}} \ln \left(\frac{1+a \sin^{2} (t)}{1-a \sin^{2} (t)} \right)\left( \sum_{n=-\infty}^\infty \frac{1}{(t+n\pi)^2} \right) dt \\
&amp;amp;= \frac{b}{2} \int_{-\frac{\pi}{2}}^{\frac{\pi}{2}} \ln \left(\frac{1+a \sin^{2} (t)}{1-a \sin^{2} (t)} \right)\frac{1}{\sin^2(t)}\,dt \\
&amp;amp;= b \int_0^{\frac{\pi}{2}} \ln \left(\frac{1+a \sin^{2} (t)}{1-a \sin^{2} (t)} \right)\frac{1}{\sin^2(t)}\,dt.
\end{aligned}
\]&lt;/div&gt;
&lt;h2&gt;Expanding in a power series in &lt;span class="arithmatex"&gt;\(a\)&lt;/span&gt;&lt;/h2&gt;
&lt;p&gt;For &lt;span class="arithmatex"&gt;\(|a| &amp;lt; 1\)&lt;/span&gt;, expand the logarithm using &lt;span class="arithmatex"&gt;\(\ln\left(\frac{1+u}{1-u}\right) = 2\sum_{k=0}^\infty \frac{u^{2k+1}}{2k+1}\)&lt;/span&gt; with &lt;span class="arithmatex"&gt;\(u = a\sin^2 t\)&lt;/span&gt;, and apply Wallis's formula &lt;span class="arithmatex"&gt;\(\int_0^{\pi/2} \sin^{2m}(t)\,dt = \frac{\pi}{2}\frac{1}{2^{2m}}\binom{2m}{m}\)&lt;/span&gt; with &lt;span class="arithmatex"&gt;\(m = 2k\)&lt;/span&gt;:&lt;/p&gt;
&lt;div class="arithmatex"&gt;\[
\begin{aligned}
I &amp;amp;= 2b \int_0^{\frac{\pi}{2}}\left(\sum_{k=0}^\infty \frac{a^{2k+1}\sin^{4k+2}(t)}{2k+1} \right)\frac{1}{\sin^2(t)}\,dt \\
&amp;amp;= 2b\sum_{k=0}^\infty \frac{a^{2k+1}}{2k+1} \int_0^{\frac{\pi}{2}} \sin^{4k}(t)\,dt \\
&amp;amp;= \pi b\sum_{k=0}^\infty \frac{a^{2k+1}}{(2k+1) 2^{4k}} \binom{4k}{2k}.
\end{aligned}
\]&lt;/div&gt;
&lt;p&gt;To sum this series in closed form, recall the binomial expansion &lt;span class="arithmatex"&gt;\((1-u)^{-1/2} = \sum_{n=0}^\infty \frac{1}{2^{2n}}\binom{2n}{n}u^n\)&lt;/span&gt;. Taking the even part in &lt;span class="arithmatex"&gt;\(u\)&lt;/span&gt; gives&lt;/p&gt;
&lt;div class="arithmatex"&gt;\[
\frac{(1-u)^{-1/2} + (1+u)^{-1/2}}{2} = \sum_{k=0}^\infty \frac{u^{2k}}{2^{4k}}\binom{4k}{2k},
\]&lt;/div&gt;
&lt;p&gt;and integrating both sides from &lt;span class="arithmatex"&gt;\(u = 0\)&lt;/span&gt; to &lt;span class="arithmatex"&gt;\(u = a\)&lt;/span&gt; produces&lt;/p&gt;
&lt;div class="arithmatex"&gt;\[
\sum_{k=0}^\infty \frac{a^{2k+1}}{(2k+1) 2^{4k}} \binom{4k}{2k} = \int_0^a \frac{(1-u)^{-1/2} + (1+u)^{-1/2}}{2}\,du = \sqrt{1+a} - \sqrt{1-a}.
\]&lt;/div&gt;
&lt;p&gt;Therefore,&lt;/p&gt;
&lt;div class="arithmatex"&gt;\[
I = \pi b \left( \sqrt{1+a}-\sqrt{1-a}\right).
\]&lt;/div&gt;
&lt;h2&gt;Three companion identities&lt;/h2&gt;
&lt;ol&gt;
&lt;li&gt;&lt;strong&gt;A first-order Lobachevsky integral:&lt;/strong&gt; Using the partial-fraction expansion &lt;span class="arithmatex"&gt;\(\sum_{n=-\infty}^\infty \frac{(-1)^n}{t+n\pi} = \frac{1}{\sin t}\)&lt;/span&gt; in the same manner shows that for &lt;span class="arithmatex"&gt;\(|a| &amp;lt; 1\)&lt;/span&gt; and &lt;span class="arithmatex"&gt;\(b &amp;gt; 0\)&lt;/span&gt;,&lt;/li&gt;
&lt;/ol&gt;
&lt;div class="arithmatex"&gt;\[
\int_{0}^{\infty} \ln \left( \frac{1+a \sin(bx)}{1-a \sin(bx)} \right) \frac{dx}{x} = \pi \arcsin(a).
\]&lt;/div&gt;
&lt;ol&gt;
&lt;li&gt;&lt;strong&gt;A dilogarithm integral:&lt;/strong&gt; Dividing the identity above (with &lt;span class="arithmatex"&gt;\(b=1\)&lt;/span&gt;) by &lt;span class="arithmatex"&gt;\(a\)&lt;/span&gt; and integrating both sides from &lt;span class="arithmatex"&gt;\(a=0\)&lt;/span&gt; to &lt;span class="arithmatex"&gt;\(a=\frac{1}{\sqrt{2}}\)&lt;/span&gt; using &lt;span class="arithmatex"&gt;\(\int_0^z \ln\left(\frac{1+u}{1-u}\right)\frac{du}{u} = \operatorname{Li}_2(-z) - \operatorname{Li}_2(z)\)&lt;/span&gt; yields&lt;/li&gt;
&lt;/ol&gt;
&lt;div class="arithmatex"&gt;\[
\int_0^\infty \frac{\operatorname{Li}_2\left(\frac{\sin x}{\sqrt{2}}\right)-\operatorname{Li}_2\left(-\frac{\sin x}{\sqrt{2}}\right)}{x}\,dx = \pi\int_0^{\frac{1}{\sqrt{2}}}\frac{\arcsin(a)}{a}\,da = \frac{\pi G}{2}+\frac{\pi^2 \ln(2)}{8},
\]&lt;/div&gt;
&lt;p&gt;where &lt;span class="arithmatex"&gt;\(G\)&lt;/span&gt; is Catalan's constant (since substituting &lt;span class="arithmatex"&gt;\(a = \sin\theta\)&lt;/span&gt; and integrating by parts reduces &lt;span class="arithmatex"&gt;\(\int_0^{1/\sqrt{2}}\frac{\arcsin a}{a}\,da\)&lt;/span&gt; to &lt;span class="arithmatex"&gt;\(\frac{\pi}{8}\ln 2 + \frac{G}{2}\)&lt;/span&gt;).&lt;/p&gt;
&lt;ol&gt;
&lt;li&gt;&lt;strong&gt;Reducing an improper squared-arctangent integral:&lt;/strong&gt; Applying the same &lt;span class="arithmatex"&gt;\(\sum_{n=-\infty}^\infty \frac{1}{(x+n\pi)^2} = \frac{1}{\sin^2 x}\)&lt;/span&gt; reduction to &lt;span class="arithmatex"&gt;\(f(x) = \arctan^2(\sin^2 x)\)&lt;/span&gt; shows that &lt;span class="arithmatex"&gt;\(\int_0^\infty \frac{\arctan^2(\sin^2 x)}{x^2}\,dx = \int_0^{\pi/2} \frac{\arctan^2(\sin^2 x)}{\sin^2 x}\,dx\)&lt;/span&gt;. By &lt;a href="https://integralsandseries.in/2026/10/24/an-integral-involving-the-squared-arctangent-of-sine-squared/"&gt;our earlier evaluation of that trigonometric integral&lt;/a&gt;, we immediately obtain&lt;/li&gt;
&lt;/ol&gt;
&lt;div class="arithmatex"&gt;\[
\int_0^\infty \frac{\arctan^2 (\sin^2 x)}{x^2}\,dx = \pi \log\left(\frac{2+\sqrt{2}}{4}\right)\sqrt{\frac{\sqrt{2}+1}{2}}+\frac{\pi^2}{4} \sqrt{\frac{\sqrt{2}-1}{2}}.
\]&lt;/div&gt;</content><category term="Logarithmic Integrals"/><category term="logarithmic-integrals"/><category term="fourier-series"/><category term="catalans-constant"/><category term="polylogarithm"/><category term="trigonometric-integrals"/></entry><entry><title>A difference of arctangent integrals and dilogarithm identities</title><link href="https://integralsandseries.in/2026/10/24/a-difference-of-arctangent-integrals-and-dilogarithm-identities/" rel="alternate"/><published>2026-10-24T10:11:00+05:30</published><updated>2026-10-24T10:11:00+05:30</updated><author><name>Shobhit Bhatnagar</name></author><id>tag:integralsandseries.in,2026-10-24:/2026/10/24/a-difference-of-arctangent-integrals-and-dilogarithm-identities/</id><summary type="html">&lt;p&gt;Poisson-kernel series expansions and two-variable dilogarithm relations evaluate a difference of arctangent integrals.&lt;/p&gt;</summary><content type="html">&lt;p&gt;In this post we use Poisson-kernel Fourier series and two-variable dilogarithm identities to prove the identity&lt;/p&gt;
&lt;div class="arithmatex"&gt;\[
\int_{\frac{\pi}{4}}^{\frac{\pi}{2}} \arctan\left(\sqrt{3}\tan\theta\right)\,d\theta - \int_{0}^{\frac{\pi}{6}} \arctan\left(\sqrt{3}\tan\theta\right)\,d\theta = \frac{\pi^2}{12},
\]&lt;/div&gt;
&lt;p&gt;and then derive an additional dilogarithm relation at &lt;span class="arithmatex"&gt;\(\rho = 2-\sqrt{3}\)&lt;/span&gt; from Hill's two-variable functional equation.&lt;/p&gt;
&lt;h2&gt;Expanding a parameterized integral in a Fourier series&lt;/h2&gt;
&lt;p&gt;Let &lt;span class="arithmatex"&gt;\(I\)&lt;/span&gt; denote the expression on the left-hand side. The substitution &lt;span class="arithmatex"&gt;\(\sqrt{3}\tan \theta = \tan \varphi\)&lt;/span&gt; (so &lt;span class="arithmatex"&gt;\(\sqrt{3}\sec^2\theta\,d\theta = \sec^2\varphi\,d\varphi\)&lt;/span&gt;, which simplifies to &lt;span class="arithmatex"&gt;\(d\theta = \frac{\sqrt{3}}{2}\frac{d\varphi}{1+\frac{1}{2}\cos(2\varphi)}\)&lt;/span&gt;) transforms &lt;span class="arithmatex"&gt;\(I\)&lt;/span&gt; into&lt;/p&gt;
&lt;div class="arithmatex"&gt;\[
I = \frac{\sqrt{3}}{2}\left( \int_{\frac{\pi}{3}}^{\frac{\pi}{2}}\frac{\varphi}{1+\frac{1}{2}\cos(2\varphi)}\,d\varphi - \int_{0}^{\frac{\pi}{4}}\frac{\varphi}{1+\frac{1}{2}\cos(2\varphi)}\,d\varphi \right).
\]&lt;/div&gt;
&lt;p&gt;For &lt;span class="arithmatex"&gt;\(0 \leq \phi \leq \frac{\pi}{2}\)&lt;/span&gt;, consider the generalized integral&lt;/p&gt;
&lt;div class="arithmatex"&gt;\[
I(\phi) = \frac{\sqrt{3}}{2}\int_{0}^{\phi}\frac{\varphi}{1+\frac{1}{2}\cos(2\varphi)}\,d\varphi.
\]&lt;/div&gt;
&lt;p&gt;Using the Poisson kernel identity&lt;/p&gt;
&lt;div class="arithmatex"&gt;\[
1+2\sum_{k=1}^\infty x^k \cos(k\theta) = \frac{1-x^2}{1-2x\cos(\theta) + x^2}, \qquad |x|&amp;lt;1,
\]&lt;/div&gt;
&lt;p&gt;with &lt;span class="arithmatex"&gt;\(x = -\rho\)&lt;/span&gt;, where &lt;span class="arithmatex"&gt;\(\rho = 2-\sqrt{3} = \tan\left(\frac{\pi}{12}\right)\)&lt;/span&gt; satisfies &lt;span class="arithmatex"&gt;\(\frac{2\rho}{1+\rho^2} = \frac{1}{2}\)&lt;/span&gt; and &lt;span class="arithmatex"&gt;\(\frac{1-\rho^2}{1+\rho^2} = \frac{\sqrt{3}}{2}\)&lt;/span&gt;, we deduce that&lt;/p&gt;
&lt;div class="arithmatex"&gt;\[
\frac{1}{1+\frac{1}{2}\cos(2\varphi)} = \frac{2}{\sqrt{3}}\left(1+2\sum_{k=1}^\infty (-1)^k \rho^k \cos(2k\varphi) \right).
\]&lt;/div&gt;
&lt;p&gt;Integrating term by term on &lt;span class="arithmatex"&gt;\([0, \phi]\)&lt;/span&gt; using integration by parts gives&lt;/p&gt;
&lt;div class="arithmatex"&gt;\[
\begin{aligned}
I(\phi) &amp;amp;= \int_0^\phi \varphi \left( 1+2\sum_{k=1}^\infty (-1)^k \rho^k \cos(2k\varphi) \right)d\varphi \\
&amp;amp;= \frac{\phi^2}{2} + 2\sum_{k=1}^\infty (-1)^k \rho^k \int_0^\phi \varphi \cos(2k\varphi)\,d\varphi \\
&amp;amp;= \frac{\phi^2}{2} + 2\sum_{k=1}^\infty (-1)^k \rho^k \left[\frac{\phi \sin(2k\phi)}{2k}-\frac{1-\cos(2k\phi)}{4k^2} \right] \\
&amp;amp;= \frac{\phi^2}{2} - \phi \sum_{k=1}^\infty (-1)^{k+1}\frac{\rho^k\sin(2k\phi)}{k} + \frac{1}{2}\sum_{k=1}^\infty (-1)^{k+1} \frac{1-\cos(2k\phi)}{k^2}\rho^k \\
&amp;amp;= \frac{\phi^2}{2} - \phi \arctan\left(\frac{\rho \sin(2\phi)}{1+\rho\cos(2\phi)} \right) + \frac{1}{2}\sum_{k=1}^\infty (-1)^{k+1} \frac{1-\cos(2k\phi)}{k^2}\rho^k,
\end{aligned} \tag{1}
\]&lt;/div&gt;
&lt;p&gt;where the last step uses the Fourier sine series&lt;/p&gt;
&lt;div class="arithmatex"&gt;\[
\sum_{k=1}^\infty (-1)^{k+1}\frac{x^k}{k}\sin(k\theta) = \arctan\left(\frac{x \sin(\theta)}{1+x\cos(\theta)}\right), \qquad |x| \leq 1.
\]&lt;/div&gt;
&lt;h2&gt;Evaluating &lt;span class="arithmatex"&gt;\(I(\phi)\)&lt;/span&gt; at &lt;span class="arithmatex"&gt;\(\frac{\pi}{2}\)&lt;/span&gt;, &lt;span class="arithmatex"&gt;\(\frac{\pi}{3}\)&lt;/span&gt;, and &lt;span class="arithmatex"&gt;\(\frac{\pi}{4}\)&lt;/span&gt;&lt;/h2&gt;
&lt;p&gt;Recall the dilogarithm &lt;span class="arithmatex"&gt;\(\operatorname{Li}_2(z) = \sum_{k=1}^\infty \frac{z^k}{k^2}\)&lt;/span&gt; and Legendre's chi function&lt;/p&gt;
&lt;div class="arithmatex"&gt;\[
\chi_2(z) = \sum_{k=0}^\infty \frac{z^{2k+1}}{(2k+1)^2} = \frac{1}{2}\bigl(\operatorname{Li}_2(z) - \operatorname{Li}_2(-z)\bigr) = \operatorname{Li}_2(z) - \frac{1}{4}\operatorname{Li}_2(z^2),
\]&lt;/div&gt;
&lt;p&gt;where the last equality follows from the duplication identity &lt;span class="arithmatex"&gt;\(\operatorname{Li}_2(z) + \operatorname{Li}_2(-z) = \frac{1}{2}\operatorname{Li}_2(z^2)\)&lt;/span&gt;. Using &lt;span class="arithmatex"&gt;\(\rho = 2-\sqrt{3} = \tan\left(\frac{\pi}{12}\right)\)&lt;/span&gt;, we evaluate equation (1) at our three angles:&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;At &lt;span class="arithmatex"&gt;\(\phi = \frac{\pi}{2}\)&lt;/span&gt;: &lt;span class="arithmatex"&gt;\(\sin(\pi) = 0\)&lt;/span&gt; and &lt;span class="arithmatex"&gt;\(1-\cos(k\pi)\)&lt;/span&gt; is &lt;span class="arithmatex"&gt;\(2\)&lt;/span&gt; for odd &lt;span class="arithmatex"&gt;\(k\)&lt;/span&gt; and &lt;span class="arithmatex"&gt;\(0\)&lt;/span&gt; for even &lt;span class="arithmatex"&gt;\(k\)&lt;/span&gt;, so&lt;/li&gt;
&lt;/ul&gt;
&lt;div class="arithmatex"&gt;\[
I\left(\frac{\pi}{2}\right) = \frac{\pi^2}{8}+\chi_2(\rho). \tag{2}
\]&lt;/div&gt;
&lt;ul&gt;
&lt;li&gt;At &lt;span class="arithmatex"&gt;\(\phi = \frac{\pi}{3}\)&lt;/span&gt;: &lt;span class="arithmatex"&gt;\(\frac{\rho\sin(2\pi/3)}{1+\rho\cos(2\pi/3)} = \frac{(2-\sqrt{3})\frac{\sqrt{3}}{2}}{1 - \frac{2-\sqrt{3}}{2}} = 2-\sqrt{3} = \tan\left(\frac{\pi}{12}\right)\)&lt;/span&gt;, so the arctangent equals &lt;span class="arithmatex"&gt;\(\frac{\pi}{12}\)&lt;/span&gt; and &lt;span class="arithmatex"&gt;\(\frac{\phi^2}{2} - \phi\frac{\pi}{12} = \frac{\pi^2}{36}\)&lt;/span&gt;. For the cosine sum, &lt;span class="arithmatex"&gt;\(1-\cos\left(\frac{2k\pi}{3}\right)\)&lt;/span&gt; equals &lt;span class="arithmatex"&gt;\(\frac{3}{2}\)&lt;/span&gt; when &lt;span class="arithmatex"&gt;\(3 \nmid k\)&lt;/span&gt; and &lt;span class="arithmatex"&gt;\(0\)&lt;/span&gt; when &lt;span class="arithmatex"&gt;\(3 \mid k\)&lt;/span&gt;, giving&lt;/li&gt;
&lt;/ul&gt;
&lt;div class="arithmatex"&gt;\[
I\left(\frac{\pi}{3}\right) = \frac{\pi^2}{36}+\frac{1}{12}\operatorname{Li}_2\left(-\rho^3\right) -\frac{3}{4}\operatorname{Li}_2(-\rho). \tag{3}
\]&lt;/div&gt;
&lt;ul&gt;
&lt;li&gt;At &lt;span class="arithmatex"&gt;\(\phi = \frac{\pi}{4}\)&lt;/span&gt;: &lt;span class="arithmatex"&gt;\(\frac{\rho\sin(\pi/2)}{1+\rho\cos(\pi/2)} = \rho = \tan\left(\frac{\pi}{12}\right)\)&lt;/span&gt;, so &lt;span class="arithmatex"&gt;\(\frac{\phi^2}{2} - \phi\frac{\pi}{12} = \frac{\pi^2}{96}\)&lt;/span&gt;, while separating odd and even &lt;span class="arithmatex"&gt;\(k\)&lt;/span&gt; in &lt;span class="arithmatex"&gt;\(1-\cos\left(\frac{k\pi}{2}\right)\)&lt;/span&gt; gives&lt;/li&gt;
&lt;/ul&gt;
&lt;div class="arithmatex"&gt;\[
I\left(\frac{\pi}{4}\right) = \frac{\pi^2}{96}+\frac{1}{2}\chi_2(\rho)-\frac{1}{4}\chi_2\left(\rho^2\right). \tag{4}
\]&lt;/div&gt;
&lt;p&gt;Expanding &lt;span class="arithmatex"&gt;\(\chi_2\)&lt;/span&gt; and &lt;span class="arithmatex"&gt;\(\operatorname{Li}_2(-z)\)&lt;/span&gt; in terms of &lt;span class="arithmatex"&gt;\(\operatorname{Li}_2\)&lt;/span&gt; at positive powers of &lt;span class="arithmatex"&gt;\(\rho\)&lt;/span&gt; via &lt;span class="arithmatex"&gt;\(\operatorname{Li}_2(-z) = \frac{1}{2}\operatorname{Li}_2(z^2) - \operatorname{Li}_2(z)\)&lt;/span&gt;, we obtain&lt;/p&gt;
&lt;div class="arithmatex"&gt;\[
\begin{aligned}
I &amp;amp;= I\left(\frac{\pi}{2}\right)-I\left(\frac{\pi}{3}\right)-I\left(\frac{\pi}{4}\right) \\
&amp;amp;= \frac{25\pi^2}{288} + \left[-\frac{1}{4}\operatorname{Li}_2(\rho)+\frac{1}{2}\operatorname{Li}_2(\rho^2)+\frac{1}{12}\operatorname{Li}_2(\rho^3)-\frac{1}{16}\operatorname{Li}_2(\rho^4)-\frac{1}{24}\operatorname{Li}_2(\rho^6) \right].
\end{aligned} \tag{5}
\]&lt;/div&gt;
&lt;h2&gt;Completing the proof with dilogarithm identities&lt;/h2&gt;
&lt;p&gt;To show that &lt;span class="arithmatex"&gt;\(I = \frac{\pi^2}{12}\)&lt;/span&gt;, it remains to prove that&lt;/p&gt;
&lt;div class="arithmatex"&gt;\[
-\frac{1}{4}\operatorname{Li}_2(\rho)+\frac{1}{2}\operatorname{Li}_2(\rho^2)+\frac{1}{12}\operatorname{Li}_2(\rho^3)-\frac{1}{16}\operatorname{Li}_2(\rho^4)-\frac{1}{24}\operatorname{Li}_2(\rho^6) = -\frac{\pi^2}{288}. \tag{6}
\]&lt;/div&gt;
&lt;p&gt;Let &lt;span class="arithmatex"&gt;\(\operatorname{Li}_2(x,\theta) = \operatorname{Re}\operatorname{Li}_2(xe^{i\theta})\)&lt;/span&gt;. We use two classic identities from Lewin's &lt;em&gt;Polylogarithms and Associated Functions&lt;/em&gt;:&lt;/p&gt;
&lt;div class="arithmatex"&gt;\[
\begin{aligned}
\operatorname{Li}_2 \left(\tan a, \frac{\pi}{2}-2a \right) &amp;amp;= a^2 +\frac{3}{4}\operatorname{Li}_2(\tan^2 a) -\frac{1}{8}\operatorname{Li}_2(\tan^4 a), \\
\operatorname{Li}_2\left(x,\frac{\pi}{3}\right) &amp;amp;= \frac{1}{6} \operatorname{Li}_2(-x^3) -\frac{1}{2}\operatorname{Li}_2(-x).
\end{aligned}
\]&lt;/div&gt;
&lt;p&gt;Setting &lt;span class="arithmatex"&gt;\(a = \frac{\pi}{12}\)&lt;/span&gt; and &lt;span class="arithmatex"&gt;\(x = \tan\left(\frac{\pi}{12}\right) = \rho\)&lt;/span&gt; makes the left-hand sides of both identities equal to &lt;span class="arithmatex"&gt;\(\operatorname{Li}_2\left(\rho, \frac{\pi}{3}\right)\)&lt;/span&gt;. Equating their right-hand sides and expanding &lt;span class="arithmatex"&gt;\(\operatorname{Li}_2(-\rho)\)&lt;/span&gt; and &lt;span class="arithmatex"&gt;\(\operatorname{Li}_2(-\rho^3)\)&lt;/span&gt; via the duplication formula gives&lt;/p&gt;
&lt;div class="arithmatex"&gt;\[
\begin{aligned}
\frac{1}{6}\operatorname{Li}_2(-\rho^3)-\frac{1}{2}\operatorname{Li}_2(-\rho) &amp;amp;= \frac{\pi^2}{144} + \frac{3}{4}\operatorname{Li}_2(\rho^2)-\frac{1}{8}\operatorname{Li}_2(\rho^4) \\
\implies \frac{1}{12}\operatorname{Li}_2(\rho^6)-\frac{1}{6}\operatorname{Li}_2(\rho^3) -\frac{1}{4}\operatorname{Li}_2(\rho^2) +\frac{1}{2} \operatorname{Li}_2(\rho) &amp;amp;= \frac{\pi^2}{144} + \frac{3}{4}\operatorname{Li}_2(\rho^2)-\frac{1}{8}\operatorname{Li}_2(\rho^4).
\end{aligned} \tag{7}
\]&lt;/div&gt;
&lt;p&gt;Dividing equation (7) by &lt;span class="arithmatex"&gt;\(-2\)&lt;/span&gt; and rearranging terms immediately produces equation (6), completing the proof that &lt;span class="arithmatex"&gt;\(I = \frac{\pi^2}{12}\)&lt;/span&gt;.&lt;/p&gt;
&lt;h2&gt;Bonus: An identity from Hill's two-variable relation&lt;/h2&gt;
&lt;p&gt;Another attractive dilogarithm identity at &lt;span class="arithmatex"&gt;\(\rho = 2-\sqrt{3}\)&lt;/span&gt; follows from Hill's two-variable relation:&lt;/p&gt;
&lt;div class="arithmatex"&gt;\[
\operatorname{Li}_2(xy) = \operatorname{Li}_2(x) + \operatorname{Li}_2(y) + \operatorname{Li}_2\left(-x\left(\frac{1-y}{1-x}\right) \right)+\operatorname{Li}_2\left(-y\left(\frac{1-x}{1-y}\right)\right)+\frac{1}{2}\log^2\left(\frac{1-x}{1-y}\right).
\]&lt;/div&gt;
&lt;p&gt;Substitute &lt;span class="arithmatex"&gt;\(x = -y = e^{-i\frac{\pi}{4}}\frac{\sqrt{3}-1}{\sqrt{2}}\)&lt;/span&gt;. Then &lt;span class="arithmatex"&gt;\(\frac{1-x}{1+x} = ix = e^{i\frac{\pi}{4}}\frac{\sqrt{3}-1}{\sqrt{2}}\)&lt;/span&gt; and &lt;span class="arithmatex"&gt;\(ix^2 = \rho\)&lt;/span&gt;, so&lt;/p&gt;
&lt;div class="arithmatex"&gt;\[
\begin{aligned}
\operatorname{Li}_2(-x^2) &amp;amp;= \operatorname{Li}_2(x) + \operatorname{Li}_2(-x) + \operatorname{Li}_2(i)+\operatorname{Li}_2(ix^2)+\frac{1}{2}\log^2(ix) \\
\implies \operatorname{Li}_2(i\rho) &amp;amp;= \frac{1}{2}\operatorname{Li}_2(-i\rho)+ \operatorname{Li}_2(i) + \operatorname{Li}_2(\rho) +\frac{1}{2}\log^2\left(e^{i\frac{\pi}{4}}\frac{\sqrt{3}-1}{\sqrt{2}} \right).
\end{aligned}
\]&lt;/div&gt;
&lt;p&gt;Using &lt;span class="arithmatex"&gt;\(\operatorname{Re}\operatorname{Li}_2(\pm i\rho) = \frac{1}{4}\operatorname{Li}_2(-\rho^2) = \frac{1}{8}\operatorname{Li}_2(\rho^4) - \frac{1}{4}\operatorname{Li}_2(\rho^2)\)&lt;/span&gt;, &lt;span class="arithmatex"&gt;\(\operatorname{Re}\operatorname{Li}_2(i) = -\frac{\pi^2}{48}\)&lt;/span&gt;, and &lt;span class="arithmatex"&gt;\(\frac{\sqrt{3}-1}{\sqrt{2}} = \sqrt{\rho}\)&lt;/span&gt;, extracting the real part of the above equation yields&lt;/p&gt;
&lt;div class="arithmatex"&gt;\[
\frac{\operatorname{Li}_2(\rho^4)}{16}-\frac{\operatorname{Li}_2(\rho^2)}{8} -\operatorname{Li}_2(\rho) = -\frac{5\pi^2}{96}+\frac{1}{8}\log^2(\rho).
\]&lt;/div&gt;</content><category term="Logarithmic Integrals"/><category term="logarithmic-integrals"/><category term="polylogarithm"/><category term="fourier-series"/><category term="trigonometric-integrals"/></entry><entry><title>The inverse tangent integral at two minus root three</title><link href="https://integralsandseries.in/2026/10/24/the-inverse-tangent-integral-at-tan-pi-over-12/" rel="alternate"/><published>2026-10-24T10:10:00+05:30</published><updated>2026-10-24T10:10:00+05:30</updated><author><name>Shobhit Bhatnagar</name></author><id>tag:integralsandseries.in,2026-10-24:/2026/10/24/the-inverse-tangent-integral-at-tan-pi-over-12/</id><summary type="html">&lt;p&gt;Integration by parts and the Fourier series of log tangent evaluate the inverse tangent integral at tan(pi/12) in terms of Catalan's constant.&lt;/p&gt;</summary><content type="html">&lt;p&gt;The inverse tangent integral &lt;span class="arithmatex"&gt;\(\operatorname{Ti}_2(z) = \int_0^z \frac{\arctan x}{x}\,dx\)&lt;/span&gt; equals Catalan's constant &lt;span class="arithmatex"&gt;\(G = \sum_{k=0}^\infty \frac{(-1)^k}{(2k+1)^2}\)&lt;/span&gt; at &lt;span class="arithmatex"&gt;\(z = 1 = \tan\left(\frac{\pi}{4}\right)\)&lt;/span&gt;. At the half-angle argument &lt;span class="arithmatex"&gt;\(z = 2-\sqrt{3} = \tan\left(\frac{\pi}{12}\right)\)&lt;/span&gt;, it satisfies a remarkable closed-form relation discovered by Ramanujan:&lt;/p&gt;
&lt;div class="arithmatex"&gt;\[
\int_0^{2-\sqrt{3}}\frac{\arctan(x)}{x}\,dx = \frac{\pi}{12}\ln\left(2-\sqrt{3}\right) + \frac{2}{3}G.
\]&lt;/div&gt;
&lt;h2&gt;Integration by parts and the Fourier series of &lt;span class="arithmatex"&gt;\(\ln(\tan\theta)\)&lt;/span&gt;&lt;/h2&gt;
&lt;p&gt;Let &lt;span class="arithmatex"&gt;\(I\)&lt;/span&gt; denote the integral. Integrating by parts with &lt;span class="arithmatex"&gt;\(u = \arctan x\)&lt;/span&gt; and &lt;span class="arithmatex"&gt;\(dv = \frac{dx}{x}\)&lt;/span&gt;, and then substituting &lt;span class="arithmatex"&gt;\(x = \tan\theta\)&lt;/span&gt; (using &lt;span class="arithmatex"&gt;\(\tan\frac{\pi}{12} = 2-\sqrt{3}\)&lt;/span&gt;), we obtain&lt;/p&gt;
&lt;div class="arithmatex"&gt;\[
\begin{aligned}
I &amp;amp;= \Bigl[ \ln(x)\arctan(x) \Bigr]_0^{2-\sqrt{3}} - \int_0^{2-\sqrt{3}}\frac{\ln (x)}{1+x^2}\,dx \\
&amp;amp;= \frac{\pi}{12}\ln\left(2-\sqrt{3}\right) - \int_0^{\frac{\pi}{12}} \ln(\tan\theta)\,d\theta.
\end{aligned} \tag{1}
\]&lt;/div&gt;
&lt;p&gt;For &lt;span class="arithmatex"&gt;\(\theta \in \left(0, \frac{\pi}{2}\right)\)&lt;/span&gt;, recall the standard Fourier cosine expansions&lt;/p&gt;
&lt;div class="arithmatex"&gt;\[
\begin{aligned}
\ln(2\sin \theta) &amp;amp;= -\sum_{k=1}^\infty \frac{\cos(2k \theta)}{k}, \\
\ln(2\cos \theta) &amp;amp;= \sum_{k=1}^\infty (-1)^{k+1}\frac{\cos(2k\theta)}{k}.
\end{aligned}
\]&lt;/div&gt;
&lt;p&gt;Subtracting the second series from the first cancels all even-indexed terms and doubles the odd-indexed terms (&lt;span class="arithmatex"&gt;\(k = 2m+1\)&lt;/span&gt;):&lt;/p&gt;
&lt;div class="arithmatex"&gt;\[
\ln(\tan\theta) = \ln(2\sin\theta) - \ln(2\cos\theta) = -2\sum_{k=0}^\infty \frac{\cos\bigl(2(2k+1)\theta\bigr)}{2k+1}.
\]&lt;/div&gt;
&lt;h2&gt;Term-by-term integration and multisection of the series&lt;/h2&gt;
&lt;p&gt;Substituting the Fourier series of &lt;span class="arithmatex"&gt;\(\ln(\tan\theta)\)&lt;/span&gt; into equation (1) and integrating term by term gives&lt;/p&gt;
&lt;div class="arithmatex"&gt;\[
\begin{aligned}
I &amp;amp;= \frac{\pi}{12}\ln\left(2-\sqrt{3}\right) + 2\int_0^{\frac{\pi}{12}}\left(\sum_{k=0}^\infty \frac{\cos\bigl(2(2k+1)\theta\bigr)}{2k+1} \right) d\theta \\
&amp;amp;= \frac{\pi}{12}\ln\left(2-\sqrt{3}\right) + 2\sum_{k=0}^\infty\frac{1}{2k+1}\int_0^{\frac{\pi}{12}} \cos\bigl(2(2k+1)\theta\bigr)\,d\theta \\
&amp;amp;= \frac{\pi}{12}\ln\left(2-\sqrt{3}\right) + \sum_{k=0}^\infty\frac{\sin\left( (2k+1)\frac{\pi}{6}\right)}{(2k+1)^2}.
\end{aligned}
\]&lt;/div&gt;
&lt;p&gt;To evaluate the remaining Dirichlet-type series, examine the periodic numerator &lt;span class="arithmatex"&gt;\(s_k = \sin\left((2k+1)\frac{\pi}{6}\right)\)&lt;/span&gt; as &lt;span class="arithmatex"&gt;\(k\)&lt;/span&gt; varies modulo &lt;span class="arithmatex"&gt;\(3\)&lt;/span&gt;:&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;When &lt;span class="arithmatex"&gt;\(k \equiv 0\)&lt;/span&gt; or &lt;span class="arithmatex"&gt;\(2 \pmod 3\)&lt;/span&gt; (so &lt;span class="arithmatex"&gt;\(2k+1\)&lt;/span&gt; is not divisible by &lt;span class="arithmatex"&gt;\(3\)&lt;/span&gt;), &lt;span class="arithmatex"&gt;\(s_k = \frac{1}{2}(-1)^k\)&lt;/span&gt;.&lt;/li&gt;
&lt;li&gt;When &lt;span class="arithmatex"&gt;\(k = 3m+1\)&lt;/span&gt; (so &lt;span class="arithmatex"&gt;\(2k+1 = 6m+3 = 3(2m+1)\)&lt;/span&gt; is an odd multiple of &lt;span class="arithmatex"&gt;\(3\)&lt;/span&gt;), &lt;span class="arithmatex"&gt;\(s_{3m+1} = \sin\left((2m+1)\frac{\pi}{2}\right) = (-1)^m = -(-1)^k\)&lt;/span&gt;.&lt;/li&gt;
&lt;/ul&gt;
&lt;p&gt;On the full alternating sum &lt;span class="arithmatex"&gt;\(\sum_{k=0}^\infty \frac{(-1)^k}{(2k+1)^2} = G\)&lt;/span&gt;, separating out the subsequence &lt;span class="arithmatex"&gt;\(k = 3m+1\)&lt;/span&gt; where &lt;span class="arithmatex"&gt;\((-1)^{3m+1} = -(-1)^m\)&lt;/span&gt; gives&lt;/p&gt;
&lt;div class="arithmatex"&gt;\[
\sum_{k \not\equiv 1 \pmod 3} \frac{(-1)^k}{(2k+1)^2} = \sum_{k=0}^\infty \frac{(-1)^k}{(2k+1)^2} + \sum_{m=0}^\infty \frac{(-1)^m}{(6m+3)^2} = G + \frac{G}{9}.
\]&lt;/div&gt;
&lt;p&gt;Multiplying those terms by &lt;span class="arithmatex"&gt;\(\frac{1}{2}\)&lt;/span&gt; and adding the &lt;span class="arithmatex"&gt;\(k = 3m+1\)&lt;/span&gt; terms (which have coefficient &lt;span class="arithmatex"&gt;\((-1)^m\)&lt;/span&gt;) yields&lt;/p&gt;
&lt;div class="arithmatex"&gt;\[
\begin{aligned}
I &amp;amp;= \frac{\pi}{12}\ln\left(2-\sqrt{3}\right) + \frac{1}{2}\left( \sum_{k=0}^\infty \frac{(-1)^k}{(2k+1)^2} + \sum_{m=0}^\infty \frac{(-1)^m}{(6m+3)^2}\right) + \sum_{m=0}^\infty \frac{(-1)^m}{(6m+3)^2} \\
&amp;amp;= \frac{\pi}{12}\ln\left(2-\sqrt{3}\right) + \frac{1}{2}\left(G + \frac{G}{9}\right) + \frac{G}{9} \\
&amp;amp;= \frac{\pi}{12}\ln\left(2-\sqrt{3}\right) + \frac{2}{3}G.
\end{aligned}
\]&lt;/div&gt;</content><category term="Logarithmic Integrals"/><category term="logarithmic-integrals"/><category term="catalans-constant"/><category term="fourier-series"/><category term="trigonometric-integrals"/></entry><entry><title>An integral involving the squared arctangent of sine squared</title><link href="https://integralsandseries.in/2026/10/24/an-integral-involving-the-squared-arctangent-of-sine-squared/" rel="alternate"/><published>2026-10-24T10:09:00+05:30</published><updated>2026-10-24T10:09:00+05:30</updated><author><name>Shobhit Bhatnagar</name></author><id>tag:integralsandseries.in,2026-10-24:/2026/10/24/an-integral-involving-the-squared-arctangent-of-sine-squared/</id><summary type="html">&lt;p&gt;Integration by parts followed by differentiation under the integral sign reduces a squared-arctangent trigonometric integral to an elementary antiderivative.&lt;/p&gt;</summary><content type="html">&lt;p&gt;In this post we combine integration by parts with differentiation under the integral sign to evaluate&lt;/p&gt;
&lt;div class="arithmatex"&gt;\[
\int_0^{\frac{\pi}{2}} \frac{\arctan^2 (\sin^2 \theta)}{\sin^2 \theta}\,d\theta = \pi \log\left( \frac{2+\sqrt{2}}{4}\right) \sqrt{\frac{\sqrt{2}+1}{2}}+\frac{\pi^2}{4}\sqrt{\frac{\sqrt{2}-1}{2}}.
\]&lt;/div&gt;
&lt;h2&gt;Integration by parts and introducing a parameter&lt;/h2&gt;
&lt;p&gt;Let &lt;span class="arithmatex"&gt;\(I\)&lt;/span&gt; denote the integral. Integrating by parts with &lt;span class="arithmatex"&gt;\(u = \arctan^2(\sin^2 x)\)&lt;/span&gt; and &lt;span class="arithmatex"&gt;\(dv = \frac{dx}{\sin^2 x}\)&lt;/span&gt; (so &lt;span class="arithmatex"&gt;\(v = -\cot x\)&lt;/span&gt; and &lt;span class="arithmatex"&gt;\(du = \frac{4\sin x \cos x \arctan(\sin^2 x)}{1+\sin^4 x}\,dx\)&lt;/span&gt;), the boundary term &lt;span class="arithmatex"&gt;\(\bigl[-\cot x \arctan^2(\sin^2 x)\bigr]_0^{\pi/2}\)&lt;/span&gt; vanishes at both endpoints because &lt;span class="arithmatex"&gt;\(\cot(\pi/2) = 0\)&lt;/span&gt; and &lt;span class="arithmatex"&gt;\(\cot x \arctan^2(\sin^2 x) = O(x^3)\)&lt;/span&gt; as &lt;span class="arithmatex"&gt;\(x \to 0^+\)&lt;/span&gt;. Thus,&lt;/p&gt;
&lt;div class="arithmatex"&gt;\[
I = \int_{0}^{\frac{\pi}{2}}\frac{\arctan^2(\sin^2 x)}{\sin^2 x}\,dx = 4\int_0^{\frac{\pi}{2}}\frac{\cos^2 x\arctan(\sin^2 x)}{1+\sin^4 x}\,dx.
\]&lt;/div&gt;
&lt;p&gt;To eliminate the remaining arctangent, introduce a parameter &lt;span class="arithmatex"&gt;\(\alpha \in [0,1]\)&lt;/span&gt;:&lt;/p&gt;
&lt;div class="arithmatex"&gt;\[
f(\alpha) = \int_0^{\frac{\pi}{2}}\frac{\cos^2 x\arctan(\alpha \sin^2 x)}{1+\sin^4 x}\,dx,
\]&lt;/div&gt;
&lt;p&gt;so that &lt;span class="arithmatex"&gt;\(f(0) = 0\)&lt;/span&gt; and &lt;span class="arithmatex"&gt;\(I = 4f(1)\)&lt;/span&gt;. Differentiating inside the integral with respect to &lt;span class="arithmatex"&gt;\(\alpha\)&lt;/span&gt; and decomposing into partial fractions in &lt;span class="arithmatex"&gt;\(\sin^4 x\)&lt;/span&gt; gives&lt;/p&gt;
&lt;div class="arithmatex"&gt;\[
\begin{aligned}
f'(\alpha) &amp;amp;= \int_0^{\frac{\pi}{2}}\frac{\cos^2 x}{1+\sin^4 x}\cdot\frac{\sin^2 x}{1+\alpha^2 \sin^4 x}\,dx \\
&amp;amp;= \frac{1}{1-\alpha^2}\int_0^{\frac{\pi}{2}}\frac{\cos^2 x\sin^2 x}{1+\sin^4 x}\,dx - \frac{\alpha^2}{1-\alpha^2}\int_0^{\frac{\pi}{2}}\frac{\cos^2 x\sin^2 x}{1+\alpha^2 \sin^4 x}\,dx.
\end{aligned}
\]&lt;/div&gt;
&lt;p&gt;Define the auxiliary integral&lt;/p&gt;
&lt;div class="arithmatex"&gt;\[
g(\alpha) = \int_0^{\frac{\pi}{2}}\frac{\cos^2 x\sin^2 x}{1+\alpha^2 \sin^4 x}\,dx.
\]&lt;/div&gt;
&lt;p&gt;Then &lt;span class="arithmatex"&gt;\(f'(\alpha) = \frac{g(1) - \alpha^2 g(\alpha)}{1 - \alpha^2}\)&lt;/span&gt;, and integrating from &lt;span class="arithmatex"&gt;\(\alpha = 0\)&lt;/span&gt; to &lt;span class="arithmatex"&gt;\(\alpha = 1\)&lt;/span&gt; yields&lt;/p&gt;
&lt;div class="arithmatex"&gt;\[
I = 4f(1) = 4\int_0^1\frac{g(1)-\alpha^2 g(\alpha)}{1-\alpha^2}\,d\alpha. \tag{1}
\]&lt;/div&gt;
&lt;h2&gt;Evaluating the auxiliary integral &lt;span class="arithmatex"&gt;\(g(\alpha)\)&lt;/span&gt;&lt;/h2&gt;
&lt;p&gt;Substituting &lt;span class="arithmatex"&gt;\(t = \tan x\)&lt;/span&gt; (so &lt;span class="arithmatex"&gt;\(\sin^2 x = \frac{t^2}{1+t^2}\)&lt;/span&gt;, &lt;span class="arithmatex"&gt;\(\cos^2 x = \frac{1}{1+t^2}\)&lt;/span&gt;, and &lt;span class="arithmatex"&gt;\(dx = \frac{dt}{1+t^2}\)&lt;/span&gt;) and applying partial fractions, we obtain&lt;/p&gt;
&lt;div class="arithmatex"&gt;\[
\begin{aligned}
g(\alpha) &amp;amp;= \int_0^{\frac{\pi}{2}}\frac{\cos^2 x\sin^2 x}{1+\alpha^2 \sin^4 x}\,dx \\
&amp;amp;= \int_0^\infty \frac{t^2}{\bigl((1+\alpha^2)t^4+2t^2+1\bigr)(t^2+1)}\,dt \\
&amp;amp;= -\frac{1}{\alpha^2}\int_0^\infty\frac{1}{1+t^2}\,dt + \frac{1}{\alpha^2}\int_0^\infty\frac{1+(1+\alpha^2)t^2}{(1+\alpha^2)t^4+2t^2+1}\,dt.
\end{aligned}
\]&lt;/div&gt;
&lt;p&gt;The first integral is &lt;span class="arithmatex"&gt;\(\frac{\pi}{2}\)&lt;/span&gt;. For the second integral, put &lt;span class="arithmatex"&gt;\(r = \sqrt[4]{1+\alpha^2}\)&lt;/span&gt; and &lt;span class="arithmatex"&gt;\(s = rt\)&lt;/span&gt;. Then&lt;/p&gt;
&lt;div class="arithmatex"&gt;\[
\begin{aligned}
\int_0^\infty\frac{1+r^4 t^2}{r^4 t^4+2t^2+1}\,dt
&amp;amp;= \frac{1}{r}\int_0^\infty \frac{1+r^2 s^2}{s^4 + \frac{2}{r^2}s^2 + 1}\,ds \\
&amp;amp;= \frac{1+r^2}{2r}\int_0^\infty \frac{1 + \frac{1}{s^2}}{\left(s - \frac{1}{s}\right)^2 + 2 + \frac{2}{r^2}}\,ds,
\end{aligned}
\]&lt;/div&gt;
&lt;p&gt;where the last step averages the integral with its image under &lt;span class="arithmatex"&gt;\(s \mapsto 1/s\)&lt;/span&gt;. Substituting &lt;span class="arithmatex"&gt;\(w = s - \frac{1}{s} \in (-\infty, \infty)\)&lt;/span&gt; gives a standard Cauchy integral:&lt;/p&gt;
&lt;div class="arithmatex"&gt;\[
\frac{1+r^2}{2r}\int_{-\infty}^\infty \frac{dw}{w^2 + \frac{2(r^2+1)}{r^2}} = \frac{1+r^2}{2r}\cdot\frac{\pi}{\sqrt{\frac{2(r^2+1)}{r^2}}} = \frac{\pi\sqrt{1+r^2}}{2\sqrt{2}} = \frac{\pi\sqrt{1+\sqrt{1+\alpha^2}}}{2\sqrt{2}}.
\]&lt;/div&gt;
&lt;p&gt;Therefore,&lt;/p&gt;
&lt;div class="arithmatex"&gt;\[
g(\alpha) = -\frac{\pi}{2\alpha^2} + \frac{\pi \sqrt{1+\sqrt{1+\alpha^2}}}{2\sqrt{2}\alpha^2}. \tag{2}
\]&lt;/div&gt;
&lt;p&gt;Substituting (2) into equation (1), the &lt;span class="arithmatex"&gt;\(-\frac{\pi}{2}\)&lt;/span&gt; terms cancel between &lt;span class="arithmatex"&gt;\(\alpha^2 g(\alpha)\)&lt;/span&gt; and &lt;span class="arithmatex"&gt;\(g(1)\)&lt;/span&gt;, leaving&lt;/p&gt;
&lt;div class="arithmatex"&gt;\[
I = \pi\sqrt{2}\int_0^1\frac{\sqrt{1+\sqrt{2}}-\sqrt{1+\sqrt{1+\alpha^2}}}{1-\alpha^2}\,d\alpha. \tag{3}
\]&lt;/div&gt;
&lt;h2&gt;Integrating with respect to &lt;span class="arithmatex"&gt;\(\alpha\)&lt;/span&gt;&lt;/h2&gt;
&lt;p&gt;Integral (3) admits an elementary antiderivative via the two successive substitutions &lt;span class="arithmatex"&gt;\(t = \sqrt{1+\alpha^2}\)&lt;/span&gt; (so &lt;span class="arithmatex"&gt;\(\alpha\,d\alpha = t\,dt\)&lt;/span&gt; and &lt;span class="arithmatex"&gt;\(\frac{d\alpha}{1-\alpha^2} = \frac{t\,dt}{(2-t^2)\sqrt{t^2-1}}\)&lt;/span&gt;) and &lt;span class="arithmatex"&gt;\(u = \sqrt{t-1}\)&lt;/span&gt; (so &lt;span class="arithmatex"&gt;\(t = u^2+1\)&lt;/span&gt; and &lt;span class="arithmatex"&gt;\(dt = 2u\,du\)&lt;/span&gt;):&lt;/p&gt;
&lt;div class="arithmatex"&gt;\[
\begin{aligned}
&amp;amp;\int \frac{\sqrt{1+\sqrt{2}}-\sqrt{1+\sqrt{1+\alpha^2}}}{1-\alpha^2}\,d\alpha \\
&amp;amp;= \sqrt{1+\sqrt{2}}\operatorname{arctanh}(\alpha) - \int \frac{\sqrt{1+\sqrt{1+\alpha^2}}}{1-\alpha^2}\,d\alpha \\
&amp;amp;= \sqrt{1+\sqrt{2}}\operatorname{arctanh}(\alpha) - \int \frac{t\sqrt{1+t}}{(2-t^2)\sqrt{t^2-1}}\,dt \quad \left(t=\sqrt{1+\alpha^2}\right) \\
&amp;amp;= \sqrt{1+\sqrt{2}}\operatorname{arctanh}(\alpha) - \int \frac{t}{(2-t^2)\sqrt{t-1}}\,dt \\
&amp;amp;= \sqrt{1+\sqrt{2}}\operatorname{arctanh}(\alpha) - 2\int \frac{u^2+1}{2-(u^2+1)^2}\,du \quad \left(u=\sqrt{t-1}\right) \\
&amp;amp;= \sqrt{1+\sqrt{2}}\operatorname{arctanh}(\alpha) - 2\int \frac{u^2+1}{(\sqrt{2}-1-u^2)(\sqrt{2}+1+u^2)}\,du \\
&amp;amp;= \sqrt{1+\sqrt{2}}\operatorname{arctanh}(\alpha) - \int\frac{du}{\sqrt{2}-1-u^2} + \int\frac{du}{\sqrt{2}+1+u^2} \\
&amp;amp;= \sqrt{1+\sqrt{2}}\operatorname{arctanh}(\alpha) - \sqrt{\sqrt{2}+1}\operatorname{arctanh}\left( u \sqrt{\sqrt{2}+1}\right) + \sqrt{\sqrt{2}-1}\arctan\left(u\sqrt{\sqrt{2}-1} \right) + C.
\end{aligned}
\]&lt;/div&gt;
&lt;p&gt;At the lower endpoint &lt;span class="arithmatex"&gt;\(\alpha = 0\)&lt;/span&gt;, we have &lt;span class="arithmatex"&gt;\(u = 0\)&lt;/span&gt;, so the antiderivative evaluates to &lt;span class="arithmatex"&gt;\(0\)&lt;/span&gt;. As &lt;span class="arithmatex"&gt;\(\alpha \to 1^-\)&lt;/span&gt;, we have &lt;span class="arithmatex"&gt;\(u = \sqrt{\sqrt{1+\alpha^2}-1} \to \sqrt{\sqrt{2}-1}\)&lt;/span&gt;. For the &lt;span class="arithmatex"&gt;\(\arctan\)&lt;/span&gt; term, &lt;span class="arithmatex"&gt;\(u\sqrt{\sqrt{2}-1} \to \sqrt{2}-1 = \tan\left(\frac{\pi}{8}\right)\)&lt;/span&gt;, so &lt;span class="arithmatex"&gt;\(\arctan(\sqrt{2}-1) = \frac{\pi}{8}\)&lt;/span&gt;. For the difference of the two &lt;span class="arithmatex"&gt;\(\operatorname{arctanh}\)&lt;/span&gt; terms, set &lt;span class="arithmatex"&gt;\(c = \sqrt{\sqrt{2}+1}\)&lt;/span&gt; and use the factorization &lt;span class="arithmatex"&gt;\(1-\alpha^2 = (\sqrt{2}-1-u^2)(\sqrt{2}+1+u^2) = c^{-2}(1-c^2 u^2)(c^2+u^2)\)&lt;/span&gt;:&lt;/p&gt;
&lt;div class="arithmatex"&gt;\[
\begin{aligned}
\lim_{\alpha\to 1^-}\bigl(\operatorname{arctanh}(\alpha) - \operatorname{arctanh}(cu)\bigr)
&amp;amp;= \frac{1}{2}\lim_{\alpha\to 1^-}\log\left(\frac{1+\alpha}{1+cu}\cdot\frac{1+\alpha}{1+cu}\cdot\frac{1-c^2 u^2}{1-\alpha^2}\right) \\
&amp;amp;= \frac{1}{2}\lim_{u^2\to \sqrt{2}-1}\log\left(\frac{c^2}{c^2+u^2}\right) \\
&amp;amp;= \frac{1}{2}\log\left(\frac{\sqrt{2}+1}{2\sqrt{2}}\right) = \frac{1}{2}\log\left(\frac{2+\sqrt{2}}{4}\right).
\end{aligned}
\]&lt;/div&gt;
&lt;p&gt;Putting everything together, we conclude that&lt;/p&gt;
&lt;div class="arithmatex"&gt;\[
\begin{aligned}
I &amp;amp;= \pi\sqrt{2}\left\{\frac{\sqrt{\sqrt{2}+1}}{2}\log\left(\frac{\sqrt{2}+2}{4} \right) + \sqrt{\sqrt{2}-1}\arctan(\sqrt{2}-1)\right\} \\
&amp;amp;= \pi\sqrt{2}\left\{\frac{\sqrt{\sqrt{2}+1}}{2}\log\left(\frac{\sqrt{2}+2}{4} \right) + \frac{\pi}{8}\sqrt{\sqrt{2}-1}\right\} \\
&amp;amp;= \pi \log\left( \frac{2+\sqrt{2}}{4}\right) \sqrt{\frac{\sqrt{2}+1}{2}}+\frac{\pi^2}{4}\sqrt{\frac{\sqrt{2}-1}{2}}.
\end{aligned}
\]&lt;/div&gt;
&lt;p&gt;In &lt;a href="https://integralsandseries.in/2026/10/24/lobachevsky-type-logarithmic-integrals-via-partial-fraction-series/"&gt;a later post on Lobachevsky-type integrals&lt;/a&gt;, we show that the improper integral &lt;span class="arithmatex"&gt;\(\int_0^\infty \frac{\arctan^2(\sin^2 x)}{x^2}\,dx\)&lt;/span&gt; reduces to this exact same value.&lt;/p&gt;</content><category term="Feynman's Trick"/><category term="feynmans-trick"/><category term="trigonometric-integrals"/><category term="definite-integrals"/></entry><entry><title>Evaluating a logarithmic Fresnel integral by differentiating under the integral sign</title><link href="https://integralsandseries.in/2026/10/24/evaluating-a-logarithmic-fresnel-integral-by-differentiating-under-the-integral-sign/" rel="alternate"/><published>2026-10-24T10:08:00+05:30</published><updated>2026-10-24T10:08:00+05:30</updated><author><name>Shobhit Bhatnagar</name></author><id>tag:integralsandseries.in,2026-10-24:/2026/10/24/evaluating-a-logarithmic-fresnel-integral-by-differentiating-under-the-integral-sign/</id><summary type="html">&lt;p&gt;Differentiating the Mellin transform of the sine function with respect to its exponent evaluates a logarithmic Fresnel-type integral in terms of Euler's constant.&lt;/p&gt;</summary><content type="html">&lt;p&gt;A factor of &lt;span class="arithmatex"&gt;\(\ln x\)&lt;/span&gt; in an integrand can often be generated by differentiating a family of power integrals &lt;span class="arithmatex"&gt;\(x^{s-1}\)&lt;/span&gt; with respect to the exponent &lt;span class="arithmatex"&gt;\(s\)&lt;/span&gt;. Combining this principle with the Mellin transform of &lt;span class="arithmatex"&gt;\(\sin t\)&lt;/span&gt; proved in &lt;a href="https://integralsandseries.in/2026/10/24/mellin-transforms-of-sine-and-cosine-via-a-quarter-circle-contour/"&gt;an earlier post&lt;/a&gt;, we will show that&lt;/p&gt;
&lt;div class="arithmatex"&gt;\[
\int_0^\infty \frac{\sin\left(x^2\right)\ln(x)}{x}\,dx = -\frac{\gamma \pi}{8},
\]&lt;/div&gt;
&lt;p&gt;where &lt;span class="arithmatex"&gt;\(\gamma\)&lt;/span&gt; is the Euler-Mascheroni constant.&lt;/p&gt;
&lt;h2&gt;Reducing to a Mellin derivative&lt;/h2&gt;
&lt;p&gt;First, the substitution &lt;span class="arithmatex"&gt;\(t = x^2\)&lt;/span&gt; (so that &lt;span class="arithmatex"&gt;\(\frac{dx}{x} = \frac{dt}{2t}\)&lt;/span&gt; and &lt;span class="arithmatex"&gt;\(\ln x = \frac{1}{2}\ln t\)&lt;/span&gt;) removes the quadratic argument inside the sine:&lt;/p&gt;
&lt;div class="arithmatex"&gt;\[
\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}
\]&lt;/div&gt;
&lt;p&gt;Recall from &lt;a href="https://integralsandseries.in/2026/10/24/mellin-transforms-of-sine-and-cosine-via-a-quarter-circle-contour/"&gt;our post on the Mellin transforms of sine and cosine&lt;/a&gt; that for &lt;span class="arithmatex"&gt;\(s \in (-1, 1) \setminus \{0\}\)&lt;/span&gt;,&lt;/p&gt;
&lt;div class="arithmatex"&gt;\[
\int_0^\infty t^{s-1}\sin(t)\,dt = \sin\left(\frac{\pi s}{2}\right)\Gamma(s),
\]&lt;/div&gt;
&lt;p&gt;with removable singularity at &lt;span class="arithmatex"&gt;\(s = 0\)&lt;/span&gt; matching the Dirichlet integral &lt;span class="arithmatex"&gt;\(\frac{\pi}{2}\)&lt;/span&gt;. Differentiating under the integral sign with respect to &lt;span class="arithmatex"&gt;\(s\)&lt;/span&gt; at &lt;span class="arithmatex"&gt;\(s = 0\)&lt;/span&gt; produces the logarithmic factor &lt;span class="arithmatex"&gt;\(\ln t\)&lt;/span&gt;:&lt;/p&gt;
&lt;div class="arithmatex"&gt;\[
\begin{aligned}
\int_0^\infty \frac{\sin(t)\ln(t)}{t}\,dt
&amp;amp;= \lim_{s\to 0}\frac{d}{ds}\int_0^\infty t^{s-1} \sin(t)\,dt \\
&amp;amp;= \lim_{s\to 0} \frac{d}{ds}\left[\sin\left(\frac{\pi s}{2}\right) \Gamma(s)\right] \\
&amp;amp;= \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}
\]&lt;/div&gt;
&lt;h2&gt;Taking the limit via Laurent expansions&lt;/h2&gt;
&lt;p&gt;Near &lt;span class="arithmatex"&gt;\(s = 0\)&lt;/span&gt;, the gamma function and its derivative have the Laurent expansions&lt;/p&gt;
&lt;div class="arithmatex"&gt;\[
\Gamma(s) = \frac{1}{s} - \gamma + O(s),
\qquad
\Gamma'(s) = -\frac{1}{s^2} + \frac{6\gamma^2+\pi^2}{12} + O(s).
\]&lt;/div&gt;
&lt;p&gt;Substituting these into the limit gives&lt;/p&gt;
&lt;div class="arithmatex"&gt;\[
\begin{aligned}
\int_0^\infty \frac{\sin(t)\ln(t)}{t}\,dt
&amp;amp;= \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] \\
&amp;amp;= \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}
\]&lt;/div&gt;
&lt;p&gt;Using the Taylor series &lt;span class="arithmatex"&gt;\(\cos\left(\frac{\pi s}{2}\right) = 1 - O(s^2)\)&lt;/span&gt; and &lt;span class="arithmatex"&gt;\(\sin\left(\frac{\pi s}{2}\right) = \frac{\pi s}{2} - O(s^3)\)&lt;/span&gt;, the singular &lt;span class="arithmatex"&gt;\(1/s\)&lt;/span&gt; terms cancel identically:&lt;/p&gt;
&lt;div class="arithmatex"&gt;\[
\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).
\]&lt;/div&gt;
&lt;p&gt;Therefore,&lt;/p&gt;
&lt;div class="arithmatex"&gt;\[
\int_0^\infty \frac{\sin(t)\ln(t)}{t}\,dt = -\frac{\pi \gamma}{2}. \tag{2}
\]&lt;/div&gt;
&lt;h3&gt;A shortcut via &lt;span class="arithmatex"&gt;\(\Gamma(s+1) = s\Gamma(s)\)&lt;/span&gt;&lt;/h3&gt;
&lt;p&gt;We can also see why the singular terms cancel without writing out the second-order Laurent coefficients by factoring &lt;span class="arithmatex"&gt;\(\sin\left(\frac{\pi s}{2}\right)\Gamma(s)\)&lt;/span&gt; as&lt;/p&gt;
&lt;div class="arithmatex"&gt;\[
\sin\left(\frac{\pi s}{2}\right)\Gamma(s) = \frac{\sin\left(\frac{\pi s}{2}\right)}{s}\Gamma(1+s).
\]&lt;/div&gt;
&lt;p&gt;Here &lt;span class="arithmatex"&gt;\(g(s) = \frac{\sin(\pi s/2)}{s}\)&lt;/span&gt; is a smooth, even function with &lt;span class="arithmatex"&gt;\(g(0) = \frac{\pi}{2}\)&lt;/span&gt; and &lt;span class="arithmatex"&gt;\(g'(0) = 0\)&lt;/span&gt;, while &lt;span class="arithmatex"&gt;\(\Gamma(1) = 1\)&lt;/span&gt; and &lt;span class="arithmatex"&gt;\(\Gamma'(1) = -\gamma\)&lt;/span&gt;. Applying the product rule at &lt;span class="arithmatex"&gt;\(s=0\)&lt;/span&gt; immediately yields &lt;span class="arithmatex"&gt;\(g'(0)\Gamma(1) + g(0)\Gamma'(1) = -\frac{\pi\gamma}{2}\)&lt;/span&gt;.&lt;/p&gt;
&lt;p&gt;Substituting equation (2) into equation (1) completes the proof:&lt;/p&gt;
&lt;div class="arithmatex"&gt;\[
\int_0^\infty \frac{\sin\left(x^2\right)\ln(x)}{x}\,dx = -\frac{\gamma \pi}{8}.
\]&lt;/div&gt;</content><category term="Feynman's Trick"/><category term="feynmans-trick"/><category term="gamma-function"/><category term="mellin-transform"/><category term="logarithmic-integrals"/></entry><entry><title>A logarithmic sine integral via a keyhole contour</title><link href="https://integralsandseries.in/2026/10/24/a-logarithmic-sine-integral-via-a-keyhole-contour/" rel="alternate"/><published>2026-10-24T10:07:00+05:30</published><updated>2026-10-24T10:07:00+05:30</updated><author><name>Shobhit Bhatnagar</name></author><id>tag:integralsandseries.in,2026-10-24:/2026/10/24/a-logarithmic-sine-integral-via-a-keyhole-contour/</id><summary type="html">&lt;p&gt;Integrating a complex power around a keyhole cut along the negative real axis evaluates a rational integral involving the sine of a logarithm.&lt;/p&gt;</summary><content type="html">&lt;p&gt;Integrals on &lt;span class="arithmatex"&gt;\((0, \infty)\)&lt;/span&gt; containing &lt;span class="arithmatex"&gt;\(\sin(\ln x)\)&lt;/span&gt; or &lt;span class="arithmatex"&gt;\(\cos(\ln x)\)&lt;/span&gt; are the imaginary and real parts of &lt;span class="arithmatex"&gt;\(\int_0^\infty x^i R(x)\,dx\)&lt;/span&gt;, since &lt;span class="arithmatex"&gt;\(x^i = e^{i\ln x} = \cos(\ln x) + i\sin(\ln x)\)&lt;/span&gt;. By placing a keyhole branch cut along the negative real axis &lt;span class="arithmatex"&gt;\((-\infty, 0]\)&lt;/span&gt; for an even rational function &lt;span class="arithmatex"&gt;\(R(z)\)&lt;/span&gt;, the integrals along the upper and lower banks of the cut both fold onto &lt;span class="arithmatex"&gt;\((0, \infty)\)&lt;/span&gt; with different constant factors &lt;span class="arithmatex"&gt;\(e^{-\pi}\)&lt;/span&gt; and &lt;span class="arithmatex"&gt;\(e^{\pi}\)&lt;/span&gt;. We will use this method to prove&lt;/p&gt;
&lt;div class="arithmatex"&gt;\[
\int_0^\infty \frac{\sin(\ln x)}{x^2+4}\,dx = \frac{\pi \sin(\ln 2)}{4\cosh\left(\frac{\pi}{2}\right)}.
\]&lt;/div&gt;
&lt;h2&gt;The keyhole contour&lt;/h2&gt;
&lt;p&gt;Consider the function&lt;/p&gt;
&lt;div class="arithmatex"&gt;\[
f(z) = \frac{e^{i\log z}}{4+z^2},
\]&lt;/div&gt;
&lt;p&gt;where the branch of the logarithm is chosen with &lt;span class="arithmatex"&gt;\(-\pi &amp;lt; \arg z \leq \pi\)&lt;/span&gt;, so the branch cut lies along the negative real axis &lt;span class="arithmatex"&gt;\((-\infty, 0]\)&lt;/span&gt;. We integrate &lt;span class="arithmatex"&gt;\(f(z)\)&lt;/span&gt; around the positively oriented keyhole contour shown below:&lt;/p&gt;
&lt;p&gt;&lt;img alt="Keyhole contour cut along the negative real axis with outer circle C_R, inner semicircle C_epsilon around the origin, and simple poles at plus 2i and minus 2i" src="https://integralsandseries.in/images/contour-keyhole-negative-real.svg"&gt;&lt;/p&gt;
&lt;p&gt;Here &lt;span class="arithmatex"&gt;\(C_R\)&lt;/span&gt; is a large circle of radius &lt;span class="arithmatex"&gt;\(R &amp;gt; 2\)&lt;/span&gt; and &lt;span class="arithmatex"&gt;\(C_\epsilon\)&lt;/span&gt; is a small semicircle of radius &lt;span class="arithmatex"&gt;\(\epsilon &amp;lt; 2\)&lt;/span&gt;, both centered at the origin. On the circle &lt;span class="arithmatex"&gt;\(|z| = r\)&lt;/span&gt;, we have &lt;span class="arithmatex"&gt;\(\left|e^{i\log z}\right| = e^{-\arg z} \leq e^\pi\)&lt;/span&gt;, so&lt;/p&gt;
&lt;div class="arithmatex"&gt;\[
\left|\int_{C_R} f(z)\,dz\right| \leq \frac{2\pi R e^\pi}{R^2 - 4} \to 0 \quad (R \to \infty)
\qquad\text{and}\qquad
\left|\int_{C_\epsilon} f(z)\,dz\right| \leq \frac{\pi\epsilon e^\pi}{4 - \epsilon^2} \to 0 \quad (\epsilon \to 0^+).
\]&lt;/div&gt;
&lt;p&gt;Thus, in the limits &lt;span class="arithmatex"&gt;\(R \to \infty\)&lt;/span&gt; and &lt;span class="arithmatex"&gt;\(\epsilon \to 0^+\)&lt;/span&gt;, only the two horizontal segments just above and just below the negative real axis contribute to the contour integral.&lt;/p&gt;
&lt;h2&gt;Computing the residues at &lt;span class="arithmatex"&gt;\(\pm 2i\)&lt;/span&gt;&lt;/h2&gt;
&lt;p&gt;Inside the contour, &lt;span class="arithmatex"&gt;\(f(z)\)&lt;/span&gt; has simple poles at &lt;span class="arithmatex"&gt;\(z = 2i\)&lt;/span&gt; and &lt;span class="arithmatex"&gt;\(z = -2i\)&lt;/span&gt;. Using the branch &lt;span class="arithmatex"&gt;\(-\pi &amp;lt; \arg z \leq \pi\)&lt;/span&gt;, we have &lt;span class="arithmatex"&gt;\(\log(2i) = \ln 2 + i\frac{\pi}{2}\)&lt;/span&gt; and &lt;span class="arithmatex"&gt;\(\log(-2i) = \ln 2 - i\frac{\pi}{2}\)&lt;/span&gt;. Hence,&lt;/p&gt;
&lt;div class="arithmatex"&gt;\[
\begin{aligned}
\mathop{\operatorname{Res}}_{z=2i} f(z)
&amp;amp;= \lim_{z\to 2i} (z-2i) \frac{e^{i\log z}}{z^2+4} \\
&amp;amp;= \frac{e^{i\log(2i)}}{4i} \\
&amp;amp;= \frac{e^{i\ln 2 - \frac{\pi}{2}}}{4i},
\end{aligned}
\]&lt;/div&gt;
&lt;p&gt;and similarly,&lt;/p&gt;
&lt;div class="arithmatex"&gt;\[
\mathop{\operatorname{Res}}_{z=-2i} f(z) = -\frac{e^{i\log(-2i)}}{4i} = -\frac{e^{i\ln 2 + \frac{\pi}{2}}}{4i}.
\]&lt;/div&gt;
&lt;h2&gt;Evaluating the integral along the branch cut&lt;/h2&gt;
&lt;p&gt;On the upper bank of the negative real axis (traversed from &lt;span class="arithmatex"&gt;\(-\infty\)&lt;/span&gt; to &lt;span class="arithmatex"&gt;\(0\)&lt;/span&gt;), &lt;span class="arithmatex"&gt;\(\arg z = +\pi\)&lt;/span&gt;, so &lt;span class="arithmatex"&gt;\(\log z = \ln|x| + i\pi\)&lt;/span&gt; and &lt;span class="arithmatex"&gt;\(e^{i\log z} = e^{-\pi}e^{i\ln|x|}\)&lt;/span&gt;. On the lower bank (traversed from &lt;span class="arithmatex"&gt;\(0\)&lt;/span&gt; to &lt;span class="arithmatex"&gt;\(-\infty\)&lt;/span&gt;), &lt;span class="arithmatex"&gt;\(\arg z = -\pi\)&lt;/span&gt;, so &lt;span class="arithmatex"&gt;\(\log z = \ln|x| - i\pi\)&lt;/span&gt; and &lt;span class="arithmatex"&gt;\(e^{i\log z} = e^{\pi}e^{i\ln|x|}\)&lt;/span&gt;. Substituting &lt;span class="arithmatex"&gt;\(t = -x &amp;gt; 0\)&lt;/span&gt; (and relabeling &lt;span class="arithmatex"&gt;\(t\)&lt;/span&gt; as &lt;span class="arithmatex"&gt;\(x\)&lt;/span&gt;) on both banks, the residue theorem gives&lt;/p&gt;
&lt;div class="arithmatex"&gt;\[
\begin{aligned}
\int_{-\infty}^0 \frac{e^{i(\ln|x|+i\pi)}}{4+x^2}\,dx + \int_0^{-\infty} \frac{e^{i(\ln|x|-i\pi)}}{4+x^2}\,dx
&amp;amp;= 2\pi i \left(\mathop{\operatorname{Res}}_{z=2i} f(z) + \mathop{\operatorname{Res}}_{z=-2i} f(z)\right) \\
\implies e^{-\pi}\int_0^\infty \frac{e^{i\ln x}}{4+x^2}\,dx - e^{\pi}\int_0^\infty \frac{e^{i\ln x}}{4+x^2}\,dx
&amp;amp;= 2\pi i \left( \frac{e^{i\ln 2}}{4i}e^{-\frac{\pi}{2}}- \frac{e^{i\ln 2}}{4i}e^{\frac{\pi}{2}}\right) \\
\implies -2\sinh(\pi) \int_0^\infty \frac{e^{i\ln x}}{4+x^2}\,dx
&amp;amp;= -\sinh\left(\frac{\pi}{2}\right) \pi e^{i\ln 2}.
\end{aligned}
\]&lt;/div&gt;
&lt;p&gt;Using the double-angle identity &lt;span class="arithmatex"&gt;\(\sinh(\pi) = 2\sinh\left(\frac{\pi}{2}\right)\cosh\left(\frac{\pi}{2}\right)\)&lt;/span&gt; to simplify the ratio of hyperbolic sines, we obtain&lt;/p&gt;
&lt;div class="arithmatex"&gt;\[
\int_0^\infty \frac{e^{i\ln x}}{4+x^2}\,dx = \frac{\pi e^{i\ln 2}}{4\cosh\left(\frac{\pi}{2}\right)}.
\]&lt;/div&gt;
&lt;p&gt;Taking the imaginary part of both sides yields the desired evaluation:&lt;/p&gt;
&lt;div class="arithmatex"&gt;\[
\int_0^\infty \frac{\sin(\ln x)}{x^2+4}\,dx = \frac{\pi \sin(\ln 2)}{4\cosh\left(\frac{\pi}{2}\right)}.
\]&lt;/div&gt;
&lt;p&gt;Equating the real parts simultaneously gives the companion cosine integral:&lt;/p&gt;
&lt;div class="arithmatex"&gt;\[
\int_0^\infty \frac{\cos(\ln x)}{x^2+4}\,dx = \frac{\pi \cos(\ln 2)}{4\cosh\left(\frac{\pi}{2}\right)}.
\]&lt;/div&gt;</content><category term="Contour Integration"/><category term="contour-integration"/><category term="residue-theorem"/><category term="logarithmic-integrals"/></entry><entry><title>A trigonometric integral via a semicircular contour</title><link href="https://integralsandseries.in/2026/10/24/a-trigonometric-integral-via-a-semicircular-contour/" rel="alternate"/><published>2026-10-24T10:06:00+05:30</published><updated>2026-10-24T10:06:00+05:30</updated><author><name>Shobhit Bhatnagar</name></author><id>tag:integralsandseries.in,2026-10-24:/2026/10/24/a-trigonometric-integral-via-a-semicircular-contour/</id><summary type="html">&lt;p&gt;A trigonometric substitution and integration around the right half of the unit disk reduce an inverse-sine integral to a beta function.&lt;/p&gt;</summary><content type="html">&lt;p&gt;Integrals containing nested inverse trigonometric functions often simplify dramatically after a change of variables that unwraps the inner function, followed by a passage to the unit circle in the complex plane. We will prove that for every &lt;span class="arithmatex"&gt;\(n \in \mathbb{N}\)&lt;/span&gt;,&lt;/p&gt;
&lt;div class="arithmatex"&gt;\[
\int_0^{\frac{\pi}{2}}\frac{\cos\left((2n-1)\arcsin\left(\frac{\sin x}{\sqrt{2}}\right) \right)}{\sqrt{1-\frac{\sin^2 x}{2}}}\,dx = \frac{\sqrt{\pi}}{2}\sin\left(\frac{n\pi}{2}\right)\frac{\Gamma\left(\frac{n}{2} \right)}{\Gamma\left(\frac{n+1}{2}\right)}.
\]&lt;/div&gt;
&lt;h2&gt;Unwrapping the inverse sine&lt;/h2&gt;
&lt;p&gt;Let &lt;span class="arithmatex"&gt;\(I\)&lt;/span&gt; denote the integral. We begin with the substitution &lt;span class="arithmatex"&gt;\(\sin t = \frac{\sin x}{\sqrt{2}}\)&lt;/span&gt;, so that &lt;span class="arithmatex"&gt;\(\cos t\,dt = \frac{\cos x}{\sqrt{2}}\,dx\)&lt;/span&gt;. Since &lt;span class="arithmatex"&gt;\(\cos x = \sqrt{1 - 2\sin^2 t} = \sqrt{\cos(2t)}\)&lt;/span&gt; and &lt;span class="arithmatex"&gt;\(t\)&lt;/span&gt; runs from &lt;span class="arithmatex"&gt;\(0\)&lt;/span&gt; to &lt;span class="arithmatex"&gt;\(\frac{\pi}{4}\)&lt;/span&gt; as &lt;span class="arithmatex"&gt;\(x\)&lt;/span&gt; runs from &lt;span class="arithmatex"&gt;\(0\)&lt;/span&gt; to &lt;span class="arithmatex"&gt;\(\frac{\pi}{2}\)&lt;/span&gt;, the factor &lt;span class="arithmatex"&gt;\(\sqrt{1 - \frac{\sin^2 x}{2}} = \cos t\)&lt;/span&gt; cancels against &lt;span class="arithmatex"&gt;\(\cos t\,dt\)&lt;/span&gt;:&lt;/p&gt;
&lt;div class="arithmatex"&gt;\[
I = \sqrt{2}\int_0^{\frac{\pi}{4}}\frac{\cos\bigl((2n-1) t\bigr)}{\sqrt{1-2\sin^2 t}}\,dt = \sqrt{2}\int_0^{\frac{\pi}{4}}\frac{\cos\bigl((2n-1) t\bigr)}{\sqrt{\cos(2t)}}\,dt.
\]&lt;/div&gt;
&lt;p&gt;Next, substitute &lt;span class="arithmatex"&gt;\(\theta = 2t\)&lt;/span&gt; and use the evenness of the integrand on &lt;span class="arithmatex"&gt;\(\left[-\frac{\pi}{2}, \frac{\pi}{2}\right]\)&lt;/span&gt;:&lt;/p&gt;
&lt;div class="arithmatex"&gt;\[
\begin{aligned}
I &amp;amp;= \frac{1}{\sqrt{2}} \int_{0}^{\frac{\pi}{2}}\frac{\cos\left(\frac{2n-1}{2}\theta\right)}{\sqrt{\cos \theta}}\,d\theta \\
&amp;amp;= \frac{1}{2\sqrt{2}} \int_{-\frac{\pi}{2}}^{\frac{\pi}{2}}\frac{\cos\left(\frac{2n-1}{2}\theta\right)}{\sqrt{\cos \theta}}\,d\theta \\
&amp;amp;= \frac{1}{2\sqrt{2}} \operatorname{Re}\int_{-\frac{\pi}{2}}^{\frac{\pi}{2}}\frac{\exp\left(\frac{2n-1}{2}i\theta\right)}{\sqrt{\cos \theta}}\,d\theta.
\end{aligned} \tag{1}
\]&lt;/div&gt;
&lt;h2&gt;Integrating around the right half of the unit disk&lt;/h2&gt;
&lt;p&gt;Now integrate the principal branch of&lt;/p&gt;
&lt;div class="arithmatex"&gt;\[
f(z) = \frac{z^{n-1}}{\sqrt{1+z^2}}
\]&lt;/div&gt;
&lt;p&gt;around the positively oriented contour in the right half-plane shown below:&lt;/p&gt;
&lt;p&gt;&lt;img alt="Right half-unit-disk contour bounded by the unit semicircle in the right half-plane and the imaginary axis with small circular indents at plus i and minus i" src="https://integralsandseries.in/images/contour-right-semicircle.svg"&gt;&lt;/p&gt;
&lt;p&gt;The contour consists of the right half of the unit circle &lt;span class="arithmatex"&gt;\(|z|=1\)&lt;/span&gt; (&lt;span class="arithmatex"&gt;\(-\frac{\pi}{2} &amp;lt; \arg z &amp;lt; \frac{\pi}{2}\)&lt;/span&gt;), the segment of the imaginary axis between &lt;span class="arithmatex"&gt;\(+i\)&lt;/span&gt; and &lt;span class="arithmatex"&gt;\(-i\)&lt;/span&gt;, and two small circular indents of radius &lt;span class="arithmatex"&gt;\(\epsilon\)&lt;/span&gt; avoiding the branch points at &lt;span class="arithmatex"&gt;\(z = \pm i\)&lt;/span&gt;. Near &lt;span class="arithmatex"&gt;\(z = \pm i\)&lt;/span&gt;, we have &lt;span class="arithmatex"&gt;\(|1+z^2| = |z-i||z+i| \sim 2\epsilon\)&lt;/span&gt;, so &lt;span class="arithmatex"&gt;\(|f(z)| = O(\epsilon^{-1/2})\)&lt;/span&gt; while the arc length of each indent is &lt;span class="arithmatex"&gt;\(O(\epsilon)\)&lt;/span&gt;. Thus the integrals along both indents are &lt;span class="arithmatex"&gt;\(O(\epsilon^{1/2})\)&lt;/span&gt; and vanish as &lt;span class="arithmatex"&gt;\(\epsilon \to 0^+\)&lt;/span&gt;.&lt;/p&gt;
&lt;p&gt;Since &lt;span class="arithmatex"&gt;\(f(z)\)&lt;/span&gt; is analytic inside the indented region, Cauchy's theorem equates the integral over the right semicircle to the integral upwards along the imaginary axis from &lt;span class="arithmatex"&gt;\(-i\)&lt;/span&gt; to &lt;span class="arithmatex"&gt;\(+i\)&lt;/span&gt;. Parameterizing the imaginary axis by &lt;span class="arithmatex"&gt;\(z = iy\)&lt;/span&gt; with &lt;span class="arithmatex"&gt;\(y \in (-1, 1)\)&lt;/span&gt; and &lt;span class="arithmatex"&gt;\(dz = i\,dy\)&lt;/span&gt; gives&lt;/p&gt;
&lt;div class="arithmatex"&gt;\[
\begin{aligned}
\int_{\left\{z\in \mathbb{C} :\; |z|=1, \; -\frac{\pi}{2}&amp;lt;\arg z &amp;lt; \frac{\pi}{2} \right\}}\frac{z^{n-1}}{\sqrt{1+z^2}}\,dz
&amp;amp;= \int_{-i}^i \frac{z^{n-1}}{\sqrt{1+z^2}}\,dz \\
&amp;amp;= i^{n}\int_{-1}^1 \frac{y^{n-1}}{\sqrt{1-y^2}}\,dy \\
&amp;amp;= \begin{cases}
2 i^n \int_0^1 \frac{y^{n-1}}{\sqrt{1-y^2}}\,dy, &amp;amp; n\text{ odd},\\
0, &amp;amp; n\text{ even}.
\end{cases}
\end{aligned} \tag{2}
\]&lt;/div&gt;
&lt;p&gt;Notice that when &lt;span class="arithmatex"&gt;\(n = 2k+1\)&lt;/span&gt; is odd, &lt;span class="arithmatex"&gt;\(i^n = i(-1)^k = i\sin\left(\frac{n\pi}{2}\right)\)&lt;/span&gt;, whereas when &lt;span class="arithmatex"&gt;\(n\)&lt;/span&gt; is even, &lt;span class="arithmatex"&gt;\(\sin\left(\frac{n\pi}{2}\right) = 0\)&lt;/span&gt;. Hence, for every &lt;span class="arithmatex"&gt;\(n \in \mathbb{N}\)&lt;/span&gt;, equation (2) can be written in the unified form&lt;/p&gt;
&lt;div class="arithmatex"&gt;\[
\int_{\left\{z\in \mathbb{C} :\; |z|=1, \; -\frac{\pi}{2}&amp;lt;\arg z &amp;lt; \frac{\pi}{2} \right\}}\frac{z^{n-1}}{\sqrt{1+z^2}}\,dz = 2i\sin\left(\frac{n\pi}{2}\right)\int_0^1 \frac{y^{n-1}}{\sqrt{1-y^2}}\,dy. \tag{2'}
\]&lt;/div&gt;
&lt;h2&gt;Parameterizing the semicircular arc&lt;/h2&gt;
&lt;p&gt;On the right unit semicircle, set &lt;span class="arithmatex"&gt;\(z = e^{i\theta}\)&lt;/span&gt; for &lt;span class="arithmatex"&gt;\(-\frac{\pi}{2} &amp;lt; \theta &amp;lt; \frac{\pi}{2}\)&lt;/span&gt;, with &lt;span class="arithmatex"&gt;\(dz = i e^{i\theta}\,d\theta\)&lt;/span&gt;. Since &lt;span class="arithmatex"&gt;\(1 + e^{2i\theta} = 2e^{i\theta}\cos\theta\)&lt;/span&gt; and &lt;span class="arithmatex"&gt;\(\cos\theta &amp;gt; 0\)&lt;/span&gt; on &lt;span class="arithmatex"&gt;\(\left(-\frac{\pi}{2}, \frac{\pi}{2}\right)\)&lt;/span&gt;, the principal square root is &lt;span class="arithmatex"&gt;\(\sqrt{1+e^{2i\theta}} = \sqrt{2\cos\theta}\,e^{\frac{i\theta}{2}}\)&lt;/span&gt;. Therefore,&lt;/p&gt;
&lt;div class="arithmatex"&gt;\[
\begin{aligned}
\int_{\left\{z\in \mathbb{C} :\; |z|=1, \; -\frac{\pi}{2}&amp;lt;\arg z &amp;lt; \frac{\pi}{2} \right\}}\frac{z^{n-1}}{\sqrt{1+z^2}}\,dz
&amp;amp;= i\int_{-\frac{\pi}{2}}^{\frac{\pi}{2}}\frac{e^{in \theta}}{\sqrt{1+e^{2i\theta}}}\,d\theta \\
&amp;amp;= i\int_{-\frac{\pi}{2}}^{\frac{\pi}{2}}\frac{e^{\frac{2n-1}{2}i \theta}}{\sqrt{e^{i\theta}+e^{-i\theta}}}\,d\theta \\
&amp;amp;= \frac{i}{\sqrt{2}}\int_{-\frac{\pi}{2}}^{\frac{\pi}{2}}\frac{e^{\frac{2n-1}{2}i \theta}}{\sqrt{\cos \theta}}\,d\theta.
\end{aligned} \tag{3}
\]&lt;/div&gt;
&lt;p&gt;Combining equations (1), (2'), and (3), and finally setting &lt;span class="arithmatex"&gt;\(\xi = y^2\)&lt;/span&gt; (&lt;span class="arithmatex"&gt;\(d\xi = 2y\,dy\)&lt;/span&gt;) to reduce the remaining integral to Euler's beta function &lt;span class="arithmatex"&gt;\(B\left(\frac{n}{2}, \frac{1}{2}\right)\)&lt;/span&gt;, we conclude that&lt;/p&gt;
&lt;div class="arithmatex"&gt;\[
\begin{aligned}
I &amp;amp;= \sin\left(\frac{n\pi}{2}\right)\int_0^1 \frac{y^{n-1}}{\sqrt{1-y^2}}\,dy \\
&amp;amp;= \frac{1}{2}\sin\left(\frac{n\pi}{2}\right)\int_0^1 \xi^{\frac{n}{2}-1}(1-\xi)^{-\frac{1}{2}}\,d\xi \\
&amp;amp;= \frac{\sqrt{\pi}}{2}\sin\left(\frac{n\pi}{2}\right)\frac{\Gamma\left(\frac{n}{2} \right)}{\Gamma\left(\frac{n+1}{2}\right)}.
\end{aligned}
\]&lt;/div&gt;</content><category term="Contour Integration"/><category term="contour-integration"/><category term="beta-function"/><category term="gamma-function"/><category term="trigonometric-integrals"/></entry><entry><title>Mellin transforms of sine and cosine via a quarter-circle contour</title><link href="https://integralsandseries.in/2026/10/24/mellin-transforms-of-sine-and-cosine-via-a-quarter-circle-contour/" rel="alternate"/><published>2026-10-24T10:05:00+05:30</published><updated>2026-10-24T10:05:00+05:30</updated><author><name>Shobhit Bhatnagar</name></author><id>tag:integralsandseries.in,2026-10-24:/2026/10/24/mellin-transforms-of-sine-and-cosine-via-a-quarter-circle-contour/</id><summary type="html">&lt;p&gt;Rotating the positive real axis to the positive imaginary axis via an indented quarter-circle contour evaluates the Mellin transforms of sine and cosine.&lt;/p&gt;</summary><content type="html">&lt;p&gt;Rotating the positive real axis onto the positive imaginary axis turns the oscillatory factor &lt;span class="arithmatex"&gt;\(e^{ix}\)&lt;/span&gt; into the rapidly decaying factor &lt;span class="arithmatex"&gt;\(e^{-y}\)&lt;/span&gt;, converting oscillatory improper integrals into Euler's gamma integral. Using this idea, we will establish the formulas&lt;/p&gt;
&lt;div class="arithmatex"&gt;\[
\begin{aligned}
\int_0^\infty x^{s-1} \sin(x)\,dx &amp;amp;= \begin{cases} \sin\left(\frac{\pi s}{2}\right)\Gamma(s), &amp;amp; s\in (-1,0)\cup (0,1), \\ \frac{\pi}{2}, &amp;amp; s=0, \end{cases} \\
\int_0^\infty x^{s-1} \cos(x)\,dx &amp;amp;= \cos\left(\frac{\pi s}{2}\right)\Gamma(s), \qquad 0 &amp;lt; s &amp;lt; 1.
\end{aligned}
\]&lt;/div&gt;
&lt;h2&gt;Contour integration for &lt;span class="arithmatex"&gt;\(0 &amp;lt; s &amp;lt; 1\)&lt;/span&gt;&lt;/h2&gt;
&lt;p&gt;Let &lt;span class="arithmatex"&gt;\(f(z) = z^{s-1} e^{iz}\)&lt;/span&gt;, where &lt;span class="arithmatex"&gt;\(0 &amp;lt; s &amp;lt; 1\)&lt;/span&gt; and the principal branch of the logarithm (&lt;span class="arithmatex"&gt;\(-\pi &amp;lt; \arg z \leq \pi\)&lt;/span&gt;) defines &lt;span class="arithmatex"&gt;\(z^{s-1} = e^{(s-1)\log z}\)&lt;/span&gt;. We integrate &lt;span class="arithmatex"&gt;\(f(z)\)&lt;/span&gt; around the positively oriented indented quarter-circle contour shown below, and then let &lt;span class="arithmatex"&gt;\(R \to \infty\)&lt;/span&gt; and &lt;span class="arithmatex"&gt;\(\epsilon \to 0^+\)&lt;/span&gt;:&lt;/p&gt;
&lt;p&gt;&lt;img alt="Quarter-circle contour in the first quadrant bounded by arcs C_epsilon and C_R and segments along the positive real and imaginary axes" src="https://integralsandseries.in/images/contour-quarter-circle.svg"&gt;&lt;/p&gt;
&lt;p&gt;Here &lt;span class="arithmatex"&gt;\(C_R\)&lt;/span&gt; and &lt;span class="arithmatex"&gt;\(C_\epsilon\)&lt;/span&gt; are quarter-circles centered at &lt;span class="arithmatex"&gt;\(z=0\)&lt;/span&gt; of radii &lt;span class="arithmatex"&gt;\(R\)&lt;/span&gt; and &lt;span class="arithmatex"&gt;\(\epsilon\)&lt;/span&gt;, respectively, and &lt;span class="arithmatex"&gt;\(C_\epsilon\)&lt;/span&gt; avoids the branch point at &lt;span class="arithmatex"&gt;\(z=0\)&lt;/span&gt;. Since &lt;span class="arithmatex"&gt;\(f(z)\)&lt;/span&gt; is analytic inside and on the contour, Cauchy's integral theorem gives&lt;/p&gt;
&lt;div class="arithmatex"&gt;\[
\int_\epsilon^R f(z)\,dz + \int_{C_R} f(z)\,dz + \int_{iR}^{i\epsilon} f(z)\,dz + \int_{C_\epsilon}f(z)\,dz = 0. \tag{1}
\]&lt;/div&gt;
&lt;p&gt;On the vertical segment from &lt;span class="arithmatex"&gt;\(iR\)&lt;/span&gt; down to &lt;span class="arithmatex"&gt;\(i\epsilon\)&lt;/span&gt;, parameterizing by &lt;span class="arithmatex"&gt;\(z = iy\)&lt;/span&gt; (&lt;span class="arithmatex"&gt;\(y \in [\epsilon, R]\)&lt;/span&gt;, &lt;span class="arithmatex"&gt;\(dz = i\,dy\)&lt;/span&gt;) and using &lt;span class="arithmatex"&gt;\((iy)^{s-1} i = i^s y^{s-1} = e^{\frac{i\pi s}{2}} y^{s-1}\)&lt;/span&gt; gives&lt;/p&gt;
&lt;div class="arithmatex"&gt;\[
\int_{iR}^{i\epsilon}f(z)\,dz = -i \int_\epsilon^R f(iy)\,dy = -e^{\frac{i\pi s}{2}}\int_\epsilon^R y^{s-1} e^{-y}\,dy. \tag{2}
\]&lt;/div&gt;
&lt;h2&gt;Bounding the circular arcs&lt;/h2&gt;
&lt;p&gt;On &lt;span class="arithmatex"&gt;\(C_R\)&lt;/span&gt;, parameterize &lt;span class="arithmatex"&gt;\(z = R e^{i\theta}\)&lt;/span&gt; for &lt;span class="arithmatex"&gt;\(0 \leq \theta \leq \frac{\pi}{2}\)&lt;/span&gt;. Then &lt;span class="arithmatex"&gt;\(\left|e^{i R e^{i\theta}}\right| = e^{-R\sin\theta}\)&lt;/span&gt;, and by Jordan's inequality &lt;span class="arithmatex"&gt;\(\sin\theta \geq \frac{2\theta}{\pi}\)&lt;/span&gt; on &lt;span class="arithmatex"&gt;\(\left[0, \frac{\pi}{2}\right]\)&lt;/span&gt;, we obtain&lt;/p&gt;
&lt;div class="arithmatex"&gt;\[
\begin{aligned}
\left|\int_{C_R} f(z)\,dz\right|
&amp;amp;= R^s \left| \int_0^{\frac{\pi}{2}} e^{i R e^{i\theta}} e^{i\theta s}\,d\theta\right| \\
&amp;amp;\leq R^s \int_0^{\frac{\pi}{2}} \left| e^{i R e^{i\theta}} \right|\,d\theta \\
&amp;amp;\leq R^s \int_0^{\frac{\pi}{2}} e^{-R \frac{2\theta}{\pi}}\,d\theta \\
&amp;amp;= \frac{\pi}{2}R^{s-1} \left(1-e^{-R} \right).
\end{aligned}
\]&lt;/div&gt;
&lt;p&gt;Since &lt;span class="arithmatex"&gt;\(s &amp;lt; 1\)&lt;/span&gt;, we have &lt;span class="arithmatex"&gt;\(R^{s-1} \to 0\)&lt;/span&gt; as &lt;span class="arithmatex"&gt;\(R \to \infty\)&lt;/span&gt;, so&lt;/p&gt;
&lt;div class="arithmatex"&gt;\[
\lim_{R\to \infty}\left|\int_{C_R} f(z)\,dz\right| = 0. \tag{3}
\]&lt;/div&gt;
&lt;p&gt;By the exact same estimate on &lt;span class="arithmatex"&gt;\(C_\epsilon\)&lt;/span&gt; (or simply noting &lt;span class="arithmatex"&gt;\(\left|e^{i\epsilon e^{i\theta}}\right| \leq 1\)&lt;/span&gt; so the integral is bounded by &lt;span class="arithmatex"&gt;\(\frac{\pi}{2}\epsilon^s\)&lt;/span&gt;), the condition &lt;span class="arithmatex"&gt;\(s &amp;gt; 0\)&lt;/span&gt; ensures that &lt;span class="arithmatex"&gt;\(1 - e^{-\epsilon} = O(\epsilon)\)&lt;/span&gt; and hence&lt;/p&gt;
&lt;div class="arithmatex"&gt;\[
\left|\int_{C_\epsilon} f(z)\,dz\right| \leq \frac{\pi}{2}\epsilon^{s-1} \left(1-e^{-\epsilon} \right) = O(\epsilon^s) \to 0 \quad \text{as} \quad \epsilon \to 0^+. \tag{4}
\]&lt;/div&gt;
&lt;p&gt;Combining equations (1), (2), (3), and (4) in the limits &lt;span class="arithmatex"&gt;\(R \to \infty\)&lt;/span&gt; and &lt;span class="arithmatex"&gt;\(\epsilon \to 0^+\)&lt;/span&gt; yields&lt;/p&gt;
&lt;div class="arithmatex"&gt;\[
\begin{aligned}
\int_0^\infty x^{s-1} e^{ix}\,dx
&amp;amp;= e^{\frac{i\pi s}{2}} \int_0^\infty y^{s-1} e^{-y}\,dy \\
&amp;amp;= \left(\cos\left(\frac{\pi s}{2}\right) + i \sin\left(\frac{\pi s}{2}\right) \right) \Gamma(s).
\end{aligned}
\]&lt;/div&gt;
&lt;p&gt;Separating the imaginary and real parts gives, for &lt;span class="arithmatex"&gt;\(0 &amp;lt; s &amp;lt; 1\)&lt;/span&gt;,&lt;/p&gt;
&lt;div class="arithmatex"&gt;\[
\int_0^\infty x^{s-1} \sin(x)\,dx = \sin\left(\frac{\pi s}{2}\right)\Gamma(s), \tag{5}
\]&lt;/div&gt;
&lt;div class="arithmatex"&gt;\[
\int_0^\infty x^{s-1} \cos(x)\,dx = \cos\left(\frac{\pi s}{2}\right)\Gamma(s). \tag{6}
\]&lt;/div&gt;
&lt;h2&gt;Extending the sine integral to &lt;span class="arithmatex"&gt;\(-1 &amp;lt; s \leq 0\)&lt;/span&gt;&lt;/h2&gt;
&lt;p&gt;Because &lt;span class="arithmatex"&gt;\(\sin x = O(x)\)&lt;/span&gt; near &lt;span class="arithmatex"&gt;\(x=0\)&lt;/span&gt;, the sine integral &lt;span class="arithmatex"&gt;\(I(s) = \int_0^\infty x^{s-1} \sin(x)\,dx\)&lt;/span&gt; converges on the wider strip &lt;span class="arithmatex"&gt;\(-1 &amp;lt; s &amp;lt; 1\)&lt;/span&gt;. We have already proved that &lt;span class="arithmatex"&gt;\(I(s) = \sin\left(\frac{\pi s}{2}\right)\Gamma(s)\)&lt;/span&gt; for &lt;span class="arithmatex"&gt;\(0 &amp;lt; s &amp;lt; 1\)&lt;/span&gt;.&lt;/p&gt;
&lt;p&gt;Now suppose &lt;span class="arithmatex"&gt;\(-1 &amp;lt; s &amp;lt; 0\)&lt;/span&gt;. Integrating by parts with &lt;span class="arithmatex"&gt;\(u = \sin x\)&lt;/span&gt; and &lt;span class="arithmatex"&gt;\(dv = x^{s-1}\,dx\)&lt;/span&gt; gives&lt;/p&gt;
&lt;div class="arithmatex"&gt;\[
I(s) = \left[ \frac{x^s \sin(x)}{s} \right]_0^\infty - \frac{1}{s}\int_0^\infty x^s \cos(x)\,dx.
\]&lt;/div&gt;
&lt;p&gt;At the upper limit &lt;span class="arithmatex"&gt;\(x \to \infty\)&lt;/span&gt;, &lt;span class="arithmatex"&gt;\(|x^s \sin x| \leq x^s \to 0\)&lt;/span&gt; because &lt;span class="arithmatex"&gt;\(s &amp;lt; 0\)&lt;/span&gt;; at the lower limit &lt;span class="arithmatex"&gt;\(x \to 0^+\)&lt;/span&gt;, &lt;span class="arithmatex"&gt;\(x^s \sin x \sim x^{s+1} \to 0\)&lt;/span&gt; because &lt;span class="arithmatex"&gt;\(s &amp;gt; -1\)&lt;/span&gt;. Moreover, since &lt;span class="arithmatex"&gt;\(0 &amp;lt; s+1 &amp;lt; 1\)&lt;/span&gt;, we can apply equation (6) with &lt;span class="arithmatex"&gt;\(s+1\)&lt;/span&gt; in place of &lt;span class="arithmatex"&gt;\(s\)&lt;/span&gt;, together with the functional equation &lt;span class="arithmatex"&gt;\(\Gamma(s+1) = s\Gamma(s)\)&lt;/span&gt;:&lt;/p&gt;
&lt;div class="arithmatex"&gt;\[
\begin{aligned}
I(s) &amp;amp;= -\frac{1}{s} \int_0^\infty x^{(s+1)-1} \cos(x)\,dx \\
&amp;amp;= -\frac{1}{s} \cos\left(\frac{\pi}{2}(s+1) \right)\Gamma(s+1) \\
&amp;amp;= \sin\left(\frac{\pi s}{2}\right)\Gamma(s).
\end{aligned}
\]&lt;/div&gt;
&lt;p&gt;Finally, the case &lt;span class="arithmatex"&gt;\(s=0\)&lt;/span&gt; is the classic Dirichlet integral&lt;/p&gt;
&lt;div class="arithmatex"&gt;\[
I(0) = \int_0^\infty \frac{\sin(x)}{x}\,dx = \frac{\pi}{2},
\]&lt;/div&gt;
&lt;p&gt;which matches the removable singularity of &lt;span class="arithmatex"&gt;\(\sin\left(\frac{\pi s}{2}\right)\Gamma(s)\)&lt;/span&gt; at &lt;span class="arithmatex"&gt;\(s=0\)&lt;/span&gt;:&lt;/p&gt;
&lt;div class="arithmatex"&gt;\[
\lim_{s\to 0} \left[ \sin\left(\frac{\pi s}{2}\right)\Gamma(s) \right] = \lim_{s\to 0} \left[ \frac{\sin\left(\frac{\pi s}{2}\right)}{s}\Gamma(s+1) \right] = \frac{\pi}{2}.
\]&lt;/div&gt;
&lt;p&gt;In &lt;a href="https://integralsandseries.in/2026/10/24/evaluating-a-logarithmic-fresnel-integral-by-differentiating-under-the-integral-sign/"&gt;a companion post&lt;/a&gt;, we differentiate this identity at &lt;span class="arithmatex"&gt;\(s=0\)&lt;/span&gt; to evaluate a logarithmic Fresnel integral.&lt;/p&gt;</content><category term="Contour Integration"/><category term="contour-integration"/><category term="gamma-function"/><category term="mellin-transform"/><category term="trigonometric-integrals"/></entry><entry><title>The Fourier transform of the hyperbolic secant</title><link href="https://integralsandseries.in/2026/10/24/the-fourier-transform-of-the-hyperbolic-secant/" rel="alternate"/><published>2026-10-24T10:04:00+05:30</published><updated>2026-10-24T10:04:00+05:30</updated><author><name>Shobhit Bhatnagar</name></author><id>tag:integralsandseries.in,2026-10-24:/2026/10/24/the-fourier-transform-of-the-hyperbolic-secant/</id><summary type="html">&lt;p&gt;Residue calculus on a rectangular contour shows that the hyperbolic secant is its own Fourier transform up to scaling.&lt;/p&gt;</summary><content type="html">&lt;p&gt;A classic property of the hyperbolic secant &lt;span class="arithmatex"&gt;\(\operatorname{sech}(\pi x) = \frac{1}{\cosh(\pi x)}\)&lt;/span&gt; is that, like the Gaussian, it is an eigenfunction of the Fourier transform. We will prove that for &lt;span class="arithmatex"&gt;\(a &amp;gt; 0\)&lt;/span&gt;,&lt;/p&gt;
&lt;div class="arithmatex"&gt;\[
\int_{-\infty}^\infty \frac{e^{ia x}}{\cosh(\pi x)}\,dx = \frac{1}{\cosh\left(\frac{a}{2}\right)}.
\]&lt;/div&gt;
&lt;p&gt;Since &lt;span class="arithmatex"&gt;\(\cosh(\pi x)\)&lt;/span&gt; is an even function, the imaginary part &lt;span class="arithmatex"&gt;\(\int_{-\infty}^\infty \frac{\sin(ax)}{\cosh(\pi x)}\,dx\)&lt;/span&gt; vanishes by symmetry, so the formula is symmetric in &lt;span class="arithmatex"&gt;\(a\)&lt;/span&gt; and holds for all real &lt;span class="arithmatex"&gt;\(a \in \mathbb{R}\)&lt;/span&gt;.&lt;/p&gt;
&lt;h2&gt;Method 1: An expanding rectangular contour&lt;/h2&gt;
&lt;p&gt;Let &lt;span class="arithmatex"&gt;\(f(z) = \frac{e^{iaz}}{\cosh(\pi z)}\)&lt;/span&gt;. The poles of &lt;span class="arithmatex"&gt;\(f(z)\)&lt;/span&gt; occur where &lt;span class="arithmatex"&gt;\(\cosh(\pi z) = 0\)&lt;/span&gt;, namely at&lt;/p&gt;
&lt;div class="arithmatex"&gt;\[
z_n = \frac{(2n+1)i}{2}, \qquad n \in \mathbb{Z},
\]&lt;/div&gt;
&lt;p&gt;all of which lie on the imaginary axis with spacing &lt;span class="arithmatex"&gt;\(i\)&lt;/span&gt;. For each positive integer &lt;span class="arithmatex"&gt;\(N \in \{1, 2, \dots\}\)&lt;/span&gt;, define &lt;span class="arithmatex"&gt;\(B_N\)&lt;/span&gt; to be the positively oriented rectangle with vertices &lt;span class="arithmatex"&gt;\(-N\)&lt;/span&gt;, &lt;span class="arithmatex"&gt;\(N\)&lt;/span&gt;, &lt;span class="arithmatex"&gt;\(N+iN\)&lt;/span&gt;, and &lt;span class="arithmatex"&gt;\(-N+iN\)&lt;/span&gt;:&lt;/p&gt;
&lt;p&gt;&lt;img alt="Expanding rectangular contour B_N in the upper half-plane enclosing N poles on the imaginary axis" src="https://integralsandseries.in/images/contour-rectangle-cosh-poles.svg"&gt;&lt;/p&gt;
&lt;p&gt;Choosing the top edge at height &lt;span class="arithmatex"&gt;\(\operatorname{Im} z = N\)&lt;/span&gt; ensures that the contour passes halfway between the poles &lt;span class="arithmatex"&gt;\(z_{N-1} = \left(N-\frac{1}{2}\right)i\)&lt;/span&gt; and &lt;span class="arithmatex"&gt;\(z_N = \left(N+\frac{1}{2}\right)i\)&lt;/span&gt;, enclosing exactly the &lt;span class="arithmatex"&gt;\(N\)&lt;/span&gt; simple poles &lt;span class="arithmatex"&gt;\(z_0, z_1, \dots, z_{N-1}\)&lt;/span&gt;.&lt;/p&gt;
&lt;p&gt;At &lt;span class="arithmatex"&gt;\(z_n = \frac{(2n+1)i}{2}\)&lt;/span&gt;, we have &lt;span class="arithmatex"&gt;\(\frac{d}{dz}\cosh(\pi z)\big|_{z=z_n} = \pi\sinh\left(i\pi\left(n+\frac{1}{2}\right)\right) = \pi i (-1)^n\)&lt;/span&gt;, so the residue is&lt;/p&gt;
&lt;div class="arithmatex"&gt;\[
\mathop{\operatorname{Res}}_{z=\frac{(2n+1)i}{2}} \frac{e^{iaz}}{\cosh(\pi z)} = \frac{e^{-a\left(n+\frac{1}{2}\right)}}{\pi i (-1)^n} = \frac{(-1)^n e^{-\frac{a}{2}} e^{-an}}{\pi i}.
\]&lt;/div&gt;
&lt;p&gt;Applying the residue theorem to &lt;span class="arithmatex"&gt;\(B_N\)&lt;/span&gt; and taking &lt;span class="arithmatex"&gt;\(N \to \infty\)&lt;/span&gt; gives a convergent geometric series (since &lt;span class="arithmatex"&gt;\(a &amp;gt; 0\)&lt;/span&gt; implies &lt;span class="arithmatex"&gt;\(e^{-a} &amp;lt; 1\)&lt;/span&gt;):&lt;/p&gt;
&lt;div class="arithmatex"&gt;\[
\begin{aligned}
\lim_{N\to \infty}\int_{B_N}\frac{e^{ia z}}{\cosh(\pi z)}\,dz
&amp;amp;= 2\pi i \sum_{n=0}^\infty \mathop{\operatorname{Res}}_{z=\frac{(2n+1)i}{2}} \frac{e^{ia z}}{\cosh(\pi z)} \\
&amp;amp;= 2\pi i \left(\frac{e^{-\frac{a}{2}}}{\pi i}\sum_{n=0}^\infty (-1)^n e^{-an}\right) \\
&amp;amp;= \frac{2e^{-\frac{a}{2}}}{1 + e^{-a}} \\
&amp;amp;= \frac{1}{\cosh\left(\frac{a}{2}\right)}.
\end{aligned}
\]&lt;/div&gt;
&lt;p&gt;To verify that only the integral along the bottom edge &lt;span class="arithmatex"&gt;\([-N, N]\)&lt;/span&gt; survives as &lt;span class="arithmatex"&gt;\(N \to \infty\)&lt;/span&gt;, we estimate the other three sides:&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;&lt;strong&gt;Top edge&lt;/strong&gt; (&lt;span class="arithmatex"&gt;\(z = x + iN\)&lt;/span&gt;, &lt;span class="arithmatex"&gt;\(-N \leq x \leq N\)&lt;/span&gt;): Since &lt;span class="arithmatex"&gt;\(\cosh(\pi(x+iN)) = (-1)^N\cosh(\pi x)\)&lt;/span&gt; and &lt;span class="arithmatex"&gt;\(|e^{ia(x+iN)}| = e^{-aN}\)&lt;/span&gt;,&lt;/li&gt;
&lt;/ul&gt;
&lt;div class="arithmatex"&gt;\[
\left|\int_{-N}^{N} \frac{e^{ia(x+iN)}}{\cosh(\pi(x+iN))}\,dx\right| \leq e^{-aN}\int_{-\infty}^\infty \frac{dx}{\cosh(\pi x)} = e^{-aN} \to 0 \quad (N \to \infty).
\]&lt;/div&gt;
&lt;ul&gt;
&lt;li&gt;&lt;strong&gt;Vertical edges&lt;/strong&gt; (&lt;span class="arithmatex"&gt;\(z = \pm N + iy\)&lt;/span&gt;, &lt;span class="arithmatex"&gt;\(0 \leq y \leq N\)&lt;/span&gt;): By the reverse triangle inequality, &lt;span class="arithmatex"&gt;\(|\cosh(\pi(\pm N + iy))| \geq \sinh(\pi N)\)&lt;/span&gt;, while &lt;span class="arithmatex"&gt;\(|e^{ia(\pm N + iy)}| = e^{-ay} \leq 1\)&lt;/span&gt;, so&lt;/li&gt;
&lt;/ul&gt;
&lt;div class="arithmatex"&gt;\[
\left|\int_0^N \frac{e^{ia(\pm N + iy)}}{\cosh(\pi(\pm N + iy))}\,i\,dy\right| \leq \frac{N}{\sinh(\pi N)} \to 0 \quad (N \to \infty).
\]&lt;/div&gt;
&lt;p&gt;Consequently,&lt;/p&gt;
&lt;div class="arithmatex"&gt;\[
\int_{-\infty}^\infty \frac{e^{ia x}}{\cosh(\pi x)}\,dx = \lim_{N\to \infty}\int_{B_N}\frac{e^{ia z}}{\cosh(\pi z)}\,dz = \frac{1}{\cosh\left(\frac{a}{2}\right)}.
\]&lt;/div&gt;
&lt;h2&gt;Method 2: A fixed-height strip enclosing a single pole&lt;/h2&gt;
&lt;p&gt;We can also avoid summing an infinite series of residues by using a rectangle &lt;span class="arithmatex"&gt;\(\Gamma_R\)&lt;/span&gt; of fixed height &lt;span class="arithmatex"&gt;\(1\)&lt;/span&gt; with vertices &lt;span class="arithmatex"&gt;\(-R\)&lt;/span&gt;, &lt;span class="arithmatex"&gt;\(R\)&lt;/span&gt;, &lt;span class="arithmatex"&gt;\(R+i\)&lt;/span&gt;, and &lt;span class="arithmatex"&gt;\(-R+i\)&lt;/span&gt;. Since &lt;span class="arithmatex"&gt;\(\cosh(\pi(x+i)) = -\cosh(\pi x)\)&lt;/span&gt;, the top edge is a constant multiple of the bottom edge:&lt;/p&gt;
&lt;div class="arithmatex"&gt;\[
\int_{R+i}^{-R+i} \frac{e^{iaz}}{\cosh(\pi z)}\,dz = e^{-a}\int_{-R}^R \frac{e^{iax}}{\cosh(\pi x)}\,dx.
\]&lt;/div&gt;
&lt;p&gt;The vertical sides are bounded by &lt;span class="arithmatex"&gt;\(\frac{1}{\sinh(\pi R)} \to 0\)&lt;/span&gt; as &lt;span class="arithmatex"&gt;\(R \to \infty\)&lt;/span&gt;, and &lt;span class="arithmatex"&gt;\(\Gamma_R\)&lt;/span&gt; encloses only the single pole at &lt;span class="arithmatex"&gt;\(z_0 = \frac{i}{2}\)&lt;/span&gt;. The residue theorem then gives&lt;/p&gt;
&lt;div class="arithmatex"&gt;\[
(1 + e^{-a})\int_{-\infty}^\infty \frac{e^{iax}}{\cosh(\pi x)}\,dx = 2\pi i \mathop{\operatorname{Res}}_{z=\frac{i}{2}} \frac{e^{iaz}}{\cosh(\pi z)} = 2\pi i \left(\frac{e^{-\frac{a}{2}}}{\pi i}\right) = 2e^{-\frac{a}{2}},
\]&lt;/div&gt;
&lt;p&gt;which immediately divides through to &lt;span class="arithmatex"&gt;\(\frac{1}{\cosh(a/2)}\)&lt;/span&gt; for every &lt;span class="arithmatex"&gt;\(a \in \mathbb{R}\)&lt;/span&gt; (and, by analytic continuation, for every complex &lt;span class="arithmatex"&gt;\(a\)&lt;/span&gt; in the strip &lt;span class="arithmatex"&gt;\(|\operatorname{Im} a| &amp;lt; \pi\)&lt;/span&gt;).&lt;/p&gt;</content><category term="Contour Integration"/><category term="contour-integration"/><category term="residue-theorem"/><category term="fourier-series"/><category term="infinite-series"/></entry><entry><title>A real integral evaluated over a rectangular contour</title><link href="https://integralsandseries.in/2026/10/24/a-real-integral-evaluated-over-a-rectangular-contour/" rel="alternate"/><published>2026-10-24T10:03:00+05:30</published><updated>2026-10-24T10:03:00+05:30</updated><author><name>Shobhit Bhatnagar</name></author><id>tag:integralsandseries.in,2026-10-24:/2026/10/24/a-real-integral-evaluated-over-a-rectangular-contour/</id><summary type="html">&lt;p&gt;Integrating a meromorphic function around a horizontal strip of height two pi evaluates a real integral mixing exponential and rational factors.&lt;/p&gt;</summary><content type="html">&lt;p&gt;When an integrand combines exponential functions with a rational factor such as &lt;span class="arithmatex"&gt;\(\frac{1}{x^2+\pi^2}\)&lt;/span&gt;, a rectangular contour of height &lt;span class="arithmatex"&gt;\(2\pi\)&lt;/span&gt; can exploit the periodicity of &lt;span class="arithmatex"&gt;\(e^z\)&lt;/span&gt; in the imaginary direction while building the rational factor from the difference of two simple fractions. Using this technique, we will prove that for every &lt;span class="arithmatex"&gt;\(a \in \mathbb{R}\)&lt;/span&gt;,&lt;/p&gt;
&lt;div class="arithmatex"&gt;\[
\int_{-\infty}^\infty \frac{e^x}{e^{2x}+e^{2a}}\frac{1}{x^2+\pi^2}\,dx = \frac{2\pi e^{-a}}{4a^2+\pi^2}-\frac{1}{1+e^{2a}}.
\]&lt;/div&gt;
&lt;h2&gt;Setting up the rectangular contour&lt;/h2&gt;
&lt;p&gt;Consider the complex function&lt;/p&gt;
&lt;div class="arithmatex"&gt;\[
f(z) = \frac{e^z}{(e^{2z}+e^{2a})z}.
\]&lt;/div&gt;
&lt;p&gt;Notice why &lt;span class="arithmatex"&gt;\(f(z)\)&lt;/span&gt; is well suited to the horizontal lines &lt;span class="arithmatex"&gt;\(\operatorname{Im} z = \pm \pi\)&lt;/span&gt;: on those lines &lt;span class="arithmatex"&gt;\(e^{x \pm i\pi} = -e^x\)&lt;/span&gt; and &lt;span class="arithmatex"&gt;\(e^{2(x \pm i\pi)} = e^{2x}\)&lt;/span&gt;, so the exponential factor &lt;span class="arithmatex"&gt;\(\frac{e^z}{e^{2z}+e^{2a}}\)&lt;/span&gt; takes the exact same value &lt;span class="arithmatex"&gt;\(-\frac{e^x}{e^{2x}+e^{2a}}\)&lt;/span&gt; on both horizontal edges, while the remaining factor &lt;span class="arithmatex"&gt;\(\frac{1}{z}\)&lt;/span&gt; produces&lt;/p&gt;
&lt;div class="arithmatex"&gt;\[
\frac{1}{x-i\pi} - \frac{1}{x+i\pi} = \frac{2\pi i}{x^2+\pi^2}.
\]&lt;/div&gt;
&lt;p&gt;Let &lt;span class="arithmatex"&gt;\(\Gamma\)&lt;/span&gt; be the positively oriented rectangle in the complex plane with vertices &lt;span class="arithmatex"&gt;\(R-i\pi\)&lt;/span&gt;, &lt;span class="arithmatex"&gt;\(R+i\pi\)&lt;/span&gt;, &lt;span class="arithmatex"&gt;\(-R+i\pi\)&lt;/span&gt;, and &lt;span class="arithmatex"&gt;\(-R-i\pi\)&lt;/span&gt;, where &lt;span class="arithmatex"&gt;\(R &amp;gt; |a|\)&lt;/span&gt;:&lt;/p&gt;
&lt;p&gt;&lt;img alt="Positively oriented rectangular contour with vertices at plus or minus R plus or minus i pi enclosing three simple poles" src="https://integralsandseries.in/images/contour-rectangle-shifted-poles.svg"&gt;&lt;/p&gt;
&lt;h2&gt;Computing the residues inside the contour&lt;/h2&gt;
&lt;p&gt;Inside &lt;span class="arithmatex"&gt;\(\Gamma\)&lt;/span&gt;, the denominator &lt;span class="arithmatex"&gt;\((e^{2z}+e^{2a})z\)&lt;/span&gt; vanishes at three points, each of which is a simple pole of &lt;span class="arithmatex"&gt;\(f(z)\)&lt;/span&gt;:&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;At &lt;span class="arithmatex"&gt;\(z = 0\)&lt;/span&gt;, the residue is&lt;/li&gt;
&lt;/ul&gt;
&lt;div class="arithmatex"&gt;\[
\mathop{\operatorname{Res}}_{z=0} f(z) = \lim_{z \to 0} z f(z) = \frac{1}{1+e^{2a}}.
\]&lt;/div&gt;
&lt;ul&gt;
&lt;li&gt;The solutions of &lt;span class="arithmatex"&gt;\(e^{2z} = -e^{2a} = e^{2a \pm i\pi}\)&lt;/span&gt; with &lt;span class="arithmatex"&gt;\(\operatorname{Im} z \in (-\pi, \pi)\)&lt;/span&gt; are &lt;span class="arithmatex"&gt;\(z_\pm = a \pm \frac{i\pi}{2}\)&lt;/span&gt;. At a simple zero &lt;span class="arithmatex"&gt;\(z_0\)&lt;/span&gt; of &lt;span class="arithmatex"&gt;\(e^{2z}+e^{2a}\)&lt;/span&gt;, differentiating the denominator gives &lt;span class="arithmatex"&gt;\(\frac{d}{dz}(e^{2z}+e^{2a})\big|_{z=z_0} = 2e^{2z_0} = -2e^{2a}\)&lt;/span&gt;. Since &lt;span class="arithmatex"&gt;\(e^{a \pm i\pi/2} = \pm i e^a\)&lt;/span&gt;, the residues at &lt;span class="arithmatex"&gt;\(z_\pm\)&lt;/span&gt; are&lt;/li&gt;
&lt;/ul&gt;
&lt;div class="arithmatex"&gt;\[
\begin{aligned}
\mathop{\operatorname{Res}}_{z=a+\frac{i\pi}{2}} f(z)
&amp;amp;= \frac{e^{a+\frac{i\pi}{2}}}{-2e^{2a}\left(a+\frac{i\pi}{2}\right)} = -\frac{i e^{-a}}{2a+i\pi}, \\
\mathop{\operatorname{Res}}_{z=a-\frac{i\pi}{2}} f(z)
&amp;amp;= \frac{e^{a-\frac{i\pi}{2}}}{-2e^{2a}\left(a-\frac{i\pi}{2}\right)} = \frac{i e^{-a}}{2a-i\pi}.
\end{aligned}
\]&lt;/div&gt;
&lt;p&gt;By the residue theorem,&lt;/p&gt;
&lt;div class="arithmatex"&gt;\[
\begin{aligned}
\int_\Gamma f(z)\,dz
&amp;amp;= 2\pi i \left( \mathop{\operatorname{Res}}_{z=0} f(z) + \mathop{\operatorname{Res}}_{z=a+\frac{i\pi}{2}} f(z) + \mathop{\operatorname{Res}}_{z=a-\frac{i\pi}{2}} f(z)\right) \\
&amp;amp;= 2\pi i \left( \frac{1}{1+e^{2a}} - \frac{i e^{-a}}{2a+i\pi} + \frac{i e^{-a}}{2a-i\pi}\right) \\
&amp;amp;= 2\pi i \left( \frac{1}{1+e^{2a}} - \frac{2\pi e^{-a}}{4a^2 +\pi^2}\right).
\end{aligned} \tag{1}
\]&lt;/div&gt;
&lt;h2&gt;Relating the contour integral to the real integral&lt;/h2&gt;
&lt;p&gt;Breaking &lt;span class="arithmatex"&gt;\(\Gamma\)&lt;/span&gt; into its four sides and parameterizing the bottom and top edges by &lt;span class="arithmatex"&gt;\(z = x \mp i\pi\)&lt;/span&gt; for &lt;span class="arithmatex"&gt;\(x \in [-R, R]\)&lt;/span&gt;, we have&lt;/p&gt;
&lt;div class="arithmatex"&gt;\[
\begin{aligned}
\int_\Gamma f(z)\,dz
&amp;amp;= \int_{-R-i\pi}^{R-i\pi} f(z)\,dz + \int_{R-i\pi}^{R+i\pi} f(z)\,dz + \int_{R+i\pi}^{-R+i\pi} f(z)\,dz + \int_{-R+i\pi}^{-R-i\pi} f(z)\,dz \\
&amp;amp;= \int_{-R}^{R} \bigl(f(x-i\pi)-f(x+i\pi)\bigr)\,dx + \int_{R-i\pi}^{R+i\pi} f(z)\,dz + \int_{-R+i\pi}^{-R-i\pi} f(z)\,dz \\
&amp;amp;= -2\pi i \int_{-R}^{R} \frac{e^x}{e^{2x}+e^{2a}}\frac{1}{x^2+\pi^2}\,dx + \int_{R-i\pi}^{R+i\pi} f(z)\,dz + \int_{-R+i\pi}^{-R-i\pi} f(z)\,dz.
\end{aligned} \tag{2}
\]&lt;/div&gt;
&lt;h2&gt;Bounding the vertical segments&lt;/h2&gt;
&lt;p&gt;On the right vertical edge &lt;span class="arithmatex"&gt;\(z = R + iy\)&lt;/span&gt; with &lt;span class="arithmatex"&gt;\(y \in [-\pi, \pi]\)&lt;/span&gt;, we have &lt;span class="arithmatex"&gt;\(|R+iy| \geq R\)&lt;/span&gt; and, by the reverse triangle inequality for &lt;span class="arithmatex"&gt;\(R &amp;gt; |a|\)&lt;/span&gt;,&lt;/p&gt;
&lt;div class="arithmatex"&gt;\[
|e^{2R+2iy} + e^{2a}| = e^{2R}|e^{2iy} + e^{2a-2R}| \geq e^{2R}(1 - e^{2a-2R}).
\]&lt;/div&gt;
&lt;p&gt;Hence&lt;/p&gt;
&lt;div class="arithmatex"&gt;\[
\begin{aligned}
\left| \int_{R-i\pi}^{R+i\pi} f(z)\,dz\right|
&amp;amp;= \left|\int_{-\pi}^\pi f(R+iy)\,i\,dy \right| \\
&amp;amp;\leq e^R \int_{-\pi}^\pi \frac{dy}{|R+iy|\cdot |e^{2R+2iy}+e^{2a}|} \\
&amp;amp;\leq \frac{e^{-R}}{R} \int_{-\pi}^\pi \frac{dy}{|e^{2iy}+e^{2a-2R}|} \\
&amp;amp;\leq \frac{e^{-R}}{R} \frac{2\pi}{1-e^{2a-2R}}.
\end{aligned} \tag{3}
\]&lt;/div&gt;
&lt;p&gt;Similarly, on the left vertical edge &lt;span class="arithmatex"&gt;\(z = -R + iy\)&lt;/span&gt;, we have &lt;span class="arithmatex"&gt;\(|e^z| = e^{-R}\)&lt;/span&gt; and &lt;span class="arithmatex"&gt;\(|e^{-2R+2iy} + e^{2a}| \geq e^{2a} - e^{-2R}\)&lt;/span&gt; for &lt;span class="arithmatex"&gt;\(R &amp;gt; |a|\)&lt;/span&gt;, so&lt;/p&gt;
&lt;div class="arithmatex"&gt;\[
\left|\int_{-R+i\pi}^{-R-i\pi} f(z)\,dz \right| \leq \frac{e^{-R}}{R}\frac{2\pi}{e^{2a}-e^{-2R}}. \tag{4}
\]&lt;/div&gt;
&lt;p&gt;From bounds (3) and (4), both vertical integrals tend to &lt;span class="arithmatex"&gt;\(0\)&lt;/span&gt; as &lt;span class="arithmatex"&gt;\(R \to \infty\)&lt;/span&gt;. Equating (1) and (2) in the limit &lt;span class="arithmatex"&gt;\(R \to \infty\)&lt;/span&gt; and dividing by &lt;span class="arithmatex"&gt;\(-2\pi i\)&lt;/span&gt; yields&lt;/p&gt;
&lt;div class="arithmatex"&gt;\[
\int_{-\infty}^\infty \frac{e^x}{e^{2x}+e^{2a}}\frac{1}{x^2+\pi^2}\,dx = \frac{2\pi e^{-a}}{4a^2+\pi^2}-\frac{1}{1+e^{2a}}.
\]&lt;/div&gt;</content><category term="Contour Integration"/><category term="contour-integration"/><category term="residue-theorem"/><category term="definite-integrals"/></entry><entry><title>An algebraic integral with a fifth root via the beta function</title><link href="https://integralsandseries.in/2026/10/24/an-algebraic-integral-with-a-fifth-root-via-the-beta-function/" rel="alternate"/><published>2026-10-24T10:02:00+05:30</published><updated>2026-10-24T10:02:00+05:30</updated><author><name>Shobhit Bhatnagar</name></author><id>tag:integralsandseries.in,2026-10-24:/2026/10/24/an-algebraic-integral-with-a-fifth-root-via-the-beta-function/</id><summary type="html">&lt;p&gt;Reflecting the interval of integration and applying Euler's reflection formula evaluates a definite integral involving a fifth root.&lt;/p&gt;</summary><content type="html">&lt;p&gt;In &lt;a href="https://integralsandseries.in/2026/10/24/a-parametric-beta-integral-with-a-shifted-linear-denominator/"&gt;the previous post&lt;/a&gt;, we showed that for &lt;span class="arithmatex"&gt;\(a, b, p &amp;gt; 0\)&lt;/span&gt;,&lt;/p&gt;
&lt;div class="arithmatex"&gt;\[
\int_0^1 x^{a-1}(1-x)^{b-1} \frac{dx}{(x+p)^{a+b}} = \frac{\Gamma(a)\Gamma(b)}{\Gamma(a+b)}\frac{1}{(1+p)^{a} p^b}.
\]&lt;/div&gt;
&lt;p&gt;We can use this identity, together with Euler's reflection formula for the gamma function, to evaluate the algebraic integral&lt;/p&gt;
&lt;div class="arithmatex"&gt;\[
\int_{0}^{1}\frac{1}{(2-x)\sqrt[5]{x^{2}(1-x)^{3}}}\,dx = \frac{2\pi \sqrt[10]{2}}{\sqrt{5+\sqrt{5}}}.
\]&lt;/div&gt;
&lt;h2&gt;Matching the parametric form&lt;/h2&gt;
&lt;p&gt;Perform the reflection substitution &lt;span class="arithmatex"&gt;\(t = 1-x\)&lt;/span&gt;, so that &lt;span class="arithmatex"&gt;\(dx = -dt\)&lt;/span&gt; and &lt;span class="arithmatex"&gt;\(2-x = 1+t\)&lt;/span&gt;. The integral becomes&lt;/p&gt;
&lt;div class="arithmatex"&gt;\[
\begin{aligned}
\int_0^1 \frac{1}{(2-x)\sqrt[5]{x^2(1-x)^3}}\,dx
&amp;amp;= \int_0^1 \frac{1}{(1+t)\sqrt[5]{(1-t)^2 t^3}}\,dt \\
&amp;amp;= \int_0^1 t^{-\frac{3}{5}}(1-t)^{-\frac{2}{5}}\frac{dt}{1+t} \\
&amp;amp;= \int_0^1 t^{\frac{2}{5}-1}(1-t)^{\frac{3}{5}-1}\frac{dt}{(t+1)^{\frac{2}{5}+\frac{3}{5}}}.
\end{aligned}
\]&lt;/div&gt;
&lt;p&gt;This is now the special case &lt;span class="arithmatex"&gt;\(a = \frac{2}{5}\)&lt;/span&gt;, &lt;span class="arithmatex"&gt;\(b = \frac{3}{5}\)&lt;/span&gt;, and &lt;span class="arithmatex"&gt;\(p = 1\)&lt;/span&gt; of &lt;a href="https://integralsandseries.in/2026/10/24/a-parametric-beta-integral-with-a-shifted-linear-denominator/"&gt;our parametric beta integral&lt;/a&gt;. Since &lt;span class="arithmatex"&gt;\(a+b = 1\)&lt;/span&gt; and &lt;span class="arithmatex"&gt;\(\Gamma(1) = 1\)&lt;/span&gt;, we get&lt;/p&gt;
&lt;div class="arithmatex"&gt;\[
\int_0^1 \frac{1}{(2-x)\sqrt[5]{x^2(1-x)^3}}\,dx = \frac{\Gamma\left(\frac{2}{5}\right)\Gamma\left(\frac{3}{5}\right)}{2^{\frac{2}{5}}}.
\]&lt;/div&gt;
&lt;h2&gt;Simplifying with Euler's reflection formula&lt;/h2&gt;
&lt;p&gt;By Euler's reflection formula, &lt;span class="arithmatex"&gt;\(\Gamma(s)\Gamma(1-s) = \frac{\pi}{\sin(\pi s)}\)&lt;/span&gt; for &lt;span class="arithmatex"&gt;\(s \notin \mathbb{Z}\)&lt;/span&gt;. Taking &lt;span class="arithmatex"&gt;\(s = \frac{2}{5}\)&lt;/span&gt; gives&lt;/p&gt;
&lt;div class="arithmatex"&gt;\[
\Gamma\left(\frac{2}{5}\right)\Gamma\left(\frac{3}{5}\right) = \frac{\pi}{\sin\left(\frac{2\pi}{5}\right)}.
\]&lt;/div&gt;
&lt;p&gt;Recall the exact trigonometric value&lt;/p&gt;
&lt;div class="arithmatex"&gt;\[
\sin\left(\frac{2\pi}{5}\right) = \frac{\sqrt{10+2\sqrt{5}}}{4} = \frac{\sqrt{5+\sqrt{5}}}{2\sqrt{2}}.
\]&lt;/div&gt;
&lt;p&gt;Substituting this into our expression and combining the powers of &lt;span class="arithmatex"&gt;\(2\)&lt;/span&gt; via &lt;span class="arithmatex"&gt;\(\frac{2\sqrt{2}}{2^{2/5}} = 2^{1 + \frac{1}{2} - \frac{2}{5}} = 2 \cdot 2^{\frac{1}{10}} = 2\sqrt[10]{2}\)&lt;/span&gt;, we arrive at&lt;/p&gt;
&lt;div class="arithmatex"&gt;\[
\begin{aligned}
\int_0^1 \frac{1}{(2-x)\sqrt[5]{x^2(1-x)^3}}\,dx
&amp;amp;= \frac{\pi}{2^{\frac{2}{5}} \sin\left(\frac{2\pi}{5}\right)} \\
&amp;amp;= \frac{2\pi \sqrt[10]{2}}{\sqrt{5+\sqrt{5}}}.
\end{aligned}
\]&lt;/div&gt;</content><category term="Beta and Gamma Functions"/><category term="beta-function"/><category term="gamma-function"/><category term="definite-integrals"/></entry><entry><title>A parametric beta integral with a shifted linear denominator</title><link href="https://integralsandseries.in/2026/10/24/a-parametric-beta-integral-with-a-shifted-linear-denominator/" rel="alternate"/><published>2026-10-24T10:01:00+05:30</published><updated>2026-10-24T10:01:00+05:30</updated><author><name>Shobhit Bhatnagar</name></author><id>tag:integralsandseries.in,2026-10-24:/2026/10/24/a-parametric-beta-integral-with-a-shifted-linear-denominator/</id><summary type="html">&lt;p&gt;A homographic change of variables reduces a beta-type integral with a shifted linear denominator to Euler's beta function.&lt;/p&gt;</summary><content type="html">&lt;p&gt;Recall that Euler's beta function is defined for &lt;span class="arithmatex"&gt;\(\operatorname{Re} x &amp;gt; 0\)&lt;/span&gt; and &lt;span class="arithmatex"&gt;\(\operatorname{Re} y &amp;gt; 0\)&lt;/span&gt; by&lt;/p&gt;
&lt;div class="arithmatex"&gt;\[
B(x,y) = \int_0^1 t^{x-1}(1-t)^{y-1}\,dt = \frac{\Gamma(x)\Gamma(y)}{\Gamma(x+y)}.
\]&lt;/div&gt;
&lt;p&gt;When an extra linear factor &lt;span class="arithmatex"&gt;\((x+p)^{a+b}\)&lt;/span&gt; appears in the denominator with its exponent matching the sum of the two beta parameters, a homographic (Möbius) substitution removes the denominator completely while preserving the unit interval &lt;span class="arithmatex"&gt;\([0,1]\)&lt;/span&gt;. We will prove that for &lt;span class="arithmatex"&gt;\(a, b, p &amp;gt; 0\)&lt;/span&gt;,&lt;/p&gt;
&lt;div class="arithmatex"&gt;\[
\int_0^1 x^{a-1}(1-x)^{b-1} \frac{dx}{(x+p)^{a+b}} = \frac{\Gamma(a)\Gamma(b)}{\Gamma(a+b)}\frac{1}{(1+p)^{a} p^b}.
\]&lt;/div&gt;
&lt;h2&gt;The homographic substitution&lt;/h2&gt;
&lt;p&gt;Before changing variables, rewrite the integrand by grouping factors of &lt;span class="arithmatex"&gt;\(x+p\)&lt;/span&gt; with &lt;span class="arithmatex"&gt;\(x^{a-1}\)&lt;/span&gt;, &lt;span class="arithmatex"&gt;\((1-x)^{b-1}\)&lt;/span&gt;, and &lt;span class="arithmatex"&gt;\(dx\)&lt;/span&gt;:&lt;/p&gt;
&lt;div class="arithmatex"&gt;\[
x^{a-1}(1-x)^{b-1}\frac{dx}{(x+p)^{a+b}}
= \left(\frac{x}{x+p}\right)^{a-1}\left(\frac{1-x}{x+p}\right)^{b-1}\frac{dx}{(x+p)^2}.
\]&lt;/div&gt;
&lt;p&gt;Now perform the change of variables&lt;/p&gt;
&lt;div class="arithmatex"&gt;\[
\frac{x}{x+p} = \frac{t}{p+1}.
\]&lt;/div&gt;
&lt;p&gt;Notice that &lt;span class="arithmatex"&gt;\(x=0\)&lt;/span&gt; corresponds to &lt;span class="arithmatex"&gt;\(t=0\)&lt;/span&gt;, and &lt;span class="arithmatex"&gt;\(x=1\)&lt;/span&gt; corresponds to &lt;span class="arithmatex"&gt;\(t=1\)&lt;/span&gt;, so the limits of integration remain &lt;span class="arithmatex"&gt;\(0\)&lt;/span&gt; and &lt;span class="arithmatex"&gt;\(1\)&lt;/span&gt;. Differentiating both sides with respect to &lt;span class="arithmatex"&gt;\(x\)&lt;/span&gt; gives&lt;/p&gt;
&lt;div class="arithmatex"&gt;\[
\begin{aligned}
\frac{p}{(x+p)^2} &amp;amp;= \frac{1}{p+1}\frac{dt}{dx} \\
\implies \frac{dx}{(x+p)^2} &amp;amp;= \frac{dt}{p(p+1)}.
\end{aligned}
\]&lt;/div&gt;
&lt;p&gt;To express &lt;span class="arithmatex"&gt;\(\frac{1-x}{x+p}\)&lt;/span&gt; in terms of &lt;span class="arithmatex"&gt;\(t\)&lt;/span&gt;, observe that&lt;/p&gt;
&lt;div class="arithmatex"&gt;\[
\frac{1+p}{x+p} = 1 + \frac{1-x}{x+p}
\quad\text{and}\quad
1 - \frac{x}{x+p} = \frac{p}{x+p} = 1 - \frac{t}{p+1}.
\]&lt;/div&gt;
&lt;p&gt;Subtracting &lt;span class="arithmatex"&gt;\(\frac{x}{x+p} = \frac{t}{p+1}\)&lt;/span&gt; from &lt;span class="arithmatex"&gt;\(\frac{1+p}{x+p} = \frac{1+p}{p}\left(1 - \frac{t}{p+1}\right) = \frac{p+1-t}{p}\)&lt;/span&gt; yields&lt;/p&gt;
&lt;div class="arithmatex"&gt;\[
\frac{1-x}{x+p} = \frac{1-t}{p}.
\]&lt;/div&gt;
&lt;h2&gt;Reduction to the standard beta integral&lt;/h2&gt;
&lt;p&gt;Substituting these three relations into the integral, we obtain&lt;/p&gt;
&lt;div class="arithmatex"&gt;\[
\begin{aligned}
\int_0^1 x^{a-1}(1-x)^{b-1} \frac{dx}{(x+p)^{a+b}}
&amp;amp;= \int_0^1 \left(\frac{t}{p+1}\right)^{a-1}\left(\frac{1-t}{p}\right)^{b-1}\frac{dt}{p(p+1)} \\
&amp;amp;= \frac{1}{p^b(1+p)^a}\int_0^1 t^{a-1}(1-t)^{b-1}\,dt \\
&amp;amp;= \frac{1}{p^b(1+p)^a} B(a,b) \\
&amp;amp;= \frac{\Gamma(a)\Gamma(b)}{\Gamma(a+b)}\frac{1}{(1+p)^a p^b}.
\end{aligned}
\]&lt;/div&gt;
&lt;p&gt;By analytic continuation, the same identity remains valid for all complex parameters &lt;span class="arithmatex"&gt;\(\operatorname{Re} a &amp;gt; 0\)&lt;/span&gt; and &lt;span class="arithmatex"&gt;\(\operatorname{Re} b &amp;gt; 0\)&lt;/span&gt;, and for any &lt;span class="arithmatex"&gt;\(p \in \mathbb{C} \setminus [-1,0]\)&lt;/span&gt; using the principal branches of the powers. For a concrete application of this formula, see &lt;a href="https://integralsandseries.in/2026/10/24/an-algebraic-integral-with-a-fifth-root-via-the-beta-function/"&gt;an algebraic integral with a fifth root&lt;/a&gt;.&lt;/p&gt;</content><category term="Beta and Gamma Functions"/><category term="beta-function"/><category term="gamma-function"/><category term="definite-integrals"/></entry><entry><title>A proof of GR 3.255</title><link href="https://integralsandseries.in/2025/11/16/a-proof-of-gr-3-255/" rel="alternate"/><published>2025-11-16T12:04:08+00:00</published><updated>2025-12-13T05:56:20+00:00</updated><author><name>Shobhit Bhatnagar</name></author><id>tag:integralsandseries.in,2025-11-16:/2025/11/16/a-proof-of-gr-3-255/</id><summary type="html">&lt;p&gt;A change of variables and an inversion symmetry reduce integral 3.255 from Gradshteyn and Ryzhik to a beta integral.&lt;/p&gt;</summary><content type="html">&lt;p&gt;A quadratic denominator can make a beta-type integral look forbidding. For entry 3.255 in Gradshteyn and Ryzhik, a change of variables exposes an inversion symmetry and reduces the calculation to a standard beta integral. We will prove&lt;/p&gt;
&lt;div class="arithmatex"&gt;\[
\int _0^1 \frac{x^{\mu+\frac{1}{2}} (1-x)^{\mu-\frac{1}{2}}}{(c+2bx-ax^2)^{\mu+1}}dx = \frac{\sqrt{\pi}}{\left\{a + \left(\sqrt{c+2b-a} + \sqrt{c}\right)^2\right\}^{\mu+\frac{1}{2}}\sqrt{c+2b-a}} \frac{\Gamma \left(\mu + \frac{1}{2}\right)}{\Gamma\left(\mu+1\right)}
\]&lt;/div&gt;
&lt;p&gt;Assume that &lt;span class="arithmatex"&gt;\(a,b,c\)&lt;/span&gt; are real and&lt;/p&gt;
&lt;div class="arithmatex"&gt;\[
c&amp;gt;0,\qquad d:=c+2b-a&amp;gt;0,\qquad D:=a+(\sqrt d+\sqrt c)^2&amp;gt;0,
\qquad \operatorname{Re}\mu&amp;gt;-\frac12.
\]&lt;/div&gt;
&lt;p&gt;All powers of positive real numbers use the real logarithm. These hypotheses ensure that the denominator stays positive on &lt;span class="arithmatex"&gt;\([0,1]\)&lt;/span&gt; and that the endpoint singularities are integrable.&lt;/p&gt;
&lt;h2&gt;Move the endpoints to zero and infinity&lt;/h2&gt;
&lt;p&gt;Write the integral as &lt;span class="arithmatex"&gt;\(I\)&lt;/span&gt; and set &lt;span class="arithmatex"&gt;\(t=(1-x)/x\)&lt;/span&gt;, so that &lt;span class="arithmatex"&gt;\(x=1/(1+t)\)&lt;/span&gt;. The powers of &lt;span class="arithmatex"&gt;\(1+t\)&lt;/span&gt; cancel, leaving&lt;/p&gt;
&lt;div class="arithmatex"&gt;\[
I=\int_0^\infty\frac{t^{\mu-\frac12}}{\bigl(ct^2+2(c+b)t+d\bigr)^{\mu+1}}\,dt.
\]&lt;/div&gt;
&lt;p&gt;Now put &lt;span class="arithmatex"&gt;\(r=\sqrt{d/c}\)&lt;/span&gt;, &lt;span class="arithmatex"&gt;\(t=rs\)&lt;/span&gt;, and &lt;span class="arithmatex"&gt;\(h=(c+b)/\sqrt{cd}\)&lt;/span&gt;. Then&lt;/p&gt;
&lt;div class="arithmatex"&gt;\[
I=\frac{r^{\mu+\frac12}}{d^{\mu+1}}J,
\qquad
J=\int_0^\infty\frac{s^{\mu-\frac12}}{(s^2+2hs+1)^{\mu+1}}\,ds.
\]&lt;/div&gt;
&lt;p&gt;Notice that &lt;span class="arithmatex"&gt;\(D=2(c+b+\sqrt{cd})\)&lt;/span&gt;, so &lt;span class="arithmatex"&gt;\(D&amp;gt;0\)&lt;/span&gt; is equivalent to &lt;span class="arithmatex"&gt;\(h&amp;gt;-1\)&lt;/span&gt;. Consequently &lt;span class="arithmatex"&gt;\(s^2+2hs+1=(s-1)^2+2(h+1)s&amp;gt;0\)&lt;/span&gt; for &lt;span class="arithmatex"&gt;\(s&amp;gt;0\)&lt;/span&gt;.&lt;/p&gt;
&lt;h2&gt;Use the inversion symmetry&lt;/h2&gt;
&lt;p&gt;Replacing &lt;span class="arithmatex"&gt;\(s\)&lt;/span&gt; by &lt;span class="arithmatex"&gt;\(1/s\)&lt;/span&gt; in &lt;span class="arithmatex"&gt;\(J\)&lt;/span&gt; gives a second representation:&lt;/p&gt;
&lt;div class="arithmatex"&gt;\[
J=\int_0^\infty\frac{s^{\mu+\frac12}}{(s^2+2hs+1)^{\mu+1}}\,ds.
\]&lt;/div&gt;
&lt;p&gt;Average the two representations and factor a power of &lt;span class="arithmatex"&gt;\(s\)&lt;/span&gt; out of the denominator:&lt;/p&gt;
&lt;div class="arithmatex"&gt;\[
J=\int_0^\infty
\frac{s+1}{2s^{3/2}}\bigl(s+s^{-1}+2h\bigr)^{-\mu-1}\,ds.
\]&lt;/div&gt;
&lt;p&gt;The factor in front is exactly the derivative of &lt;span class="arithmatex"&gt;\(u=\sqrt s-1/\sqrt s\)&lt;/span&gt;. This substitution maps &lt;span class="arithmatex"&gt;\((0,\infty)\)&lt;/span&gt; onto the real line and satisfies &lt;span class="arithmatex"&gt;\(s+s^{-1}=u^2+2\)&lt;/span&gt;. Hence&lt;/p&gt;
&lt;div class="arithmatex"&gt;\[
J=\int_{-\infty}^{\infty}(u^2+2+2h)^{-\mu-1}\,du.
\]&lt;/div&gt;
&lt;h2&gt;Finish with the beta integral&lt;/h2&gt;
&lt;p&gt;For &lt;span class="arithmatex"&gt;\(A&amp;gt;0\)&lt;/span&gt; and &lt;span class="arithmatex"&gt;\(\operatorname{Re}\mu&amp;gt;-1/2\)&lt;/span&gt;, substituting &lt;span class="arithmatex"&gt;\(u=\sqrt A\,v\)&lt;/span&gt; and then using &lt;span class="arithmatex"&gt;\(v^2\)&lt;/span&gt; as a variable gives&lt;/p&gt;
&lt;div class="arithmatex"&gt;\[
\int_{-\infty}^{\infty}(u^2+A)^{-\mu-1}\,du
=A^{-\mu-\frac12}B\left(\frac12,\mu+\frac12\right)
=\frac{\sqrt\pi\,\Gamma(\mu+\frac12)}{\Gamma(\mu+1)}A^{-\mu-\frac12}.
\]&lt;/div&gt;
&lt;p&gt;Take &lt;span class="arithmatex"&gt;\(A=2+2h=D/\sqrt{cd}\)&lt;/span&gt; and restore the prefactor. The constants simplify as&lt;/p&gt;
&lt;div class="arithmatex"&gt;\[
\frac{r^{\mu+\frac12}}{d^{\mu+1}}
\left(\frac{D}{\sqrt{cd}}\right)^{-\mu-\frac12}
=\frac{1}{\sqrt d\,D^{\mu+\frac12}},
\]&lt;/div&gt;
&lt;p&gt;which is the claimed evaluation. The symmetry step is the key: averaging before substituting produces the exact differential needed for a single beta integral.&lt;/p&gt;</content><category term="Beta and Gamma Functions"/><category term="beta-function"/><category term="gamma-function"/><category term="definite-integrals"/></entry><entry><title>Integral representations of the reciprocal beta function</title><link href="https://integralsandseries.in/2023/11/27/integral-representations-of-the-reciprocal-beta-function/" rel="alternate"/><published>2023-11-27T18:28:58+00:00</published><updated>2026-10-24T00:00:00+05:30</updated><author><name>Shobhit Bhatnagar</name></author><id>tag:integralsandseries.in,2023-11-27:/2023/11/27/integral-representations-of-the-reciprocal-beta-function/</id><summary type="html">&lt;p&gt;A contour argument gives integral representations involving the reciprocal beta function and their logarithmic consequences.&lt;/p&gt;</summary><content type="html">&lt;p&gt;Integrating a suitable branch of a complex power around a contour gives a useful representation of the reciprocal beta function. We will derive the identity below and then differentiate related formulas to obtain logarithmic integrals:&lt;/p&gt;
&lt;div class="arithmatex"&gt;\[
\int_0^\pi \left(\sin(\theta) \right)^{\alpha-1} e^{i \beta \theta} \; d\theta = \frac{\pi e^{\frac{i \pi}{2} \beta}}{\alpha 2^{\alpha-1} B \left(\frac{\alpha+\beta+1}{2}, \frac{\alpha-\beta+1}{2} \right)}
\]&lt;/div&gt;
&lt;p&gt;We will first prove this for real parameters satisfying &lt;span class="arithmatex"&gt;\(\beta + 1&amp;gt;\alpha&amp;gt;0\)&lt;/span&gt;. An analytic-continuation argument at the end will show that the identity actually holds for every real &lt;span class="arithmatex"&gt;\(\alpha&amp;gt;0\)&lt;/span&gt; and every complex &lt;span class="arithmatex"&gt;\(\beta\)&lt;/span&gt;. Here &lt;span class="arithmatex"&gt;\(B(x,y) = \frac{\Gamma(x)\Gamma(y)}{\Gamma(x+y)}\)&lt;/span&gt; is the &lt;a href="https://mathworld.wolfram.com/BetaFunction.html"&gt;Beta function&lt;/a&gt;.&lt;/p&gt;
&lt;p&gt;The idea is to integrate the principal branch of &lt;span class="arithmatex"&gt;\(f(z) = (1-z^2)^{\alpha-1} (-iz)^{\beta - \alpha}\)&lt;/span&gt; around the following contour:&lt;/p&gt;
&lt;p&gt;&lt;img alt="Upper-half-plane contour for the reciprocal beta integral" src="https://integralsandseries.in/images/contour11.webp"&gt;&lt;/p&gt;
&lt;p&gt;where&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;&lt;span class="arithmatex"&gt;\(C_\epsilon\)&lt;/span&gt; is an arc parameterized by &lt;span class="arithmatex"&gt;\(e^{it}\)&lt;/span&gt;, where &lt;span class="arithmatex"&gt;\(\varphi_\epsilon\leq t \leq \pi - \varphi_\epsilon\)&lt;/span&gt; and &lt;span class="arithmatex"&gt;\(\varphi_\epsilon = \text{arctan}\left( \frac{\epsilon \sqrt{4-\epsilon^2}}{2-\epsilon^2}\right)\)&lt;/span&gt;.&lt;/li&gt;
&lt;li&gt;&lt;span class="arithmatex"&gt;\(I_{1,\epsilon}, \; I_{2,\epsilon}, \; I_{3,\epsilon}\)&lt;/span&gt; are circular indents of radius &lt;span class="arithmatex"&gt;\(\epsilon\)&lt;/span&gt; around the branch points -1, 1 and 0, respectively.&lt;/li&gt;
&lt;li&gt;&lt;span class="arithmatex"&gt;\(S_{1,\epsilon}\)&lt;/span&gt; is a line joining &lt;span class="arithmatex"&gt;\(-1+\epsilon\)&lt;/span&gt; and &lt;span class="arithmatex"&gt;\(-\epsilon\)&lt;/span&gt;.&lt;/li&gt;
&lt;li&gt;&lt;span class="arithmatex"&gt;\(S_{2,\epsilon}\)&lt;/span&gt; is a line joining &lt;span class="arithmatex"&gt;\(\epsilon\)&lt;/span&gt; and &lt;span class="arithmatex"&gt;\(1-\epsilon\)&lt;/span&gt;.&lt;/li&gt;
&lt;/ul&gt;
&lt;p&gt;The condition &lt;span class="arithmatex"&gt;\(\beta + 1 &amp;gt; \alpha &amp;gt; 0\)&lt;/span&gt; ensures that:&lt;/p&gt;
&lt;div class="arithmatex"&gt;\[
\lim_{\epsilon\to 0^+}\int_{I_{1,\epsilon}}f(z)\; dz = \lim_{\epsilon\to 0^+}\int_{I_{2,\epsilon}}f(z)\; dz = \lim_{\epsilon\to 0^+}\int_{I_{3,\epsilon}}f(z)\; dz = 0
\]&lt;/div&gt;
&lt;p&gt;We'll only prove that the integral around &lt;span class="arithmatex"&gt;\(I_{3,\epsilon}\)&lt;/span&gt; tends to 0 as &lt;span class="arithmatex"&gt;\(\epsilon \to 0^+\)&lt;/span&gt;. The proof is quite similar for &lt;span class="arithmatex"&gt;\(I_{1,\epsilon}\)&lt;/span&gt; and &lt;span class="arithmatex"&gt;\(I_{2,\epsilon}\)&lt;/span&gt;. We have&lt;/p&gt;
&lt;div class="arithmatex"&gt;\[
\begin{aligned}
\left| \int_{I_{3,\epsilon}} f(z) \; dz\right|
&amp;amp;= \left|-i\epsilon \int_0^\pi e^{it} f(\epsilon e^{it})\; dt\right| \\
&amp;amp;\leq \epsilon\int_0^\pi |f(\epsilon e^{it})| \; dt \\
&amp;amp;\leq \epsilon^{\beta-\alpha+1}
\int_0^\pi |1-\epsilon^2 e^{2it}|^{\alpha-1} \; dt.
\end{aligned}
\]&lt;/div&gt;
&lt;p&gt;For &lt;span class="arithmatex"&gt;\(0&amp;lt;\epsilon&amp;lt;1\)&lt;/span&gt; we have&lt;/p&gt;
&lt;div class="arithmatex"&gt;\[
1-\epsilon^2\leq |1-\epsilon^2e^{2it}|\leq 1+\epsilon^2,
\]&lt;/div&gt;
&lt;p&gt;we must distinguish the sign of the exponent &lt;span class="arithmatex"&gt;\(\alpha-1\)&lt;/span&gt;. More precisely,&lt;/p&gt;
&lt;div class="arithmatex"&gt;\[
|1-\epsilon^2e^{2it}|^{\alpha-1}
\leq M_\alpha(\epsilon)
:=
\begin{cases}
(1+\epsilon^2)^{\alpha-1}, &amp;amp; \alpha\geq 1,\\
(1-\epsilon^2)^{\alpha-1}, &amp;amp; 0&amp;lt;\alpha&amp;lt;1.
\end{cases}
\]&lt;/div&gt;
&lt;p&gt;Therefore,&lt;/p&gt;
&lt;div class="arithmatex"&gt;\[
\left| \int_{I_{3,\epsilon}} f(z) \; dz\right|
\leq \pi\epsilon^{\beta-\alpha+1}M_\alpha(\epsilon).
\]&lt;/div&gt;
&lt;p&gt;As &lt;span class="arithmatex"&gt;\(M_\alpha(\epsilon)\to1\)&lt;/span&gt;, the indentation integral tends to zero whenever &lt;span class="arithmatex"&gt;\(\beta-\alpha+1&amp;gt;0\)&lt;/span&gt;. Next, by Cauchy's theorem we have:&lt;/p&gt;
&lt;div class="arithmatex"&gt;\[
\begin{aligned}
\int_{-1}^1 f(z) \; dz &amp;amp;= -i\int_0^\pi e^{it}f(e^{it})\; dt
\end{aligned}
\]&lt;/div&gt;
&lt;p&gt;The integral on the left hand side is:&lt;/p&gt;
&lt;div class="arithmatex"&gt;\[
\begin{aligned}\int_{-1}^1 f(z) \; dz &amp;amp;= 2\cos\left( (\beta-\alpha)\frac{\pi}{2}\right)\int_0^1 (1-z^2)^{\alpha-1} z^{\beta-\alpha}\; dz \\ &amp;amp;= \cos\left( (\beta-\alpha)\frac{\pi}{2}\right) \int_0^1 (1-w)^{\alpha-1} w^{\frac{\beta-\alpha-1}{2}}\; dw \\ &amp;amp;= \cos\left( (\beta-\alpha)\frac{\pi}{2}\right) B\left(\alpha, \frac{\beta-\alpha+1}{2} \right) \\ &amp;amp;= \cos\left( (\beta-\alpha)\frac{\pi}{2}\right) \frac{\Gamma(\alpha) \Gamma\left(\frac{\beta-\alpha+1}{2} \right)}{\Gamma\left(\frac{\beta+\alpha+1}{2} \right)} \\ &amp;amp;= \frac{\pi \Gamma(\alpha)}{\Gamma\left(\frac{\beta+\alpha+1}{2} \right) \Gamma\left(\frac{-\beta+\alpha+1}{2} \right)} \\
&amp;amp;= \frac{\pi}{\alpha B \left(\frac{\alpha+\beta+1}{2}, \frac{\alpha-\beta+1}{2} \right)}\end{aligned}
\]&lt;/div&gt;
&lt;p&gt;The integral on the right hand side is:&lt;/p&gt;
&lt;div class="arithmatex"&gt;\[
\begin{aligned}-i\int_0^\pi e^{it}f(e^{it})\; dt &amp;amp;= \int_0^\pi (1-e^{2it})^{\alpha-1}(-i e^{it})^{\beta-\alpha+1} \; dt \\
&amp;amp;= \int_0^\pi (2\sin(t))^{\alpha-1}e^{i\beta t -\frac{i\pi}{2}\beta}\; dt \\
&amp;amp;= e^{-\frac{i\pi}{2}\beta} 2^{\alpha-1} \int_0^\pi (\sin (t))^{\alpha-1}e^{i\beta t}\; dt
\end{aligned}
\]&lt;/div&gt;
&lt;p&gt;Therefore, we have:&lt;/p&gt;
&lt;div class="arithmatex"&gt;\[
\begin{aligned}e^{-\frac{i\pi}{2}\beta} 2^{\alpha-1} \int_0^\pi (\sin (t))^{\alpha-1}e^{i\beta t}\; dt &amp;amp;=  \frac{\pi}{\alpha B \left(\frac{\alpha+\beta+1}{2}, \frac{\alpha-\beta+1}{2} \right)} \\ \implies \int_0^\pi \left(\sin(t) \right)^{\alpha-1} e^{i \beta t} \; dt &amp;amp;= \frac{\pi e^{\frac{i \pi}{2} \beta}}{\alpha 2^{\alpha-1} B \left(\frac{\alpha+\beta+1}{2}, \frac{\alpha-\beta+1}{2} \right)}\end{aligned}
\]&lt;/div&gt;
&lt;p&gt;We can use a similar technique to show that:&lt;/p&gt;
&lt;div class="arithmatex"&gt;\[
\int_{-\frac{\pi}{2}}^{\frac{\pi}{2}}\left(\cos(t)\right)^{\alpha-1}e^{i\beta t}\; dt = \frac{\pi}{\alpha 2^{\alpha-1} B \left(\frac{\alpha+\beta+1}{2}, \frac{\alpha-\beta+1}{2} \right)}, \quad \beta+1 &amp;gt; \alpha &amp;gt; 0
\]&lt;/div&gt;
&lt;h3&gt;Removing the restriction on &lt;span class="arithmatex"&gt;\(\beta\)&lt;/span&gt;&lt;/h3&gt;
&lt;p&gt;We now make the analytic-continuation argument precise. Fix a real &lt;span class="arithmatex"&gt;\(\alpha&amp;gt;0\)&lt;/span&gt; and define&lt;/p&gt;
&lt;div class="arithmatex"&gt;\[
F_\alpha(\beta)
:=e^{-\frac{i\pi\beta}{2}}
\int_0^\pi (\sin t)^{\alpha-1}e^{i\beta t}\;dt
=\int_{-\frac{\pi}{2}}^{\frac{\pi}{2}}
(\cos u)^{\alpha-1}e^{i\beta u}\;du.
\]&lt;/div&gt;
&lt;p&gt;The function &lt;span class="arithmatex"&gt;\(F_\alpha\)&lt;/span&gt; is entire in &lt;span class="arithmatex"&gt;\(\beta\)&lt;/span&gt;. Indeed, on every compact set of &lt;span class="arithmatex"&gt;\(\beta\)&lt;/span&gt;-values, the integrand and each of its derivatives with respect to &lt;span class="arithmatex"&gt;\(\beta\)&lt;/span&gt; are bounded by a constant times the integrable function &lt;span class="arithmatex"&gt;\((\cos u)^{\alpha-1}\)&lt;/span&gt;. Thus differentiation under the integral sign is valid to every order.&lt;/p&gt;
&lt;p&gt;On the other hand, put&lt;/p&gt;
&lt;div class="arithmatex"&gt;\[
G_\alpha(\beta)
:=\frac{\pi\Gamma(\alpha)}
{2^{\alpha-1}
\Gamma\left(\frac{\alpha+\beta+1}{2}\right)
\Gamma\left(\frac{\alpha-\beta+1}{2}\right)}.
\]&lt;/div&gt;
&lt;p&gt;This is also entire in &lt;span class="arithmatex"&gt;\(\beta\)&lt;/span&gt;, because &lt;a href="https://dlmf.nist.gov/5.2"&gt;&lt;span class="arithmatex"&gt;\(1/\Gamma(z)\)&lt;/span&gt; is an entire function&lt;/a&gt;. The contour argument above proves &lt;span class="arithmatex"&gt;\(F_\alpha(\beta)=G_\alpha(\beta)\)&lt;/span&gt; for every real &lt;span class="arithmatex"&gt;\(\beta&amp;gt;\alpha-1\)&lt;/span&gt;. This set has accumulation points in the complex plane, so the identity theorem gives&lt;/p&gt;
&lt;div class="arithmatex"&gt;\[
F_\alpha(\beta)=G_\alpha(\beta),\qquad \beta\in\mathbb C.
\]&lt;/div&gt;
&lt;p&gt;Multiplying by &lt;span class="arithmatex"&gt;\(e^{i\pi\beta/2}\)&lt;/span&gt; proves the original formula without the condition &lt;span class="arithmatex"&gt;\(\beta+1&amp;gt;\alpha\)&lt;/span&gt;. Notice that the integral on the left still converges for every complex &lt;span class="arithmatex"&gt;\(\beta\)&lt;/span&gt; when &lt;span class="arithmatex"&gt;\(\alpha&amp;gt;0\)&lt;/span&gt;; it is only the auxiliary beta integral along the real diameter that required the original restriction. The apparent poles on the right are harmless: when one of the gamma factors has a pole, its reciprocal is zero.&lt;/p&gt;
&lt;p&gt;The same identity is holomorphic in &lt;span class="arithmatex"&gt;\(\alpha\)&lt;/span&gt; on the half-plane &lt;span class="arithmatex"&gt;\(\operatorname{Re}(\alpha)&amp;gt;0\)&lt;/span&gt;. Applying the identity theorem once more, now with &lt;span class="arithmatex"&gt;\(\beta\)&lt;/span&gt; fixed and &lt;span class="arithmatex"&gt;\(\alpha\)&lt;/span&gt; as the variable, extends the result to every complex &lt;span class="arithmatex"&gt;\(\alpha\)&lt;/span&gt; with &lt;span class="arithmatex"&gt;\(\operatorname{Re}(\alpha)&amp;gt;0\)&lt;/span&gt;.&lt;/p&gt;
&lt;h3&gt;A lower-half-plane contour&lt;/h3&gt;
&lt;p&gt;There is a useful companion proof obtained by closing the contour in the lower half-plane. We cannot use exactly the same powers without crossing their branch cuts, so instead take principal branches in&lt;/p&gt;
&lt;div class="arithmatex"&gt;\[
g(z)=(1-z^2)^{\alpha-1}(iz)^{-\beta-\alpha}.
\]&lt;/div&gt;
&lt;p&gt;Use the lower unit semicircle, with the same small indentations at &lt;span class="arithmatex"&gt;\(-1\)&lt;/span&gt;, &lt;span class="arithmatex"&gt;\(0\)&lt;/span&gt;, and &lt;span class="arithmatex"&gt;\(1\)&lt;/span&gt;. For real &lt;span class="arithmatex"&gt;\(\alpha&amp;gt;0\)&lt;/span&gt; and &lt;span class="arithmatex"&gt;\(\beta&amp;lt;1-\alpha\)&lt;/span&gt;, the endpoint indentations are again &lt;span class="arithmatex"&gt;\(O(\left(\epsilon^\alpha\right))\)&lt;/span&gt;, while the indentation around the origin is&lt;/p&gt;
&lt;div class="arithmatex"&gt;\[
O\left(\epsilon^{1-\alpha-\beta}\right),
\]&lt;/div&gt;
&lt;p&gt;and hence all three vanish. On the real diameter,&lt;/p&gt;
&lt;div class="arithmatex"&gt;\[
\begin{aligned}
\int_{-1}^{1}g(x)\;dx
&amp;amp;=2\cos\left(\frac{\pi(\alpha+\beta)}{2}\right)
\int_0^1(1-x^2)^{\alpha-1}x^{-\alpha-\beta}\;dx\\
&amp;amp;=\cos\left(\frac{\pi(\alpha+\beta)}{2}\right)
B\left(\alpha,\frac{1-\alpha-\beta}{2}\right)\\
&amp;amp;=\frac{\pi\Gamma(\alpha)}
{\Gamma\left(\frac{\alpha+\beta+1}{2}\right)
\Gamma\left(\frac{\alpha-\beta+1}{2}\right)}.
\end{aligned}
\]&lt;/div&gt;
&lt;p&gt;Take the diameter from &lt;span class="arithmatex"&gt;\(-1\)&lt;/span&gt; to &lt;span class="arithmatex"&gt;\(1\)&lt;/span&gt; and then traverse the lower arc from &lt;span class="arithmatex"&gt;\(1\)&lt;/span&gt; back to &lt;span class="arithmatex"&gt;\(-1\)&lt;/span&gt;. Parameterizing that arc by &lt;span class="arithmatex"&gt;\(z=e^{-it}\)&lt;/span&gt; with &lt;span class="arithmatex"&gt;\(0&amp;lt;t&amp;lt;\pi\)&lt;/span&gt; gives&lt;/p&gt;
&lt;div class="arithmatex"&gt;\[
g(z)\,dz
=-2^{\alpha-1}e^{-\frac{i\pi\beta}{2}}
(\sin t)^{\alpha-1}e^{i\beta t}\;dt.
\]&lt;/div&gt;
&lt;p&gt;Cauchy's theorem therefore yields the same integral representation as before. This lower contour proves it directly in the second range &lt;span class="arithmatex"&gt;\(\beta&amp;lt;1-\alpha\)&lt;/span&gt;, whereas the upper contour proves it for &lt;span class="arithmatex"&gt;\(\beta&amp;gt;\alpha-1\)&lt;/span&gt;. If &lt;span class="arithmatex"&gt;\(0&amp;lt;\alpha&amp;lt;1\)&lt;/span&gt;, these two ranges together cover the entire real &lt;span class="arithmatex"&gt;\(\beta\)&lt;/span&gt;-axis. When &lt;span class="arithmatex"&gt;\(\alpha=1\)&lt;/span&gt;, they cover every real &lt;span class="arithmatex"&gt;\(\beta\)&lt;/span&gt; except &lt;span class="arithmatex"&gt;\(\beta=0\)&lt;/span&gt;, which follows immediately by continuity (or direct evaluation). For &lt;span class="arithmatex"&gt;\(\alpha&amp;gt;1\)&lt;/span&gt; there remains a gap &lt;span class="arithmatex"&gt;\(1-\alpha\leq\beta\leq\alpha-1\)&lt;/span&gt;, so the identity-theorem argument is still the clean way to obtain the unrestricted result.&lt;/p&gt;
&lt;p&gt;Many interesting logarithmic integrals can be derived using these identities by differentiating both sides with respect to the parameters &lt;span class="arithmatex"&gt;\(\alpha\)&lt;/span&gt; and &lt;span class="arithmatex"&gt;\(\beta\)&lt;/span&gt;. One such example is:&lt;/p&gt;
&lt;div class="arithmatex"&gt;\[
\int_0^{\frac{\pi}{2}} \theta^2 \log^2\left(\cos \theta\right)d\theta = \frac{11\pi^5}{1440}+\frac{\pi^3}{24}\log^2(2)+\frac{\pi}{2} \log(2)\zeta(3)
\]&lt;/div&gt;</content><category term="Beta and Gamma Functions"/><category term="beta-function"/><category term="gamma-function"/><category term="contour-integration"/><category term="logarithmic-integrals"/></entry><entry><title>Introduction to Theta Functions II</title><link href="https://integralsandseries.in/2021/05/27/introduction-to-theta-functions-ii/" rel="alternate"/><published>2021-05-27T18:36:01+00:00</published><updated>2026-10-24T00:00:00+05:30</updated><author><name>Shobhit Bhatnagar</name></author><id>tag:integralsandseries.in,2021-05-27:/2021/05/27/introduction-to-theta-functions-ii/</id><summary type="html">&lt;p&gt;Continue the study of theta functions with infinite products and connections to elliptic integrals.&lt;/p&gt;</summary><content type="html">&lt;p&gt;In &lt;a href="https://integralsandseries.in/2021/05/12/introduction-to-theta-functions-i/"&gt;part 1&lt;/a&gt;, we developed the basic identities for Jacobi's theta functions. We now derive their infinite product representations and use them to connect theta functions with elliptic integrals. We retain the convention &lt;span class="arithmatex"&gt;\(q=e^{i\pi\tau}\)&lt;/span&gt;, with &lt;span class="arithmatex"&gt;\(\operatorname{Im}\tau&amp;gt;0\)&lt;/span&gt;.&lt;/p&gt;
&lt;h2&gt;Infinite product representations of theta functions&lt;/h2&gt;
&lt;p&gt;Let &lt;span class="arithmatex"&gt;\(f(z) = \prod_{n=1}^{\infty} (1-q^{2n-1}e^{2iz})(1-q^{2n-1}e^{-2iz})\)&lt;/span&gt;. Each of these two products converges absolutely and uniformly in any bounded domain of values of &lt;span class="arithmatex"&gt;\(z\)&lt;/span&gt;. Hence &lt;span class="arithmatex"&gt;\(f(z)\)&lt;/span&gt; is analytic throughout the finite part of the &lt;span class="arithmatex"&gt;\(z\)&lt;/span&gt; plane. The zeros of &lt;span class="arithmatex"&gt;\(f(z)\)&lt;/span&gt; are simple zeros at the points &lt;span class="arithmatex"&gt;\(z=\frac{2n+1}{2}\pi\tau+m\pi\)&lt;/span&gt; where &lt;span class="arithmatex"&gt;\(m,n\in \mathbb{Z}\)&lt;/span&gt;. So, the zeros of &lt;span class="arithmatex"&gt;\(f(z)\)&lt;/span&gt; coincide with the zeros of &lt;span class="arithmatex"&gt;\(\vartheta_4(z)\)&lt;/span&gt;. Therefore, the function &lt;span class="arithmatex"&gt;\(\frac{\vartheta_4(z)}{f(z)}\)&lt;/span&gt; has no poles or zeros in the finite part of the plane. Also, it is easy to see that &lt;span class="arithmatex"&gt;\(f(z+\pi) = f(z)\)&lt;/span&gt; and&lt;/p&gt;
&lt;div class="arithmatex"&gt;\[
\begin{aligned}
f(z+\pi \tau) &amp;amp;= \prod_{n=1}^\infty (1-q^{2n+1}e^{2iz})(1-q^{2n-3}e^{-2iz}) \\
&amp;amp;= f(z) \frac{1-q^{-1}e^{-2iz}}{1-qe^{2iz}} \\
&amp;amp;= -q^{-1}e^{-2iz} f(z)
\end{aligned}
\]&lt;/div&gt;
&lt;p&gt;That is, &lt;span class="arithmatex"&gt;\(\frac{\vartheta_4(z)}{f(z)}\)&lt;/span&gt; is a doubly periodic function with periods &lt;span class="arithmatex"&gt;\(\pi,\pi\tau\)&lt;/span&gt; and has no poles and zeros. By section 20.12 of [2], it is simply a constant, say &lt;span class="arithmatex"&gt;\(G\)&lt;/span&gt;. We have&lt;/p&gt;
&lt;div class="arithmatex"&gt;\[
\begin{equation}\label{introduction-to-theta-functions-ii-eq-1}
\vartheta_4(z) = G \prod_{n=1}^{\infty} (1-q^{2n-1}e^{2iz})(1-q^{2n-1}e^{-2iz})
\end{equation}
\]&lt;/div&gt;
&lt;p&gt;Incrementing &lt;span class="arithmatex"&gt;\(z\)&lt;/span&gt; by the half periods &lt;span class="arithmatex"&gt;\(\frac{\pi}{2}, \frac{\pi \tau}{2}\)&lt;/span&gt; and &lt;span class="arithmatex"&gt;\(\frac{\pi +\pi\tau}{2}\)&lt;/span&gt;, we get the product representations for the other theta functions:&lt;/p&gt;
&lt;div class="arithmatex"&gt;\[
\begin{align}
\vartheta_3(z) &amp;amp;= G \prod_{n=1}^{\infty} (1+q^{2n-1}e^{2iz})(1+q^{2n-1}e^{-2iz})\label{introduction-to-theta-functions-ii-eq-2}\\
\vartheta_1(z) &amp;amp;= 2G q^{\frac{1}{4}}\sin(z) \prod_{n=1}^{\infty} (1-q^{2n}e^{2iz})(1-q^{2n}e^{-2iz}) \label{introduction-to-theta-functions-ii-eq-3}\\
\vartheta_2(z) &amp;amp;= 2G q^{\frac{1}{4}}\cos(z) \prod_{n=1}^{\infty} (1+q^{2n}e^{2iz})(1+q^{2n}e^{-2iz}) \label{introduction-to-theta-functions-ii-eq-4}
\end{align}
\]&lt;/div&gt;
&lt;p&gt;Now, all that is left is to find the constant &lt;span class="arithmatex"&gt;\(G\)&lt;/span&gt;. From identity &lt;span class="arithmatex"&gt;\(\eqref{introduction-to-theta-functions-ii-eq-3}\)&lt;/span&gt;, it is easy to see that&lt;/p&gt;
&lt;div class="arithmatex"&gt;\[
\vartheta_1'(0) = 2G q^{\frac{1}{4}}\prod_{n=1}^{\infty} (1-q^{2n})^2
\]&lt;/div&gt;
&lt;p&gt;Now, using the identity &lt;span class="arithmatex"&gt;\(\vartheta_1'(0)=\vartheta_2(0)\vartheta_3(0)\vartheta_4(0)\)&lt;/span&gt;, we get:&lt;/p&gt;
&lt;div class="arithmatex"&gt;\[
\begin{aligned}
2G q^{\frac{1}{4}}\prod_{n=1}^{\infty} (1-q^{2n})^2 &amp;amp;= \left\{2G q^{\frac{1}{4}}\prod_{n=1}^{\infty}(1+q^{2n})^2 \right\} \times \left\{G\prod_{n=1}^{\infty}(1+q^{2n-1})^2 \right\} \\ &amp;amp;\quad \times \left\{G \prod_{n=1}^{\infty}(1-q^{2n-1})^2 \right\} \\
\implies G &amp;amp;= \prod_{n=1}^\infty (1-q^{2n})
\end{aligned}
\]&lt;/div&gt;
&lt;p&gt;Note that the rearrangements are justified since all products converge absolutely. Finally, we have&lt;/p&gt;
&lt;div class="arithmatex"&gt;\[
\begin{align}
\vartheta_1(z) &amp;amp;= 2 q^{\frac{1}{4}}\sin(z) \prod_{n=1}^{\infty} (1-q^{2n})(1-2q^{2n} \cos(2z)+ q^{4n}) \label{introduction-to-theta-functions-ii-eq-5}\\
\vartheta_2(z) &amp;amp;= 2 q^{\frac{1}{4}}\cos(z) \prod_{n=1}^{\infty} (1-q^{2n})(1+2q^{2n} \cos(2z) + q^{4n}) \label{introduction-to-theta-functions-ii-eq-6}\\
\vartheta_3(z) &amp;amp;= \prod_{n=1}^{\infty} (1-q^{2n})(1+2q^{2n-1} \cos(2z) + q^{4n-2}) \label{introduction-to-theta-functions-ii-eq-7}\\
\vartheta_4(z) &amp;amp;= \prod_{n=1}^{\infty} (1-q^{2n})(1-2q^{2n-1} \cos(2z) + q^{4n-2}) \label{introduction-to-theta-functions-ii-eq-8}
\end{align}
\]&lt;/div&gt;
&lt;h2&gt;Derivatives of Ratios of Theta Functions&lt;/h2&gt;
&lt;p&gt;Consider the function &lt;span class="arithmatex"&gt;\(\phi(z) = \frac{\vartheta_1'(z)\vartheta_4(z) - \vartheta_1(z)\vartheta_4'(z)}{\vartheta_2(z)\vartheta_3(z)}\)&lt;/span&gt;. Now, &lt;span class="arithmatex"&gt;\(\phi(z)\)&lt;/span&gt; is doubly periodic with periods &lt;span class="arithmatex"&gt;\(\pi\)&lt;/span&gt; and &lt;span class="arithmatex"&gt;\(\frac{\pi\tau}{2}\)&lt;/span&gt;. Relative to these periods, the only possible poles of &lt;span class="arithmatex"&gt;\(\phi(z)\)&lt;/span&gt; are at points congruent to &lt;span class="arithmatex"&gt;\(\pi\over 2\)&lt;/span&gt;. It is easy to verify that &lt;span class="arithmatex"&gt;\(\frac{\pi}{2}\)&lt;/span&gt; is a removable singularity. This means that &lt;span class="arithmatex"&gt;\(\phi(z)\)&lt;/span&gt; is a constant. Letting &lt;span class="arithmatex"&gt;\(z\to 0\)&lt;/span&gt;, we see that &lt;span class="arithmatex"&gt;\(\phi(z)=\vartheta_4^2(0)\)&lt;/span&gt;. It is therefore established that&lt;/p&gt;
&lt;div class="arithmatex"&gt;\[
\begin{equation}\label{introduction-to-theta-functions-ii-eq-9}
\frac{d}{dz}\left(\frac{\vartheta_1(z)}{\vartheta_4(z)} \right)=\vartheta_4^2(0) \frac{\vartheta_2(z)\vartheta_3(z)}{\vartheta_4^2(z)}
\end{equation}
\]&lt;/div&gt;
&lt;p&gt;Two other identities of this kind can be derived using the same technique:&lt;/p&gt;
&lt;div class="arithmatex"&gt;\[
\begin{align}
\frac{d}{dz}\left(\frac{\vartheta_2(z)}{\vartheta_4(z)} \right) &amp;amp;=-\vartheta_3^2(0) \frac{\vartheta_1(z)\vartheta_3(z)}{\vartheta_4^2(z)} \label{introduction-to-theta-functions-ii-eq-10}\\
\frac{d}{dz}\left(\frac{\vartheta_3(z)}{\vartheta_4(z)} \right) &amp;amp;=-\vartheta_2^2(0) \frac{\vartheta_1(z)\vartheta_2(z)}{\vartheta_4^2(z)} \label{introduction-to-theta-functions-ii-eq-11}
\end{align}
\]&lt;/div&gt;
&lt;p&gt;By writing &lt;span class="arithmatex"&gt;\(\xi = \frac{\vartheta_1(z)}{\vartheta_4(z)}\)&lt;/span&gt; and using identities (13) and (14) from &lt;a href="https://integralsandseries.in/2021/05/12/introduction-to-theta-functions-i/"&gt;part 1&lt;/a&gt;, we obtain:&lt;/p&gt;
&lt;div class="arithmatex"&gt;\[
\left(\frac{d\xi}{dz}\right)^2 = (\vartheta_2^2(0) - \xi^2 \vartheta_3^2(0))(\vartheta_3^2(0)-\xi^2 \vartheta_2^2(0))
\]&lt;/div&gt;
&lt;p&gt;Using the change of variables &lt;span class="arithmatex"&gt;\(y = \frac{\vartheta_3(0)}{\vartheta_2(0)}\xi\)&lt;/span&gt; and &lt;span class="arithmatex"&gt;\(u = \vartheta_3^2(0) z\)&lt;/span&gt;, the above differential equation can be written as:&lt;/p&gt;
&lt;div class="arithmatex"&gt;\[
\left(\frac{dy}{du}\right)^2 = (1-y^2)(1-k^2 y^2)
\]&lt;/div&gt;
&lt;p&gt;where &lt;span class="arithmatex"&gt;\(k = \frac{\vartheta_2^2(0)}{\vartheta_3^2(0)}\)&lt;/span&gt;. This differential equation has the particular solution:&lt;/p&gt;
&lt;div class="arithmatex"&gt;\[
y = \frac{\vartheta_3(0)}{\vartheta_2(0)} \frac{\vartheta_1(u \vartheta_3^{-2}(0))}{\vartheta_4(u \vartheta_3^{-2}(0))}
\]&lt;/div&gt;
&lt;p&gt;We can write &lt;span class="arithmatex"&gt;\(y\)&lt;/span&gt; as a function of &lt;span class="arithmatex"&gt;\(u\)&lt;/span&gt; and &lt;span class="arithmatex"&gt;\(k\)&lt;/span&gt; as &lt;span class="arithmatex"&gt;\(y = \text{sn}(u,k)\)&lt;/span&gt; or simply &lt;span class="arithmatex"&gt;\(\text{sn}(u)\)&lt;/span&gt;. Clearly, &lt;span class="arithmatex"&gt;\(\text{sn}(u,k)\)&lt;/span&gt; has periods &lt;span class="arithmatex"&gt;\(2\pi \vartheta^2_3(0)\)&lt;/span&gt; and &lt;span class="arithmatex"&gt;\(\pi \tau \vartheta_3^2(0)\)&lt;/span&gt;. It has two simple poles congruent to &lt;span class="arithmatex"&gt;\(\frac{1}{2}\pi\tau \vartheta_3^2(0)\)&lt;/span&gt; and &lt;span class="arithmatex"&gt;\(\pi \vartheta_3^2(0) + \frac{1}{2}\pi\tau \vartheta_3^2(0)\)&lt;/span&gt;. Also, it is easy to see that&lt;/p&gt;
&lt;div class="arithmatex"&gt;\[
\int_0^1 \frac{dy}{\sqrt{(1-y^2)(1-k^2 y^2)}} = \text{sn}^{-1}(1) = \frac{\pi}{2}\vartheta_3^2(0)
\]&lt;/div&gt;
&lt;p&gt;The integral on the left is denoted by complete elliptic integral of the first kind and is denoted by &lt;span class="arithmatex"&gt;\(K(k)\)&lt;/span&gt;.&lt;/p&gt;
&lt;h2&gt;References&lt;/h2&gt;
&lt;ol&gt;
&lt;li&gt;Derek F. Lawden (1989). &lt;em&gt;Elliptic Functions and Applications&lt;/em&gt;. Springer-Verlag New York&lt;/li&gt;
&lt;li&gt;E. T. Whittaker, G. N. Watson (1927). &lt;em&gt;A Course of Modern Analysis&lt;/em&gt;. Cambridge University Press&lt;/li&gt;
&lt;/ol&gt;</content><category term="Elliptic Functions and Integrals"/><category term="elliptic-functions"/><category term="elliptic-integrals"/><category term="infinite-series"/></entry><entry><title>Introduction to Theta Functions I</title><link href="https://integralsandseries.in/2021/05/12/introduction-to-theta-functions-i/" rel="alternate"/><published>2021-05-12T18:01:49+00:00</published><updated>2026-10-24T00:00:00+05:30</updated><author><name>Shobhit Bhatnagar</name></author><id>tag:integralsandseries.in,2021-05-12:/2021/05/12/introduction-to-theta-functions-i/</id><summary type="html">&lt;p&gt;Begin with Jacobi's theta series and derive their periodicity, zeros, and fundamental identities.&lt;/p&gt;</summary><content type="html">&lt;p&gt;Jacobi's theta functions connect rapidly convergent series with doubly periodic functions. In this first part, we will work from their series definitions to their periodicity, zeros, and fundamental identities.&lt;/p&gt;
&lt;h2&gt;The four theta functions&lt;/h2&gt;
&lt;p&gt;For complex &lt;span class="arithmatex"&gt;\(z\)&lt;/span&gt; and a nonzero nome &lt;span class="arithmatex"&gt;\(q\)&lt;/span&gt; with &lt;span class="arithmatex"&gt;\(|q|&amp;lt;1\)&lt;/span&gt;, the four functions are defined by the following series. Fractional powers of &lt;span class="arithmatex"&gt;\(q\)&lt;/span&gt; are understood consistently by writing &lt;span class="arithmatex"&gt;\(q=e^{i\pi\tau}\)&lt;/span&gt; with &lt;span class="arithmatex"&gt;\(\operatorname{Im}\tau&amp;gt;0\)&lt;/span&gt;.&lt;/p&gt;
&lt;div class="arithmatex"&gt;\[
\begin{aligned}
\vartheta_1 (z,q) &amp;amp;= -i \sum_{n=-\infty}^{\infty} (-1)^n q^{(n+1/2)^2} e^{i(2n+1)z} \\
\vartheta_2 (z,q) &amp;amp;= \sum_{n=-\infty}^{\infty} q^{(n+1/2)^2} e^{i(2n+1)z} \\
\vartheta_3 (z,q) &amp;amp;= \sum_{n=-\infty}^{\infty} q^{n^2} e^{2inz} \\  
\vartheta_4 (z,q) &amp;amp;= \sum_{n=-\infty}^{\infty} (-1)^n q^{n^2} e^{2inz} \\ 
\end{aligned}
\]&lt;/div&gt;
&lt;p&gt;The parameter &lt;span class="arithmatex"&gt;\(q\)&lt;/span&gt; is called the nome. Let &lt;span class="arithmatex"&gt;\(\tau\)&lt;/span&gt; be a complex number whose imaginary part is positive and write &lt;span class="arithmatex"&gt;\(q=e^{i\pi \tau}\)&lt;/span&gt; so that &lt;span class="arithmatex"&gt;\(|q| &amp;lt; 1\)&lt;/span&gt;. Sometimes, &lt;span class="arithmatex"&gt;\(q\)&lt;/span&gt; will not be specified, so that &lt;span class="arithmatex"&gt;\(\vartheta_r (z)\)&lt;/span&gt; is written for &lt;span class="arithmatex"&gt;\(\vartheta_r(z,q)\)&lt;/span&gt; where &lt;span class="arithmatex"&gt;\(r=1,2,3,4\)&lt;/span&gt;. It is easy to see that&lt;/p&gt;
&lt;div class="arithmatex"&gt;\[
\begin{aligned}
\vartheta_1(z+\pi) &amp;amp;= -i e^{i \pi}\sum_{n=-\infty}^{\infty}(-1)^n q^{\left(n+\frac{1}{2}\right)^2}e^{i(2n+1)z} = -\vartheta_1(z) \\
\vartheta_1(z+\pi \tau) &amp;amp;= i e^{-i\pi \tau -2iz} \sum_{n=-\infty}^{\infty} (-1)^{n+1} e^{i\pi \tau \left( n+\frac{3}{2}\right)^2 + (2n+3) iz} = - (q e^{2iz})^{-1} \vartheta_1(z)
\end{aligned}
\]&lt;/div&gt;
&lt;p&gt;Similarly, the periodicity laws for the other theta functions can be derived as well. The multipliers of the theta functions associated with the periods &lt;span class="arithmatex"&gt;\(\pi\)&lt;/span&gt; and &lt;span class="arithmatex"&gt;\(\pi \tau\)&lt;/span&gt; are summarized in the following table:&lt;/p&gt;
&lt;div class="arithmatex"&gt;\[
\begin{array}{|c|c|c|c|c|}
\hline
\omega &amp;amp; \vartheta_1(z+\omega) &amp;amp; \vartheta_2(z+\omega) &amp;amp; \vartheta_3(z+\omega) &amp;amp; \vartheta_4(z+\omega) \\ \hline \hline
\pi &amp;amp; -1 &amp;amp; -1 &amp;amp; 1 &amp;amp; 1 \\ \hline
\pi \tau &amp;amp; -\lambda &amp;amp; \lambda &amp;amp; \lambda &amp;amp; -\lambda \\ \hline
\end{array}
\]&lt;/div&gt;
&lt;p&gt;where &lt;span class="arithmatex"&gt;\(\lambda = (q e^{2iz})^{-1}\)&lt;/span&gt;. Furthermore, incrementation of &lt;span class="arithmatex"&gt;\(z\)&lt;/span&gt; by the half periods &lt;span class="arithmatex"&gt;\(\frac{\pi}{2}, \frac{\pi \tau}{2}, \frac{\pi +\pi \tau}{2}\)&lt;/span&gt; yields the following identities:&lt;/p&gt;
&lt;div class="arithmatex"&gt;\[
\begin{array}{|c|c|c|c|c|}
\hline
\omega &amp;amp; \vartheta_1(z+\omega) &amp;amp; \vartheta_2(z+\omega) &amp;amp; \vartheta_3(z+\omega) &amp;amp; \vartheta_4(z+\omega) \\ \hline \hline
\frac{\pi}{2} &amp;amp; \vartheta_2(z) &amp;amp; -\vartheta_1(z) &amp;amp; \vartheta_4(z) &amp;amp; \vartheta_3(z) \\ \hline
\frac{\pi \tau}{2} &amp;amp; i \mu \vartheta_4(z) &amp;amp; \mu \vartheta_3(z) &amp;amp; \mu \vartheta_2(z) &amp;amp; i\mu \vartheta_1(z) \\ \hline
\frac{\pi + \pi \tau}{2} &amp;amp; \mu \vartheta_3(z) &amp;amp; -i\mu \vartheta_4(z) &amp;amp; i\mu \vartheta_1(z) &amp;amp; \mu \vartheta_2(z) \\ \hline
\end{array}
\]&lt;/div&gt;
&lt;p&gt;where &lt;span class="arithmatex"&gt;\(\mu = (q^{\frac{1}{4}}e^{iz})^{-1}\)&lt;/span&gt;.&lt;/p&gt;
&lt;h2&gt;Identities involving products of theta functions&lt;/h2&gt;
&lt;p&gt;Many theta function identities can be derived by multiplying their series and rearranging the terms. This is ok to do since both the series are absolutely convergent. For e.g., we have&lt;/p&gt;
&lt;div class="arithmatex"&gt;\[
\begin{aligned}
\vartheta_3(x,q)\vartheta_3(y,q) &amp;amp;= \left(\sum_{n=-\infty}^{\infty} q^{n^2} e^{2inx} \right)\left(\sum_{m=-\infty}^{\infty} q^{m^2} e^{2imy} \right) \\
&amp;amp;= \sum_{n=-\infty}^\infty \sum_{m=-\infty}^\infty q^{n^2+m^2}e^{2i(nx+my)}
\end{aligned}
\]&lt;/div&gt;
&lt;p&gt;Now, we change the summation indices from &lt;span class="arithmatex"&gt;\((m,n)\)&lt;/span&gt; to &lt;span class="arithmatex"&gt;\((r,s)\)&lt;/span&gt; using the following transformation:&lt;/p&gt;
&lt;div class="arithmatex"&gt;\[
\begin{aligned}
r &amp;amp;= m+n \\
s &amp;amp;= m-n
\end{aligned}
\]&lt;/div&gt;
&lt;p&gt;If &lt;span class="arithmatex"&gt;\((m,n)\)&lt;/span&gt; are both even then &lt;span class="arithmatex"&gt;\((r,s)\)&lt;/span&gt; will both be even and if &lt;span class="arithmatex"&gt;\((m,n)\)&lt;/span&gt; have opposite parity then &lt;span class="arithmatex"&gt;\((r,s)\)&lt;/span&gt; will both be odd. Therefore, we can rearrange the series as follows:&lt;/p&gt;
&lt;div class="arithmatex"&gt;\[
\begin{equation}\label{introduction-to-theta-functions-i-eq-1}
\begin{aligned}
\vartheta_3(x,q)\vartheta_3(y,q) &amp;amp;= \sum_{r=-\infty}^{\infty} \sum_{s=-\infty}^{\infty} q^{2(r^2 +s^2)}e^{2i(r(x+y)+s(x-y))} \\ &amp;amp;\quad + \sum_{r=-\infty}^{\infty} \sum_{s=-\infty}^{\infty}q^{2\left[\left(r+\frac{1}{2} \right)^2 + \left(s+\frac{1}{2} \right)^2\right]} e^{i(2r+1)(x+y) + i(2s+1)(x-y)} \\
&amp;amp;= \vartheta_3(x+y,q^2)\vartheta_3(x-y,q^2) + \vartheta_2(x+y,q^2)\vartheta_2(x-y,q^2) 
\end{aligned}
\end{equation}
\]&lt;/div&gt;
&lt;p&gt;Some similar identities that can be derived using this method are:&lt;/p&gt;
&lt;div class="arithmatex"&gt;\[
\begin{align}
\vartheta_1(x,q) \vartheta_1(y,q) &amp;amp;= \vartheta_3(x+y,q^2)\vartheta_2(x-y,q^2) - \vartheta_2(x+y,q^2)\vartheta_3(x-y,q^2) \label{introduction-to-theta-functions-i-eq-2}\\
\vartheta_2(x,q) \vartheta_2(y,q) &amp;amp;= \vartheta_2(x+y,q^2)\vartheta_3(x-y,q^2) + \vartheta_3(x+y,q^2)\vartheta_2(x-y,q^2) \label{introduction-to-theta-functions-i-eq-3}\\
\vartheta_4(x,q) \vartheta_4(y,q) &amp;amp;= \vartheta_3(x+y,q^2)\vartheta_3(x-y,q^2) - \vartheta_2(x+y,q^2)\vartheta_2(x-y,q^2) \label{introduction-to-theta-functions-i-eq-4}\\
\vartheta_1(x,q) \vartheta_2(y,q) &amp;amp;= \vartheta_1(x+y,q^2)\vartheta_4(x-y,q^2) + \vartheta_4(x+y,q^2)\vartheta_1(x-y,q^2) \label{introduction-to-theta-functions-i-eq-5}\\
\vartheta_3(x,q) \vartheta_4(y,q) &amp;amp;= \vartheta_4(x+y,q^2)\vartheta_4(x-y,q^2) - \vartheta_1(x+y,q^2)\vartheta_1(x-y,q^2) \label{introduction-to-theta-functions-i-eq-6}
\end{align}
\]&lt;/div&gt;
&lt;p&gt;Squaring and subtracting identities &lt;span class="arithmatex"&gt;\(\eqref{introduction-to-theta-functions-i-eq-4}\)&lt;/span&gt; and &lt;span class="arithmatex"&gt;\(\eqref{introduction-to-theta-functions-i-eq-2}\)&lt;/span&gt; gives us:&lt;/p&gt;
&lt;div class="arithmatex"&gt;\[
\begin{equation}\label{introduction-to-theta-functions-i-eq-7}
\begin{aligned}
&amp;amp;\; \vartheta_4^2(x,q) \vartheta_4^2(y,q) - \vartheta_1^2(x,q) \vartheta_1^2(y,q)\\ 
&amp;amp;= \left[\vartheta_3^2(x+y,q^2)-\vartheta_2^2(x+y,q^2) \right]\times \left[\vartheta_3^2(x-y,q^2)-\vartheta_2^2(x-y,q^2) \right] 
\end{aligned}
\end{equation}
\]&lt;/div&gt;
&lt;p&gt;Putting &lt;span class="arithmatex"&gt;\(y=0\)&lt;/span&gt; in the above equation gives the result:&lt;/p&gt;
&lt;div class="arithmatex"&gt;\[
\vartheta_3^2(x,q^2)-\vartheta_2^2(x,q^2) = \vartheta_4(x,q)\vartheta_4(0,q)
\]&lt;/div&gt;
&lt;p&gt;Now, using the above result in equation &lt;span class="arithmatex"&gt;\(\eqref{introduction-to-theta-functions-i-eq-7}\)&lt;/span&gt; gives us:&lt;/p&gt;
&lt;div class="arithmatex"&gt;\[
\begin{equation}\label{introduction-to-theta-functions-i-eq-8}
\vartheta_4(x+y,q)\vartheta_4(x-y,q)\vartheta_4^2(0,q) = \vartheta_4^2(x,q) \vartheta_4^2(y,q) - \vartheta_1^2(x,q) \vartheta_1^2(y,q)
\end{equation}
\]&lt;/div&gt;
&lt;p&gt;Note that all theta functions in this equation have the same nome, &lt;span class="arithmatex"&gt;\(q\)&lt;/span&gt;. More identities of this type can be derived by incrementing &lt;span class="arithmatex"&gt;\(x\)&lt;/span&gt; and/or &lt;span class="arithmatex"&gt;\(y\)&lt;/span&gt; by the half periods &lt;span class="arithmatex"&gt;\(\frac{\pi}{2},\frac{\pi \tau}{2},\frac{\pi+\pi\tau}{2}\)&lt;/span&gt;:&lt;/p&gt;
&lt;div class="arithmatex"&gt;\[
\begin{align}
\vartheta_1(x+y)\vartheta_1(x-y)\vartheta_4^2(0) &amp;amp;= \vartheta_3^2(x) \vartheta_2^2(y) - \vartheta_2^2(x) \vartheta_3^2(y) \notag\\ &amp;amp;= \vartheta_1^2(x) \vartheta_4^2(y) - \vartheta_4^2(x) \vartheta_1^2(y)\label{introduction-to-theta-functions-i-eq-9}\\
\vartheta_2(x+y)\vartheta_2(x-y)\vartheta_4^2(0) &amp;amp;= \vartheta_4^2(x) \vartheta_2^2(y) - \vartheta_1^2(x) \vartheta_3^2(y) \notag\\ &amp;amp;= \vartheta_2^2(x) \vartheta_4^2(y) - \vartheta_3^2(x) \vartheta_1^2(y)\label{introduction-to-theta-functions-i-eq-10}\\
\vartheta_3(x+y)\vartheta_3(x-y)\vartheta_4^2(0) &amp;amp;= \vartheta_4^2(x) \vartheta_3^2(y) - \vartheta_1^2(x) \vartheta_2^2(y) \notag\\ &amp;amp;= \vartheta_3^2(x) \vartheta_4^2(y) - \vartheta_2^2(x) \vartheta_1^2(y)\label{introduction-to-theta-functions-i-eq-11}\\
\vartheta_4(x+y)\vartheta_4(x-y)\vartheta_4^2(0) &amp;amp;= \vartheta_3^2(x) \vartheta_3^2(y) - \vartheta_2^2(x) \vartheta_2^2(y) \notag\\ &amp;amp;= \vartheta_4^2(x) \vartheta_4^2(y) - \vartheta_1^2(x) \vartheta_1^2(y)\label{introduction-to-theta-functions-i-eq-12}
\end{align}
\]&lt;/div&gt;
&lt;p&gt;One can keep on deriving similar identities by squaring and adding equations &lt;span class="arithmatex"&gt;\(\eqref{introduction-to-theta-functions-i-eq-1}\)&lt;/span&gt; and &lt;span class="arithmatex"&gt;\(\eqref{introduction-to-theta-functions-i-eq-2}\)&lt;/span&gt; and squaring and subtracting equations &lt;span class="arithmatex"&gt;\(\eqref{introduction-to-theta-functions-i-eq-3}\)&lt;/span&gt; and &lt;span class="arithmatex"&gt;\(\eqref{introduction-to-theta-functions-i-eq-2}\)&lt;/span&gt;. For a complete list of such identities, refer to [1 sec 1.4].&lt;/p&gt;
&lt;p&gt;Another way to derive theta function identities is to utilize properties of doubly periodic functions. More details on this method are presented in [2]. Consider the function:&lt;/p&gt;
&lt;div class="arithmatex"&gt;\[
\frac{a \vartheta_1^2(z) + b \vartheta_4^2(z)}{\vartheta_2^2(z)}
\]&lt;/div&gt;
&lt;p&gt;This is a doubly periodic function with periods &lt;span class="arithmatex"&gt;\(\pi\)&lt;/span&gt; and &lt;span class="arithmatex"&gt;\(\pi \tau\)&lt;/span&gt;. Furthermore, we can choose the constants &lt;span class="arithmatex"&gt;\(a\)&lt;/span&gt; and &lt;span class="arithmatex"&gt;\(b\)&lt;/span&gt; such that there are no poles in each cell. By Liouville's Theorem, such a function is a constant. By appropriately scaling the constants &lt;span class="arithmatex"&gt;\(a\)&lt;/span&gt; and &lt;span class="arithmatex"&gt;\(b\)&lt;/span&gt;, we can make the function equal to 1. Therefore, there exists a relationship of the form:&lt;/p&gt;
&lt;div class="arithmatex"&gt;\[
a \vartheta_1^2(z) + b \vartheta_4^2(z) = \vartheta_2^2(z)
\]&lt;/div&gt;
&lt;p&gt;To find &lt;span class="arithmatex"&gt;\(a\)&lt;/span&gt; and &lt;span class="arithmatex"&gt;\(b\)&lt;/span&gt;, we can put &lt;span class="arithmatex"&gt;\(z = 0, \frac{\pi\tau}{2}\)&lt;/span&gt;:&lt;/p&gt;
&lt;div class="arithmatex"&gt;\[
\begin{aligned}
b \vartheta_4^2(0) &amp;amp;= \vartheta_2^2(0) \; \implies b = \frac{\vartheta_2^2(0)}{\vartheta_4^2(0)} \\
a (i \mu\vartheta_4(0))^2 &amp;amp;= (\mu \vartheta_3(0))^2 \; \implies a = -\frac{\vartheta_3^2(0)}{\vartheta_4^2(0)}
\end{aligned}
\]&lt;/div&gt;
&lt;p&gt;Thus, we have obtained the identity:&lt;/p&gt;
&lt;div class="arithmatex"&gt;\[
\begin{equation}\label{introduction-to-theta-functions-i-eq-13}
\vartheta_2^2(0) \vartheta_4^2(z) -\vartheta_3^2(0) \vartheta_1^2(z) = \vartheta_4^2(0) \vartheta_2^2(z)
\end{equation}
\]&lt;/div&gt;
&lt;p&gt;A similar technique yields the identity:&lt;/p&gt;
&lt;div class="arithmatex"&gt;\[
\begin{equation}\label{introduction-to-theta-functions-i-eq-14}
\vartheta_3^2(0) \vartheta_4^2(z) - \vartheta_2^2(0) \vartheta_1^2(z) = \vartheta_4^2(0) \vartheta_3^2(z)
\end{equation}
\]&lt;/div&gt;
&lt;p&gt;Incrementing &lt;span class="arithmatex"&gt;\(z\)&lt;/span&gt; by &lt;span class="arithmatex"&gt;\(\frac{\pi}{2}\)&lt;/span&gt; in &lt;span class="arithmatex"&gt;\(\eqref{introduction-to-theta-functions-i-eq-11}\)&lt;/span&gt; and &lt;span class="arithmatex"&gt;\(\eqref{introduction-to-theta-functions-i-eq-12}\)&lt;/span&gt; gives two additional identities:&lt;/p&gt;
&lt;div class="arithmatex"&gt;\[
\begin{align}
\vartheta_4^2(0) \vartheta_1^2(z) &amp;amp;= \vartheta_2^2(0) \vartheta_3^2(z) - \vartheta_3^2(0) \vartheta_2^2(z) \label{introduction-to-theta-functions-i-eq-15}\\
\vartheta_4^2(0) \vartheta_4^2(z) &amp;amp;= \vartheta_3^2(0) \vartheta_3^2(z) - \vartheta_2^2(0) \vartheta_2^2(z) \label{introduction-to-theta-functions-i-eq-16}
\end{align}
\]&lt;/div&gt;
&lt;p&gt;With these relations one can express any theta function in terms of any other pair of theta functions. Putting &lt;span class="arithmatex"&gt;\(z=0\)&lt;/span&gt; in &lt;span class="arithmatex"&gt;\(\eqref{introduction-to-theta-functions-i-eq-16}\)&lt;/span&gt; gives the famous identity:&lt;/p&gt;
&lt;div class="arithmatex"&gt;\[
\vartheta_4^4(0)+\vartheta_2^4(0) = \vartheta_3^4(0)
\]&lt;/div&gt;
&lt;h2&gt;The identity &lt;span class="arithmatex"&gt;\(\vartheta_1'(0)=\vartheta_2(0)\vartheta_3(0)\vartheta_4(0)\)&lt;/span&gt;&lt;/h2&gt;
&lt;p&gt;This particular proof is from [1]. Differentiating equation &lt;span class="arithmatex"&gt;\(\eqref{introduction-to-theta-functions-i-eq-5}\)&lt;/span&gt; with respect to &lt;span class="arithmatex"&gt;\(x\)&lt;/span&gt; and substituting &lt;span class="arithmatex"&gt;\(x=y=0\)&lt;/span&gt;, we get:&lt;/p&gt;
&lt;div class="arithmatex"&gt;\[
\begin{equation}\label{introduction-to-theta-functions-i-eq-17}
\vartheta_1'(0,q) \vartheta_2(0,q) = 2 \vartheta_1'(0,q^2)\vartheta_4(0,q^2)
\end{equation}
\]&lt;/div&gt;
&lt;p&gt;Substituting &lt;span class="arithmatex"&gt;\(x=y=0\)&lt;/span&gt; in equations &lt;span class="arithmatex"&gt;\(\eqref{introduction-to-theta-functions-i-eq-3}\)&lt;/span&gt; and &lt;span class="arithmatex"&gt;\(\eqref{introduction-to-theta-functions-i-eq-6}\)&lt;/span&gt; gives:&lt;/p&gt;
&lt;div class="arithmatex"&gt;\[
\begin{align}
\vartheta_2^2(0,q) &amp;amp;= 2\vartheta_2(0,q^2) \vartheta_3(0,q^2) \label{introduction-to-theta-functions-i-eq-18}\\
\vartheta_3(0,q)\vartheta_4(0,q) &amp;amp;= \vartheta_4^2(0,q^2) \label{introduction-to-theta-functions-i-eq-19}
\end{align}
\]&lt;/div&gt;
&lt;p&gt;Now, dividing &lt;span class="arithmatex"&gt;\(\eqref{introduction-to-theta-functions-i-eq-17}\)&lt;/span&gt; by both &lt;span class="arithmatex"&gt;\(\eqref{introduction-to-theta-functions-i-eq-18}\)&lt;/span&gt; and &lt;span class="arithmatex"&gt;\(\eqref{introduction-to-theta-functions-i-eq-19}\)&lt;/span&gt; gives&lt;/p&gt;
&lt;div class="arithmatex"&gt;\[
\frac{\vartheta_1'(0,q)}{\vartheta_2(0,q)\vartheta_3(0,q)\vartheta_4(0,q)} = \frac{\vartheta_1'(0,q^2)}{\vartheta_2(0,q^2)\vartheta_3(0,q^2)\vartheta_4(0,q^2)}
\]&lt;/div&gt;
&lt;p&gt;The repeated application of this result gives:&lt;/p&gt;
&lt;div class="arithmatex"&gt;\[
\frac{\vartheta_1'(0,q)}{\vartheta_2(0,q)\vartheta_3(0,q)\vartheta_4(0,q)} = \frac{\vartheta_1'(0,q^{2^n})}{\vartheta_2(0,q^{2^n})\vartheta_3(0,q^{2^n})\vartheta_4(0,q^{2^n})}
\]&lt;/div&gt;
&lt;p&gt;for all positive integers &lt;span class="arithmatex"&gt;\(n\)&lt;/span&gt;. Letting &lt;span class="arithmatex"&gt;\(n\to\infty\)&lt;/span&gt; in the above equation, we find that:&lt;/p&gt;
&lt;div class="arithmatex"&gt;\[
\begin{equation}\label{introduction-to-theta-functions-i-eq-20}
\frac{\vartheta_1'(0,q)}{\vartheta_2(0,q)\vartheta_3(0,q)\vartheta_4(0,q)} = \lim_{q\to 0}\frac{\vartheta_1'(0,q)}{\vartheta_2(0,q)\vartheta_3(0,q)\vartheta_4(0,q)}
\end{equation}
\]&lt;/div&gt;
&lt;p&gt;From the definitions of the theta functions, it is evident that&lt;/p&gt;
&lt;div class="arithmatex"&gt;\[
\begin{aligned}
\vartheta_1'(0,q) &amp;amp;= 2q^{\frac{1}{4}} + \mathcal{O}(q^{\frac{9}{4}}) \\
\vartheta_2(0,q) &amp;amp;= 2q^{\frac{1}{4}} + \mathcal{O}(q^{\frac{9}{4}}) \\
\vartheta_3(0,q) &amp;amp;= 1 + \mathcal{O}(q) \\
\vartheta_4(0,q) &amp;amp;= 1 + \mathcal{O}(q) \\
\end{aligned}
\]&lt;/div&gt;
&lt;p&gt;Therefore, the limit in equation &lt;span class="arithmatex"&gt;\(\eqref{introduction-to-theta-functions-i-eq-20}\)&lt;/span&gt; equals 1 and&lt;/p&gt;
&lt;div class="arithmatex"&gt;\[
\vartheta_1'(0)=\vartheta_2(0)\vartheta_3(0)\vartheta_4(0)
\]&lt;/div&gt;
&lt;p&gt;is established as desired.&lt;/p&gt;
&lt;h2&gt;References&lt;/h2&gt;
&lt;ol&gt;
&lt;li&gt;Derek F. Lawden (1989). &lt;em&gt;Elliptic Functions and Applications&lt;/em&gt;. Springer-Verlag New York&lt;/li&gt;
&lt;li&gt;E. T. Whittaker, G. N. Watson (1927). &lt;em&gt;A Course of Modern Analysis&lt;/em&gt;. Cambridge University Press&lt;/li&gt;
&lt;/ol&gt;</content><category term="Elliptic Functions and Integrals"/><category term="elliptic-functions"/><category term="elliptic-integrals"/><category term="fourier-series"/></entry><entry><title>When is the group of units in the integers modulo n cyclic?</title><link href="https://integralsandseries.in/2020/12/12/the-group-of-units-in-the-integers-modulo-n/" rel="alternate"/><published>2020-12-12T13:22:20+00:00</published><updated>2025-11-10T06:10:03+00:00</updated><author><name>Shobhit Bhatnagar</name></author><id>tag:integralsandseries.in,2020-12-12:/2020/12/12/the-group-of-units-in-the-integers-modulo-n/</id><summary type="html">&lt;p&gt;A proof of the classification of integers whose multiplicative group of units is cyclic.&lt;/p&gt;</summary><content type="html">&lt;p&gt;We begin with the multiplicative group of units modulo an integer. By &lt;a href="https://en.wikipedia.org/wiki/B%C3%A9zout%27s_identity"&gt;Bezout's identity&lt;/a&gt; that the integers co-prime to &lt;span class="arithmatex"&gt;\(n\)&lt;/span&gt; from the set &lt;span class="arithmatex"&gt;\(\{0,1,\cdots, n-1\}\)&lt;/span&gt; form a group under multiplication modulo &lt;span class="arithmatex"&gt;\(n\)&lt;/span&gt;. This group is denoted by &lt;span class="arithmatex"&gt;\((\mathbb{Z}/n\mathbb{Z})^*\)&lt;/span&gt; and its order is given by the &lt;a href="https://en.wikipedia.org/wiki/Euler%27s_totient_function"&gt;Euler's Totient function&lt;/a&gt;: &lt;span class="arithmatex"&gt;\(\varphi(n) = |(\mathbb{Z}/n\mathbb{Z})^*|\)&lt;/span&gt;. &lt;/p&gt;
&lt;h2&gt;The classification&lt;/h2&gt;
&lt;p&gt;Gauss showed that &lt;span class="arithmatex"&gt;\((\mathbb{Z}/n\mathbb{Z})^*\)&lt;/span&gt; is a cyclic group if and only if &lt;span class="arithmatex"&gt;\(n=1,2,4,p,p^k\)&lt;/span&gt; or &lt;span class="arithmatex"&gt;\(2p^k\)&lt;/span&gt;, where &lt;span class="arithmatex"&gt;\(p\)&lt;/span&gt; is an odd prime and &lt;span class="arithmatex"&gt;\(k &amp;gt; 0\)&lt;/span&gt;. It is very easy to verify this for &lt;span class="arithmatex"&gt;\(n=1,2\)&lt;/span&gt; and &lt;span class="arithmatex"&gt;\(4\)&lt;/span&gt;, as one can simply list out all positive integers less than and co-prime to &lt;span class="arithmatex"&gt;\(n\)&lt;/span&gt;. So, we will only focus on proving that &lt;span class="arithmatex"&gt;\((\mathbb{Z}/n\mathbb{Z})^*\)&lt;/span&gt; is cyclic for the remaining three cases.&lt;/p&gt;
&lt;p&gt;&lt;strong&gt;Theorem 1:&lt;/strong&gt;  &lt;span class="arithmatex"&gt;\((\mathbb{Z}/p\mathbb{Z})^*\)&lt;/span&gt; is cyclic if &lt;span class="arithmatex"&gt;\(p\)&lt;/span&gt; is a prime.&lt;/p&gt;
&lt;p&gt;&lt;strong&gt;Proof:&lt;/strong&gt;  Let &lt;span class="arithmatex"&gt;\(d_1, d_2, \cdots , d_r\)&lt;/span&gt; be all the possible orders of the elements of &lt;span class="arithmatex"&gt;\((\mathbb{Z}/p\mathbb{Z})^*\)&lt;/span&gt;. Let &lt;span class="arithmatex"&gt;\(e=\text{lcm}(d_1, d_2, \cdots, d_r)\)&lt;/span&gt; and factor &lt;span class="arithmatex"&gt;\(e=p_1^{a_1} p_2^{a_2}\cdots p_k^{a_k}\)&lt;/span&gt; as a product of distinct prime powers. By the definition of &lt;span class="arithmatex"&gt;\(\text{lcm}\)&lt;/span&gt;, for each &lt;span class="arithmatex"&gt;\(p_i^{a_i}\)&lt;/span&gt; there is some &lt;span class="arithmatex"&gt;\(d_j\)&lt;/span&gt; divisible by it. Since the &lt;span class="arithmatex"&gt;\(d_j\)&lt;/span&gt;'s are orders of elements of &lt;span class="arithmatex"&gt;\((\mathbb{Z}/p\mathbb{Z})^*\)&lt;/span&gt;, there is an element &lt;span class="arithmatex"&gt;\(x_i\)&lt;/span&gt; whose order is &lt;span class="arithmatex"&gt;\(p_i^{a_i} t\)&lt;/span&gt;. Then, the element &lt;span class="arithmatex"&gt;\(y_i = x_i^t\)&lt;/span&gt; has order &lt;span class="arithmatex"&gt;\(p_i^{a_i}\)&lt;/span&gt;. Hence, &lt;span class="arithmatex"&gt;\(y_1 y_2\cdots y_k\)&lt;/span&gt; has order &lt;span class="arithmatex"&gt;\(e\)&lt;/span&gt;. Thus, we have found an element of order &lt;span class="arithmatex"&gt;\(e\)&lt;/span&gt;. Therefore, &lt;span class="arithmatex"&gt;\(e|p-1\)&lt;/span&gt;. But the polynomial &lt;span class="arithmatex"&gt;\(x^e-1\)&lt;/span&gt; has &lt;span class="arithmatex"&gt;\(p-1\)&lt;/span&gt; roots &lt;span class="arithmatex"&gt;\((\text{mod }p)\)&lt;/span&gt;. Since &lt;span class="arithmatex"&gt;\(\mathbb{Z}/p\mathbb{Z}\)&lt;/span&gt; is a field, any polynomial of degree &lt;span class="arithmatex"&gt;\(e\)&lt;/span&gt; cannot have more than &lt;span class="arithmatex"&gt;\(e\)&lt;/span&gt; roots. Therefore, &lt;span class="arithmatex"&gt;\(p-1\leq e\)&lt;/span&gt; and we deduce that &lt;span class="arithmatex"&gt;\(e=p-1\)&lt;/span&gt;. Thus, we have found an element of order &lt;span class="arithmatex"&gt;\(p-1\)&lt;/span&gt;.&lt;/p&gt;
&lt;p&gt;&lt;strong&gt;Theorem 2:&lt;/strong&gt;  &lt;span class="arithmatex"&gt;\((\mathbb{Z}/p^a \mathbb{Z})^*\)&lt;/span&gt; is cyclic for any &lt;span class="arithmatex"&gt;\(a\geq 1\)&lt;/span&gt; if &lt;span class="arithmatex"&gt;\(p\)&lt;/span&gt; is an odd prime.&lt;/p&gt;
&lt;p&gt;&lt;strong&gt;Proof:&lt;/strong&gt; For &lt;span class="arithmatex"&gt;\(a=1\)&lt;/span&gt;, we are done by Theorem 1. Let &lt;span class="arithmatex"&gt;\(g\)&lt;/span&gt; be a primitive root &lt;span class="arithmatex"&gt;\((\text{mod }p)\)&lt;/span&gt;. We first find a &lt;span class="arithmatex"&gt;\(t\)&lt;/span&gt; such that &lt;span class="arithmatex"&gt;\((g+pt)^{p-1}\not\equiv 1 \; (\text{mod }p^2)\)&lt;/span&gt;. If &lt;span class="arithmatex"&gt;\(g^{p-1}\not\equiv 1 \; (\text{mod }p^2)\)&lt;/span&gt;, then we can take &lt;span class="arithmatex"&gt;\(t=0\)&lt;/span&gt;. Otherwise, we can choose &lt;span class="arithmatex"&gt;\(t=1\)&lt;/span&gt;. Indeed, we have &lt;span class="arithmatex"&gt;\((g+p)^{p-1}\equiv 1+p(p-1)  g^{p-2} \not \equiv 1 \; (\text{mod }p^2)\)&lt;/span&gt;. Let &lt;span class="arithmatex"&gt;\(g+pt\)&lt;/span&gt; have order &lt;span class="arithmatex"&gt;\(d\; (\text{mod }p^a)\)&lt;/span&gt;. Then, &lt;span class="arithmatex"&gt;\(d|p^{a-1} (p-1)\)&lt;/span&gt;. Since &lt;span class="arithmatex"&gt;\(g\)&lt;/span&gt; is a primitive root modulo &lt;span class="arithmatex"&gt;\(p\)&lt;/span&gt;, &lt;span class="arithmatex"&gt;\((p-1) | d\)&lt;/span&gt;. So, &lt;span class="arithmatex"&gt;\(d=p^{r-1} (p-1)\)&lt;/span&gt; for some &lt;span class="arithmatex"&gt;\(r\leq a\)&lt;/span&gt;. We also know that &lt;span class="arithmatex"&gt;\((g+pt)^{p-1} = 1+p s\)&lt;/span&gt; where &lt;span class="arithmatex"&gt;\(p\nmid s\)&lt;/span&gt;. Thus,&lt;/p&gt;
&lt;div class="arithmatex"&gt;\[
\begin{aligned}
(g+pt)^{p(p-1)} &amp;amp;= (1+ps)^{p} \\
&amp;amp;= \sum_{i=0}^{p} \binom{p}{i} (ps)^i  \\
&amp;amp;\equiv 1+p^2 s \; (\text{mod }p^3)
\end{aligned}
\]&lt;/div&gt;
&lt;p&gt;By induction, it follows that&lt;/p&gt;
&lt;div class="arithmatex"&gt;\[
(g+pt)^{p^{b-1}(p-1)} \equiv 1+p^b s \; (\text{mod }p^{b+1})
\]&lt;/div&gt;
&lt;p&gt;Now, &lt;span class="arithmatex"&gt;\(g+pt\)&lt;/span&gt; has order &lt;span class="arithmatex"&gt;\(d=p^{r-1}(p-1)\; (\text{mod } p^a)\)&lt;/span&gt; which implies &lt;span class="arithmatex"&gt;\((g+pt)^{p^{r-1}(p-1)} \equiv 1 \; (\text{mod }p^a)\)&lt;/span&gt;. But then &lt;span class="arithmatex"&gt;\(1+p^r s \equiv 1 \; (\text{mod } p^{r+1})\)&lt;/span&gt; if &lt;span class="arithmatex"&gt;\(r\leq a-1\)&lt;/span&gt;, which implies &lt;span class="arithmatex"&gt;\(p | s\)&lt;/span&gt;, a contradiction. Thus, &lt;span class="arithmatex"&gt;\(r=a\)&lt;/span&gt;.&lt;/p&gt;
&lt;p&gt;&lt;strong&gt;Theorem 3:&lt;/strong&gt; &lt;span class="arithmatex"&gt;\((\mathbb{Z}/2p^a \mathbb{Z})^*\)&lt;/span&gt; is cyclic for any &lt;span class="arithmatex"&gt;\(a\geq 1\)&lt;/span&gt; if &lt;span class="arithmatex"&gt;\(p\)&lt;/span&gt; is an odd prime.&lt;/p&gt;
&lt;p&gt;&lt;strong&gt;Proof:&lt;/strong&gt; This follows immediately from Theorem 2 and the &lt;a href="https://math.stackexchange.com/questions/1659507/chinese-remainder-theorem-induces-a-unit-group-isomorphism"&gt;Chinese remainder theorem&lt;/a&gt;.&lt;/p&gt;
&lt;h2&gt;Why there are no other cases&lt;/h2&gt;
&lt;p&gt;Suppose first that &lt;span class="arithmatex"&gt;\(n\)&lt;/span&gt; has two distinct odd prime factors, &lt;span class="arithmatex"&gt;\(p\)&lt;/span&gt; and &lt;span class="arithmatex"&gt;\(q\)&lt;/span&gt;. Choosing a sign independently modulo each prime power and applying the Chinese remainder theorem gives at least four solutions of &lt;span class="arithmatex"&gt;\(x^2\equiv1\pmod n\)&lt;/span&gt;. A cyclic group has at most two elements whose square is the identity, so its unit group cannot be cyclic.&lt;/p&gt;
&lt;p&gt;If &lt;span class="arithmatex"&gt;\(4\mid n\)&lt;/span&gt; and an odd prime divides &lt;span class="arithmatex"&gt;\(n\)&lt;/span&gt;, the same argument applies by choosing signs independently modulo the power of &lt;span class="arithmatex"&gt;\(2\)&lt;/span&gt; and the odd part. Finally, if &lt;span class="arithmatex"&gt;\(8\mid n\)&lt;/span&gt;, the four residues &lt;span class="arithmatex"&gt;\(1,-1,1+2^{a-1},-1+2^{a-1}\)&lt;/span&gt; are distinct square roots of &lt;span class="arithmatex"&gt;\(1\)&lt;/span&gt; modulo &lt;span class="arithmatex"&gt;\(2^a\)&lt;/span&gt; for &lt;span class="arithmatex"&gt;\(a\geq3\)&lt;/span&gt;; the Chinese remainder theorem again transfers this obstruction to &lt;span class="arithmatex"&gt;\(n\)&lt;/span&gt;.&lt;/p&gt;
&lt;p&gt;The only remaining possibilities are &lt;span class="arithmatex"&gt;\(1,2,4,p^a\)&lt;/span&gt;, and &lt;span class="arithmatex"&gt;\(2p^a\)&lt;/span&gt; with &lt;span class="arithmatex"&gt;\(p\)&lt;/span&gt; odd, exactly the cases already proved.&lt;/p&gt;
&lt;h2&gt;References&lt;/h2&gt;
&lt;ul&gt;
&lt;li&gt;M. Ram Murty. &lt;em&gt;Problems in analytic number theory&lt;/em&gt;. Springer New York, 01-Nov-2008&lt;/li&gt;
&lt;/ul&gt;</content><category term="Number Theory"/><category term="number-theory"/><category term="abstract-algebra"/></entry><entry><title>Evaluating very nasty logarithmic integrals: Part III</title><link href="https://integralsandseries.in/2020/09/07/evaluating-very-nasty-logarithmic-integrals-part-iii/" rel="alternate"/><published>2020-09-07T18:58:20+00:00</published><updated>2026-10-24T00:00:00+05:30</updated><author><name>Shobhit Bhatnagar</name></author><id>tag:integralsandseries.in,2020-09-07:/2020/09/07/evaluating-very-nasty-logarithmic-integrals-part-iii/</id><summary type="html">&lt;p&gt;The third part uses complex contours to evaluate logarithmic integrals involving inverse trigonometric functions.&lt;/p&gt;</summary><content type="html">&lt;p&gt;This third part uses complex contours to evaluate logarithmic integrals involving inverse trigonometric functions. We continue the numbering and use results from &lt;a href="https://integralsandseries.in/2020/08/01/evaluating-very-nasty-logarithmic-integrals-part-i/"&gt;part 1&lt;/a&gt; and &lt;a href="https://integralsandseries.in/2020/08/06/evaluating-very-nasty-logarithmic-integrals-part-ii/"&gt;part 2&lt;/a&gt;. The contour diagrams below show the paths used in each argument.&lt;/p&gt;
&lt;h2&gt;Integral #5&lt;/h2&gt;
&lt;p&gt;The first integral that we will evaluate in this post is the following:&lt;/p&gt;
&lt;div class="arithmatex"&gt;\[
I_1 = \int_0^1 \frac{\log^2(x) \arctan(x)}{1+x^2}dx
\]&lt;/div&gt;
&lt;p&gt;Of course, one can use brute force methods to find a closed-form antiderivative in terms of polylogarithms. Instead, a more elegant solution is possible by contour integration.&lt;/p&gt;
&lt;p&gt;We'll integrate the principal branch of &lt;span class="arithmatex"&gt;\(f(z) = \frac{\arctan(z)}{1+z^2}\left(\text{arctanh}^2(z) + \frac{\pi^2}{16} \right)\)&lt;/span&gt; around the following contour:&lt;/p&gt;
&lt;p&gt;&lt;img alt="Quarter-circle contour in the first quadrant, with indentations at 1 and i" src="https://integralsandseries.in/images/contour.webp"&gt;&lt;/p&gt;
&lt;p&gt;where&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;&lt;span class="arithmatex"&gt;\(\gamma_{3,\epsilon}\)&lt;/span&gt; is an arc parameterized by &lt;span class="arithmatex"&gt;\(e^{it}\)&lt;/span&gt;, where &lt;span class="arithmatex"&gt;\(\arctan\left(\frac{\epsilon \sqrt{4-\epsilon^2}}{2-\epsilon^2} \right)\leq t \leq \frac{\pi}{2} - \arctan\left(\frac{\epsilon \sqrt{4-\epsilon^2}}{2-\epsilon^2} \right)\)&lt;/span&gt;.&lt;/li&gt;
&lt;li&gt;&lt;span class="arithmatex"&gt;\(\gamma_{2,\epsilon}\)&lt;/span&gt; and &lt;span class="arithmatex"&gt;\(\gamma_{4,\epsilon}\)&lt;/span&gt; are circular indents of radius &lt;span class="arithmatex"&gt;\(\epsilon\)&lt;/span&gt; around the branch points at &lt;span class="arithmatex"&gt;\(z=1\)&lt;/span&gt; and &lt;span class="arithmatex"&gt;\(z=i\)&lt;/span&gt;, respectively.&lt;/li&gt;
&lt;li&gt;&lt;span class="arithmatex"&gt;\(\gamma_{1,\epsilon}\)&lt;/span&gt; is a straight line joining &lt;span class="arithmatex"&gt;\(0\)&lt;/span&gt; and &lt;span class="arithmatex"&gt;\(1-\epsilon\)&lt;/span&gt;.&lt;/li&gt;
&lt;li&gt;&lt;span class="arithmatex"&gt;\(\gamma_{5,\epsilon}\)&lt;/span&gt; is a straight line joining &lt;span class="arithmatex"&gt;\((1-\epsilon)i\)&lt;/span&gt; and &lt;span class="arithmatex"&gt;\(0\)&lt;/span&gt;.&lt;/li&gt;
&lt;/ul&gt;
&lt;p&gt;Note that &lt;span class="arithmatex"&gt;\(f\)&lt;/span&gt; is analytic on &lt;span class="arithmatex"&gt;\(|z| &amp;lt; 1\)&lt;/span&gt;. It is easy to see that&lt;/p&gt;
&lt;div class="arithmatex"&gt;\[
\begin{aligned}
\lim_{\epsilon\to 0^+} \int_{\gamma_{2,\epsilon}}f(z)\; dz &amp;amp;= 0 \\
\lim_{\epsilon\to 0^+} \int_{\gamma_{4,\epsilon}}f(z)\; dz &amp;amp;= 0
\end{aligned}
\]&lt;/div&gt;
&lt;p&gt;On &lt;span class="arithmatex"&gt;\(\gamma_{1,\epsilon}\)&lt;/span&gt;, we have&lt;/p&gt;
&lt;div class="arithmatex"&gt;\[
\begin{equation}\label{evaluating-very-nasty-logarithmic-integrals-part-iii-eq-1}
\begin{aligned}
\lim_{\epsilon\to 0^+} \int_{\gamma_{1,\epsilon}} f(z)\; dz &amp;amp;= \int_0^1\frac{\arctan(x)}{1+x^2}\left(\text{arctanh}^2(x) + \frac{\pi^2}{16} \right)dx \\
&amp;amp;= \int_0^1\frac{\arctan(x) \text{arctanh}^2(x) }{1+x^2}dx +  \frac{\pi^2}{16} \frac{\arctan^2(x)}{2}\Big|_0^1 \\
&amp;amp;= \frac{1}{4}\int_0^1 \frac{\arctan\left(\frac{1-x}{1+x} \right)\log^2(x)}{1+x^2}dx +  \frac{\pi^4}{512} \quad \left(x\mapsto \frac{1-x}{1+x} \right) \\
&amp;amp;= \frac{1}{4}\int_0^1 \frac{\left(\frac{\pi}{4}-\arctan(x) \right)\log^2(x)}{1+x^2}dx +  \frac{\pi^4}{512} \\
&amp;amp;= -\frac{I_1}{4} +\frac{\pi}{16}\int_0^1 \frac{\log^2(x)}{1+x^2}dx +\frac{\pi^4}{512} \\
&amp;amp;= -\frac{I_1}{4} + \frac{3\pi^4}{512}
\end{aligned}
\end{equation}
\]&lt;/div&gt;
&lt;p&gt;Here, we used the fact that &lt;span class="arithmatex"&gt;\(\int_0^1 \frac{\log^2(x)}{1+x^2}dx = \frac{\pi^3}{16}\)&lt;/span&gt;. Similarly, on &lt;span class="arithmatex"&gt;\(\gamma_{5,\epsilon}\)&lt;/span&gt; we have&lt;/p&gt;
&lt;div class="arithmatex"&gt;\[
\begin{equation}\label{evaluating-very-nasty-logarithmic-integrals-part-iii-eq-2}
\begin{aligned}
\lim_{\epsilon\to 0^+} \int_{\gamma_{5,\epsilon}} f(z) \; dz &amp;amp;= \int_i^0 \frac{\arctan(x)}{1+x^2}\left(\text{arctanh}^2(x) + \frac{\pi^2}{16} \right)dx \\
&amp;amp;= \int_0^1 \frac{\text{arctanh}(x)}{1-x^2}\left(\frac{\pi^2}{16}-\arctan^2(x) \right)dx \quad \left(x\mapsto i x \right) \\
&amp;amp;= \int_0^1\frac{\arctan(x) \text{arctanh}^2(x) }{1+x^2}dx \quad (\text{IBP}) \\
&amp;amp;= -\frac{I_1}{4}+\frac{\pi^4}{256} 
\end{aligned}
\end{equation}
\]&lt;/div&gt;
&lt;p&gt;For the integral over &lt;span class="arithmatex"&gt;\(\gamma_{3,\epsilon}\)&lt;/span&gt;, we will take advantage of the following identities:&lt;/p&gt;
&lt;div class="arithmatex"&gt;\[
\begin{aligned}
\arctan(e^{i\theta}) &amp;amp;= \frac{\pi}{4}+\frac{i}{2} \log\left(\frac{1+\tan \frac{\theta}{2}}{1-\tan \frac{\theta}{2}} \right), \quad 0\leq \theta \leq \frac{\pi}{2} \\
\text{arctanh}(e^{i\theta}) &amp;amp;= -\frac{1}{2}\log \left(\tan\frac{\theta}{2} \right)+\frac{i\pi}{4}, \quad 0\leq \theta \leq \frac{\pi}{2}\\
\end{aligned}
\]&lt;/div&gt;
&lt;p&gt;We have&lt;/p&gt;
&lt;div class="arithmatex"&gt;\[
\begin{aligned}
\lim_{\epsilon\to 0^+} \int_{\gamma_{3,\epsilon}}f(z) \; dz &amp;amp;= i \int_0^{\frac{\pi}{2}}f(e^{i\theta}) e^{i\theta} \; d\theta \\
&amp;amp;= \frac{i}{2} \int_0^{\frac{\pi}{2}}\frac{\left( \frac{\pi}{4}+\frac{i}{2} \log\left(\frac{1+\tan \frac{\theta}{2}}{1-\tan \frac{\theta}{2}} \right)\right)\left( -\frac{i\pi}{4}\log \left(\tan\frac{\theta}{2} \right)+\frac{1}{4}\log^2\left(\tan \frac{\theta}{2} \right) \right)}{\cos \theta}d\theta
\end{aligned}
\]&lt;/div&gt;
&lt;p&gt;The real part of the above integral is&lt;/p&gt;
&lt;div class="arithmatex"&gt;\[
\begin{equation}\label{evaluating-very-nasty-logarithmic-integrals-part-iii-eq-3}
\begin{aligned}
\text{Re}\left[\lim_{\epsilon\to 0^+} \int_{\gamma_{3,\epsilon}}f(z) \; dz \right] &amp;amp;= \int_0^\frac{\pi}{2} \frac{\frac{1}{16}\log^2\left(\tan\frac{\theta}{2} \right)\log\left(\frac{1-\tan \frac{\theta}{2}}{1+\tan \frac{\theta}{2}} \right)+\frac{\pi^2}{32}\log\left(\tan\frac{\theta}{2} \right)}{\cos \theta} d\theta \\
&amp;amp;= \int_0^1 \frac{\frac{1}{8}\log^2\left(u \right)\log\left(\frac{1-u}{1+u} \right)+\frac{\pi^2}{16}\log\left(u \right)}{1-u^2} du \quad \left(u= \tan\frac{\theta}{2} \right) \\
&amp;amp;= -\frac{1}{8} \int_0^1 \frac{\log^2(u)\log\left(\frac{1+u}{1-u}\right)}{1-u^2} + \frac{\pi^2}{16}\left(-\frac{\pi^2}{8} \right) \\
&amp;amp;= \frac{1}{16}\int_0^1 \frac{\log(u) \log^2\left(\frac{1-u}{1+u} \right)}{u}du - \frac{\pi^4}{128} 
\end{aligned}
\end{equation}
\]&lt;/div&gt;
&lt;p&gt;Using the results from &lt;a href="https://integralsandseries.in/2020/08/01/evaluating-very-nasty-logarithmic-integrals-part-i/"&gt;part 1&lt;/a&gt;, we get&lt;/p&gt;
&lt;div class="arithmatex"&gt;\[
\begin{aligned}
\int_0^1 \frac{\log(u)\log^2\left(\frac{1-u}{1+u} \right)}{u}du &amp;amp;= \frac{7}{4}\int_0^1 \frac{\log(u)\log^2(1-u)}{u}du + 2\int_0^1 \frac{\log(u)\log^2(1+u)}{u}du \\
&amp;amp;= \frac{7}{4}\left(2\zeta(4) - 2\sum_{n=1}^\infty \frac{H_n}{n^3} \right)+2\left(2\text{Li}_4(-1)+2\sum_{n=1}^\infty\frac{(-1)^{n+1} H_n}{n^3} \right) \\
&amp;amp;= -\frac{7\pi^4}{144}+4\sum_{n=1}^\infty \frac{(-1)^{n+1}H_n}{n^3}
\end{aligned}
\]&lt;/div&gt;
&lt;p&gt;By Cauchy's integral theorem, the sum of &lt;span class="arithmatex"&gt;\(\eqref{evaluating-very-nasty-logarithmic-integrals-part-iii-eq-1}\)&lt;/span&gt;, &lt;span class="arithmatex"&gt;\(\eqref{evaluating-very-nasty-logarithmic-integrals-part-iii-eq-2}\)&lt;/span&gt; and &lt;span class="arithmatex"&gt;\(\eqref{evaluating-very-nasty-logarithmic-integrals-part-iii-eq-3}\)&lt;/span&gt; is equal to zero. Therefore,&lt;/p&gt;
&lt;div class="arithmatex"&gt;\[
\begin{aligned}
&amp;amp;\; -\frac{I_1}{2} + \frac{5\pi^4}{512}+\frac{1}{16}\left(-\frac{7\pi^4}{144}+4 \sum_{n=1}^\infty \frac{(-1)^{n+1}H_n}{n^3}\right)-\frac{\pi^4}{128} = 0 \\
&amp;amp;\implies I_1 = -\frac{5\pi^4}{2304}+\frac{1}{2}\sum_{n=1}^\infty (-1)^{n+1}\frac{H_n}{n^3} \\
&amp;amp;\implies I_1 = -\frac{5\pi^4}{2304}+\frac{1}{2}\left(\frac{11\pi^4}{360}+\frac{\pi^2}{12}\log^2(2)-\frac{\log^4(2)}{12} -\frac{7}{4}\log(2)\zeta(3)-2\text{Li}_4\left(\frac{1}{2} \right)\right) \\
&amp;amp;\implies \boxed{I_1 = \frac{151 \pi ^4}{11520}+\frac{\pi ^2}{24}  \log ^2(2)-\frac{\log ^4(2)}{24} -\frac{7}{8} \zeta (3) \log (2)-\text{Li}_4\left(\frac{1}{2}\right)}
\end{aligned}
\]&lt;/div&gt;
&lt;p&gt;Refer to &lt;a href="https://integralsandseries.in/2020/07/05/an-alternating-euler-sum/"&gt;this post&lt;/a&gt; for the evaluation of &lt;span class="arithmatex"&gt;\(\sum_{n=1}^\infty (-1)^{n+1}\frac{H_n}{n^3}\)&lt;/span&gt;.&lt;/p&gt;
&lt;h2&gt;Integral #6&lt;/h2&gt;
&lt;p&gt;The next integral that we'll evaluate is&lt;/p&gt;
&lt;div class="arithmatex"&gt;\[
\begin{equation}\label{evaluating-very-nasty-logarithmic-integrals-part-iii-eq-4}
I_2 = \int_0^1 \frac{\log^3(x) \arctan(x)}{1+x^2}dx
\end{equation}
\]&lt;/div&gt;
&lt;p&gt;Using the transformation &lt;span class="arithmatex"&gt;\(x\mapsto \frac{1}{x}\)&lt;/span&gt;, we write the integral as:&lt;/p&gt;
&lt;div class="arithmatex"&gt;\[
\begin{equation}\label{evaluating-very-nasty-logarithmic-integrals-part-iii-eq-5}
\begin{aligned}
I_2 &amp;amp;= -\int_1^\infty\frac{\log^3(x)\left(\frac{\pi}{2}-\arctan(x) \right)}{1+x^2}dx 
\end{aligned}
\end{equation}
\]&lt;/div&gt;
&lt;p&gt;Adding up equations &lt;span class="arithmatex"&gt;\(\eqref{evaluating-very-nasty-logarithmic-integrals-part-iii-eq-4}\)&lt;/span&gt; and &lt;span class="arithmatex"&gt;\(\eqref{evaluating-very-nasty-logarithmic-integrals-part-iii-eq-5}\)&lt;/span&gt; and dividing both sides by 2 gives us:&lt;/p&gt;
&lt;div class="arithmatex"&gt;\[
\begin{aligned}
I_2 &amp;amp;=  -\frac{\pi}{4}\int_1^\infty \frac{\log^3(x)}{1+x^2}dx + \frac{1}{2}\int_0^\infty \frac{\log^3(x) \arctan(x)}{1+x^2}dx\\
&amp;amp;= \frac{\pi}{4}\int_0^1 \frac{\log^3(x)}{1+x^2}dx + \frac{1}{2}\int_0^\infty \frac{\log^3(x) \arctan(x)}{1+x^2}dx
\end{aligned}
\]&lt;/div&gt;
&lt;p&gt;Note that&lt;/p&gt;
&lt;div class="arithmatex"&gt;\[
\begin{aligned}
\int_0^1 \frac{\log^3(x)}{1+x^2}dx &amp;amp;= \sum_{n=0}^\infty (-1)^n \int_0^1 x^{2n}\log^3(x) \; dx \\
&amp;amp;= -6\sum_{n=0}^\infty \frac{(-1)^n}{(2n+1)^4} \\
&amp;amp;= -6\beta(4)
\end{aligned}
\]&lt;/div&gt;
&lt;p&gt;So, we have&lt;/p&gt;
&lt;div class="arithmatex"&gt;\[
\begin{equation}\label{evaluating-very-nasty-logarithmic-integrals-part-iii-eq-6}
I_2 = - \frac{3\pi}{2}\beta(4) + \frac{1}{2}\int_0^\infty \frac{\log^3(x) \arctan(x)}{1+x^2}dx
\end{equation}
\]&lt;/div&gt;
&lt;p&gt;To evaluate the integral in the above equation, we will use the Feynman technique. Define the function &lt;span class="arithmatex"&gt;\(F:[0,\infty) \to \mathbb{R}\)&lt;/span&gt; as
&lt;span class="arithmatex"&gt;\(F(s) = \int_0^\infty \frac{\log^3(x)\arctan(s x)}{1+x^2}dx\)&lt;/span&gt;. Now, we have&lt;/p&gt;
&lt;div class="arithmatex"&gt;\[
F'(s) = \int_0^\infty \frac{x \log^3(x)}{(1+x^2)(1+s^2 x^2)}dx
\]&lt;/div&gt;
&lt;p&gt;Before evaluating &lt;span class="arithmatex"&gt;\(F'(s)\)&lt;/span&gt;, we will evaluate the simpler integral &lt;span class="arithmatex"&gt;\(\int_0^\infty \frac{x \log(x)}{(1+x^2)(1+s^2 x^2)}dx\)&lt;/span&gt;. To do this, integrate the principal branch of &lt;span class="arithmatex"&gt;\(g(z) = \frac{z\log^2(-z)}{(1+z^2)(1+s^2 z^2)}\)&lt;/span&gt; around the following "key hole" contour:&lt;/p&gt;
&lt;p&gt;&lt;img alt="Indented contour used for the second logarithmic integral" src="https://integralsandseries.in/images/contour1.webp"&gt;&lt;/p&gt;
&lt;p&gt;where:&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;&lt;span class="arithmatex"&gt;\(\gamma_{1,\epsilon, R}\)&lt;/span&gt; is a line joining the points &lt;span class="arithmatex"&gt;\(\sqrt{R^2-\epsilon^2}-i\epsilon\)&lt;/span&gt; and &lt;span class="arithmatex"&gt;\(-i\epsilon\)&lt;/span&gt;.&lt;/li&gt;
&lt;li&gt;&lt;span class="arithmatex"&gt;\(\gamma_{2,\epsilon, R}\)&lt;/span&gt; is a line joining the points &lt;span class="arithmatex"&gt;\(i\epsilon\)&lt;/span&gt; and &lt;span class="arithmatex"&gt;\(\sqrt{R^2-\epsilon^2}+i\epsilon\)&lt;/span&gt;.&lt;/li&gt;
&lt;li&gt;&lt;span class="arithmatex"&gt;\(\gamma_{3,\epsilon}\)&lt;/span&gt; is parameterized by &lt;span class="arithmatex"&gt;\(\epsilon e^{-i t}\)&lt;/span&gt; where &lt;span class="arithmatex"&gt;\(\frac{\pi}{2} \leq t \leq \frac{3\pi}{2}\)&lt;/span&gt;.&lt;/li&gt;
&lt;li&gt;&lt;span class="arithmatex"&gt;\(\gamma_{4,R}\)&lt;/span&gt; is parameterized by &lt;span class="arithmatex"&gt;\(R e^{i t}\)&lt;/span&gt; where &lt;span class="arithmatex"&gt;\(\arctan\left(\frac{\epsilon}{\sqrt{R^2-\epsilon^2}} \right) \leq t \leq 2\pi - \arctan\left(\frac{\epsilon}{\sqrt{R^2-\epsilon^2}} \right)\)&lt;/span&gt;.&lt;/li&gt;
&lt;/ul&gt;
&lt;p&gt;As &lt;span class="arithmatex"&gt;\(\epsilon\to 0^+\)&lt;/span&gt; and &lt;span class="arithmatex"&gt;\(R\to \infty\)&lt;/span&gt;, the integrals along &lt;span class="arithmatex"&gt;\(\gamma_{3,\epsilon}\)&lt;/span&gt; and &lt;span class="arithmatex"&gt;\(\gamma_{4,R}\)&lt;/span&gt; tend to 0. Therefore, we are only left with the integrals above and below the branch cut. The residues of &lt;span class="arithmatex"&gt;\(g(z)\)&lt;/span&gt; at it's poles is given by:&lt;/p&gt;
&lt;div class="arithmatex"&gt;\[
\begin{aligned}
\mathop{\text{Res}}\limits_{z=i} \; g(z) &amp;amp;= -\frac{\pi^2}{8(1-s^2)} \\
\mathop{\text{Res}}\limits_{z=-i} \; g(z) &amp;amp;= -\frac{\pi^2}{8(1-s^2)} \\
\mathop{\text{Res}}\limits_{z=i/s} \; g(z) &amp;amp;= -\frac{\left(\log(s)+\frac{i\pi}{2} \right)^2}{2(1-s^2)} \\
\mathop{\text{Res}}\limits_{z=-i/s} \; g(z) &amp;amp;= -\frac{\left(\log(s)-\frac{i\pi}{2} \right)^2}{2(1-s^2)}
\end{aligned}
\]&lt;/div&gt;
&lt;p&gt;Now, the residue theorem gives us:&lt;/p&gt;
&lt;div class="arithmatex"&gt;\[
\begin{equation}\label{evaluating-very-nasty-logarithmic-integrals-part-iii-eq-7}
\begin{aligned}
\int_0^\infty \frac{x\left((\log (x)-i\pi)^2 - (\log (x)+i\pi)^2 \right)}{(1+x^2)(1+s^2 x^2)}dx &amp;amp;= 2i\pi \Big(\mathop{\text{Res}}\limits_{z=i} \; g(z)+ \mathop{\text{Res}}\limits_{z=-i}\; g(z) + \mathop{\text{Res}}\limits_{z=i/s}\; g(z) \\ &amp;amp;\quad + \mathop{\text{Res}}\limits_{z=-i/s}\; g(z) \Big) \\
\implies -4i\pi \int_0^\infty \frac{x\log(x)}{(1+x^2)(1+s^2 x^2)}dx &amp;amp;= -2i\pi \frac{\log^2(s)}{1-s^2} \\
\implies \int_0^\infty \frac{x\log(x)}{(1+x^2)(1+s^2 x^2)}dx &amp;amp;= \frac{\log^2(s)}{2(1-s^2)} 
\end{aligned}
\end{equation}
\]&lt;/div&gt;
&lt;p&gt;To evaluate &lt;span class="arithmatex"&gt;\(F'(s)\)&lt;/span&gt;, we integrate the principal branch of &lt;span class="arithmatex"&gt;\(h(z) = \frac{z \log^4(-z)}{(1+z^2)(1+s^2 z^2)}\)&lt;/span&gt; around the same contour. This time, the residues are:&lt;/p&gt;
&lt;div class="arithmatex"&gt;\[
\begin{aligned}
\mathop{\text{Res}}\limits_{z=i} \; h(z) &amp;amp;= \frac{\pi^4}{32(1-s^2)} \\
\mathop{\text{Res}}\limits_{z=-i} \; h(z) &amp;amp;= \frac{\pi^4}{32(1-s^2)} \\
\mathop{\text{Res}}\limits_{z=i/s} \; h(z) &amp;amp;= -\frac{\left(\log(s)+\frac{i\pi}{2} \right)^4}{2(1-s^2)} \\
\mathop{\text{Res}}\limits_{z=-i/s} \; h(z) &amp;amp;= -\frac{\left(\log(s)-\frac{i\pi}{2} \right)^4}{2(1-s^2)}
\end{aligned}
\]&lt;/div&gt;
&lt;p&gt;The residue theorem gives us:&lt;/p&gt;
&lt;div class="arithmatex"&gt;\[
\begin{equation}\label{evaluating-very-nasty-logarithmic-integrals-part-iii-eq-8}
\begin{aligned}
\int_0^\infty \frac{x\left((\log (x)-i\pi)^4 - (\log (x)+i\pi)^4 \right)}{(1+x^2)(1+s^2 x^2)}dx &amp;amp;= 2i\pi \Big(\mathop{\text{Res}}\limits_{z=i} \; h(z)+ \mathop{\text{Res}}\limits_{z=-i}\; h(z) + \mathop{\text{Res}}\limits_{z=i/s}\; h(z) \\ &amp;amp;\quad + \mathop{\text{Res}}\limits_{z=-i/s}\; h(z) \Big) \\
\implies -8i\pi \int_0^\infty \frac{x\left(\log^3(x) -\pi^2 \log(x) \right)}{(1+x^2)(1+s^2 x^2)}dx &amp;amp;= 2i\pi \frac{\frac{3\pi^2}{2}\log^2(s)-\log^4(s)}{1-s^2} \\
\implies \int_0^\infty \frac{x\log^3(x)}{(1+x^2)(1+s^2 x^2)}dx &amp;amp;= \frac{\pi^2\log^2(s)+2\log^4(s)}{8(1-s^2)} 
\end{aligned}
\end{equation}
\]&lt;/div&gt;
&lt;p&gt;Note that we used equation &lt;span class="arithmatex"&gt;\(\eqref{evaluating-very-nasty-logarithmic-integrals-part-iii-eq-7}\)&lt;/span&gt; to the get the above result. We can now calculate our original integral as follows:&lt;/p&gt;
&lt;div class="arithmatex"&gt;\[
\begin{aligned}
I_2 &amp;amp;= -\frac{3\pi}{2}\beta(4) + \frac{1}{2}\int_0^1 F'(s) ds \\
&amp;amp;= -\frac{3\pi}{2}\beta(4) + \frac{1}{2}\int_0^1 \frac{\pi^2\log^2(s)+2\log^4(s)}{8(1-s^2)} ds \\
&amp;amp;= -\frac{3\pi}{2}\beta(4) + \frac{\pi^2}{16}\int_0^1\frac{\log^2(s)}{1-s^2}ds+\frac{1}{8}\int_0^1 \frac{\log^4(s)}{1-s^2} ds \\
&amp;amp;= -\frac{3\pi}{2}\beta(4) + \frac{\pi^2}{16}\sum_{k=0}^\infty\int_0^1 s^{2k}\log^2(s)ds+\frac{1}{8}\sum_{k=0}^\infty\int_0^1 s^{2k}\log^4(s) ds \\
&amp;amp;= -\frac{3\pi}{2}\beta(4) + \frac{\pi^2}{8}\sum_{k=0}^\infty\frac{1}{(2k+1)^3}+3\sum_{k=0}^\infty\frac{1}{(2k+1)^5} \\
&amp;amp;= \boxed{-\frac{3\pi}{2}\beta(4) + \frac{7\pi^2}{64}\zeta(3) +\frac{93}{32}\zeta(5)}
\end{aligned}
\]&lt;/div&gt;
&lt;p&gt;Interestingly, &lt;span class="arithmatex"&gt;\(I_2\)&lt;/span&gt; can be reduced into an Euler sum which can be evaluated using contour integration.&lt;/p&gt;</content><category term="Logarithmic Integrals"/><category term="logarithmic-integrals"/><category term="euler-sums"/><category term="polylogarithm"/><category term="contour-integration"/><category term="feynmans-trick"/></entry><entry><title>Evaluating very nasty logarithmic integrals: Part II</title><link href="https://integralsandseries.in/2020/08/06/evaluating-very-nasty-logarithmic-integrals-part-ii/" rel="alternate"/><published>2020-08-06T10:27:24+00:00</published><updated>2026-10-24T00:00:00+05:30</updated><author><name>Shobhit Bhatnagar</name></author><id>tag:integralsandseries.in,2020-08-06:/2020/08/06/evaluating-very-nasty-logarithmic-integrals-part-ii/</id><summary type="html">&lt;p&gt;The second part develops further logarithmic integral evaluations through polylogarithmic identities.&lt;/p&gt;</summary><content type="html">&lt;p&gt;We continue the evaluations from &lt;a href="https://integralsandseries.in/2020/08/01/evaluating-very-nasty-logarithmic-integrals-part-i/"&gt;part 1&lt;/a&gt;, keeping the integral numbering from that post. Here the resulting Euler sums lead us toward polylogarithmic identities rather than a direct residue calculation.&lt;/p&gt;
&lt;h2&gt;Integral #3&lt;/h2&gt;
&lt;p&gt;We'll start by finding a closed form for the integral:&lt;/p&gt;
&lt;div class="arithmatex"&gt;\[
I_1 = \int_0^1 \frac{\log^2(1+x^2)}{1+x^2}dx
\]&lt;/div&gt;
&lt;p&gt;This integral can be reduced to Euler sums like our previous problem. But this time, the resulting Euler sums cannot be evaluated using the method of residues. Therefore, we'll have to use a different approach.&lt;/p&gt;
&lt;p&gt;Let us first consider the following integral:&lt;/p&gt;
&lt;div class="arithmatex"&gt;\[
I_2 = \int_0^1 \frac{\log^2(1+ix)}{1+x^2}dx
\]&lt;/div&gt;
&lt;p&gt;Throughout this post, &lt;span class="arithmatex"&gt;\(\log\)&lt;/span&gt; denotes the principal branch of the logarithmic function defined by &lt;span class="arithmatex"&gt;\(\log z = \log|z| + i\text{arg}(z)\)&lt;/span&gt;, with &lt;span class="arithmatex"&gt;\(-\pi &amp;lt; |\text{arg}(z)| \leq \pi\)&lt;/span&gt;. We have&lt;/p&gt;
&lt;div class="arithmatex"&gt;\[
\begin{equation}\label{evaluating-very-nasty-logarithmic-integrals-part-ii-eq-1}
\begin{aligned}
I_2 &amp;amp;= \frac{1}{2}\int_0^1\log^2(1+ix)\left(\frac{1}{1+ix}+\frac{1}{1-ix} \right)dx \\
&amp;amp;= \frac{\log^3(1+ix)}{6i}\Big|_0^1 + \frac{1}{2}\int_0^1 \frac{\log^2(1+ix)}{1-ix}dx \\
&amp;amp;= \frac{\log^3(1+i)}{6i} + \frac{i}{2}\int_{\frac{1}{2}}^{\frac{1-i}{2}}\frac{\log^2(2(1-x))}{x}dx \\
&amp;amp;= \frac{\log^3(1+i)}{6i} + \frac{i}{2}\int_{\frac{1}{2}}^{\frac{1-i}{2}}\frac{\log^2(1-x)+\log^2(2)+2\log(2)\log(1-x)}{x}dx \\
&amp;amp;= \frac{\log^3(1+i)}{6i}  + \frac{i\log^2(2)\log\left(1-i\right)}{2} + i\log(2) \left[\text{Li}_2\left(\frac{1}{2}\right)-\text{Li}_2\left(\frac{1-i}{2}\right) \right]  \\ &amp;amp;\quad + \frac{i}{2}\int_{\frac{1}{2}}^{\frac{1-i}{2}}\frac{\log^2(1-x)}{x}dx 
\end{aligned}
\end{equation}
\]&lt;/div&gt;
&lt;p&gt;We can use &lt;a href="https://integralsandseries.in/2020/07/23/euler-sums-involving-square-of-harmonic-numbers/"&gt;equation (2)&lt;/a&gt; to evaluate &lt;span class="arithmatex"&gt;\(\int_{\frac{1}{2}}^{\frac{1+i}{2}}\frac{\log^2(1-x)}{x}dx\)&lt;/span&gt;.&lt;/p&gt;
&lt;div class="arithmatex"&gt;\[
\begin{equation}\label{evaluating-very-nasty-logarithmic-integrals-part-ii-eq-2}
\begin{aligned}
\int_{\frac{1}{2}}^{\frac{1-i}{2}}\frac{\log^2(1-x)}{x}dx &amp;amp;= \log^2\left( \frac{1+i}{2}\right)\log\left(\frac{1-i}{2}\right) + 2\log\left(\frac{1+i}{2} \right)\text{Li}_2\left(\frac{1+i}{2}\right) \\ &amp;amp;\quad -2\text{Li}_3\left(\frac{1+i}{2}\right) + \log^3(2) + 2\log(2)\text{Li}_2\left(\frac{1}{2}\right) + 2\text{Li}_3\left(\frac{1}{2} \right) 
\end{aligned}
\end{equation}
\]&lt;/div&gt;
&lt;p&gt;To simplify &lt;span class="arithmatex"&gt;\(\text{Li}_2\left(\frac{1+i}{2} \right)\)&lt;/span&gt; and &lt;span class="arithmatex"&gt;\(\text{Li}_2\left(\frac{1-i}{2} \right)\)&lt;/span&gt;, we can use the following Dilogarithm identity:&lt;/p&gt;
&lt;div class="arithmatex"&gt;\[
\text{Li}_2(1-z) + \text{Li}_2\left(1-z^{-1} \right) = -\frac{1}{2}\log^2(z)
\]&lt;/div&gt;
&lt;p&gt;This is easy to verify by differentiating both sides of the above equation with respect to &lt;span class="arithmatex"&gt;\(z\)&lt;/span&gt;. Plugging in &lt;span class="arithmatex"&gt;\(z=\frac{1+i}{2}\)&lt;/span&gt; gives&lt;/p&gt;
&lt;div class="arithmatex"&gt;\[
\begin{aligned}
\text{Li}_2\left(\frac{1-i}{2}\right) &amp;amp;= -\text{Li}_2(i) - \frac{1}{2}\log^2\left(\frac{1+i}{2}\right) = \frac{5\pi^2}{96}-\frac{\log^2(2)}{8}+i\left(-G + \frac{\pi}{8}\log(2)\right) \\
\text{Li}_2\left(\frac{1+i}{2}\right) &amp;amp;= \overline{\text{Li}_2\left(\frac{1-i}{2}\right)} = \frac{5\pi^2}{96}-\frac{\log^2(2)}{8}-i\left(-G + \frac{\pi}{8}\log(2)\right)
\end{aligned}
\]&lt;/div&gt;
&lt;p&gt;Now, we have everything needed to simplify equation &lt;span class="arithmatex"&gt;\(\eqref{evaluating-very-nasty-logarithmic-integrals-part-ii-eq-1}\)&lt;/span&gt;. This is a cumbersome task so I will only present the final result:&lt;/p&gt;
&lt;div class="arithmatex"&gt;\[
\begin{equation}\label{evaluating-very-nasty-logarithmic-integrals-part-ii-eq-3}
\begin{aligned}
I_2 &amp;amp;= -\frac{3\pi^3}{128}- \frac{G \log(2) }{2} + \frac{7\pi \log^2(2)}{32} + i\Bigg( -\frac{ G \pi }{4} + \frac{7\pi^2 \log(2)}{192} + \frac{\log^3(2)}{48}+\frac{7}{8}\zeta(3) \\ &amp;amp;\quad - \text{Li}_3\left(\frac{1+i}{2} \right)\Bigg) 
\end{aligned}
\end{equation}
\]&lt;/div&gt;
&lt;p&gt;To the best of my knowledge, &lt;span class="arithmatex"&gt;\(\text{Li}_3\left(\frac{1+i}{2} \right)\)&lt;/span&gt; can not be simplified further. So, we'll leave it as it is. We can now extract &lt;span class="arithmatex"&gt;\(I_1\)&lt;/span&gt; from the real part of &lt;span class="arithmatex"&gt;\(I_2\)&lt;/span&gt;.&lt;/p&gt;
&lt;div class="arithmatex"&gt;\[
\begin{aligned}
\text{Re }I_2 &amp;amp;= \int_0^1 \frac{\frac{1}{4}\log^2(1+x^2) - \arctan^2(x)}{1+x^2}dx \\
&amp;amp;= \frac{1}{4}\int_0^1 \frac{\log^2(1+x^2)}{1+x^2}dx - \frac{\arctan^3(x)}{3}\Big|_0^1 \\
&amp;amp;= \frac{1}{4}I_1 - \frac{\pi^3}{192}
\end{aligned}
\]&lt;/div&gt;
&lt;p&gt;Therefore,&lt;/p&gt;
&lt;div class="arithmatex"&gt;\[
\begin{equation}\label{evaluating-very-nasty-logarithmic-integrals-part-ii-eq-4}
\boxed{I_1 = -2G\log(2) - \frac{7\pi^3}{96} + \frac{7\pi \log^2(2)}{8} + 4\text{ Im }\text{Li}_3\left(\frac{1+i}{2} \right)}
\end{equation}
\]&lt;/div&gt;
&lt;p&gt;Now, let's turn our attention to another integral:&lt;/p&gt;
&lt;div class="arithmatex"&gt;\[
I_3 = \int_0^1 \frac{\log(x)\log(1+x^2)}{1+x^2}dx
\]&lt;/div&gt;
&lt;p&gt;Notice that with the help of some algebra, we can write:&lt;/p&gt;
&lt;div class="arithmatex"&gt;\[
I_3 = -\frac{1}{2}\int_0^1 \frac{\log^2\left(\frac{x}{1+x^2} \right)}{1+x^2}dx + \frac{1}{2}\int_0^1 \frac{\log^2(1+x^2)}{1+x^2}dx + \frac{1}{2}\int_0^1 \frac{\log^2(x)}{1+x^2}dx
\]&lt;/div&gt;
&lt;p&gt;The leftmost integral can be dealt with the trigonometric substitution &lt;span class="arithmatex"&gt;\(x=\tan \theta\)&lt;/span&gt;:&lt;/p&gt;
&lt;div class="arithmatex"&gt;\[
\begin{aligned}
\int_0^1 \frac{\log^2\left(\frac{x}{1+x^2} \right)}{1+x^2}dx &amp;amp;= \int_0^{\frac{\pi}{4}} \log^2\left(\sin \theta \cos\theta \right) \; d\theta \\
&amp;amp;= \int_0^{\frac{\pi}{4}} \log^2\left(\frac{\sin(2\theta)}{2} \right)\; d\theta \\
&amp;amp;= \frac{1}{2}\int_0^{\frac{\pi}{2}}\log^2\left(\frac{\sin \theta}{2} \right)\; d\theta \\
&amp;amp;= \frac{1}{2}\lim_{s\to 1}\frac{d^2}{ds^2}\int_0^{\frac{\pi}{2}}\left(\frac{\sin\theta}{2} \right)^{s-1}d\theta \\
&amp;amp;= \frac{1}{2}\lim_{s\to 1}\frac{d^2}{ds^2}\left[\frac{2^{-s}\sqrt{\pi}\Gamma\left(\frac{s}{2}\right)}{\Gamma\left(\frac{1+s}{2} \right)} \right] \\
&amp;amp;= \frac{\pi^3}{48}+ \pi \log^2(2)
\end{aligned}
\]&lt;/div&gt;
&lt;p&gt;The middle integral has already been evaluated. As for the rightmost integral, we have:&lt;/p&gt;
&lt;div class="arithmatex"&gt;\[
\begin{aligned}
\int_0^1 \frac{\log^2(x)}{1+x^2}dx &amp;amp;= \sum_{n=0}^\infty (-1)^{n}\int_0^1 x^{2n}\log^2(x)\; dx \\
&amp;amp;= 2\sum_{n=0}^\infty \frac{(-1)^n}{(2n+1)^3} \\
&amp;amp;= \frac{\pi^3}{16}
\end{aligned}
\]&lt;/div&gt;
&lt;p&gt;This gives us&lt;/p&gt;
&lt;div class="arithmatex"&gt;\[
\begin{equation}\label{evaluating-very-nasty-logarithmic-integrals-part-ii-eq-5}
\boxed{I_3 =-\frac{\pi^3}{64} -G \log(2) - \frac{\pi \log^2(2)}{16} +2 \text{ Im }\text{Li}_3\left(\frac{1+i}{2}\right)}
\end{equation}
\]&lt;/div&gt;
&lt;p&gt;One can also evaluate &lt;span class="arithmatex"&gt;\(I_4 = \int_0^1\frac{\log(1+x^2)\arctan(x)}{x}dx\)&lt;/span&gt; by noting that&lt;/p&gt;
&lt;div class="arithmatex"&gt;\[
I_4 = \text{Im}\int_0^1 \frac{\log^2(1+ix)}{x}dx = \text{Im}\int_0^{-i}\frac{\log^2(1-x)}{x}dx
\]&lt;/div&gt;
&lt;p&gt;and using &lt;a href="https://integralsandseries.in/2020/07/23/euler-sums-involving-square-of-harmonic-numbers/"&gt;equation (3)&lt;/a&gt;. The end result is:&lt;/p&gt;
&lt;div class="arithmatex"&gt;\[
\begin{equation}\label{evaluating-very-nasty-logarithmic-integrals-part-ii-eq-6}
\boxed{I_4 =-\frac{3\pi^3}{64}+G\log(2)-\frac{\pi \log^2(2)}{16}+2\text{ Im }\text{Li}_3\left(\frac{1+i}{2}\right) }
\end{equation}
\]&lt;/div&gt;
&lt;p&gt;Using &lt;span class="arithmatex"&gt;\(I_3\)&lt;/span&gt; and &lt;span class="arithmatex"&gt;\(I_4\)&lt;/span&gt;, we can evaluate &lt;span class="arithmatex"&gt;\(I_5 = \int_0^1 \frac{\log(x)\arctan(x)}{x(1+x^2)}dx\)&lt;/span&gt; as follows:&lt;/p&gt;
&lt;div class="arithmatex"&gt;\[
\begin{aligned}
I_5 &amp;amp;= \int_0^1 \log(x)\arctan(x)\left(\frac{1}{x}-\frac{x}{1+x^2} \right) dx \\
&amp;amp;= \int_0^1 \frac{\log(x)\arctan(x)}{x}dx - \int_0^1 \frac{x\log(x)\arctan(x)}{1+x^2}dx \\
&amp;amp;= -\frac{1}{2}\int_0^1 \frac{\log^2(x)}{1+x^2}dx + \frac{1}{2} \int_0^1 \frac{\log(x)\log(1+x^2)}{1+x^2} dx + \frac{1}{2}\int_0^1 \frac{\log(1+x^2)\arctan(x)}{x}dx \quad (\text{IBP}) \\
&amp;amp;= -\frac{\pi^3}{32} + \frac{I_3 + I_4}{2} \\
&amp;amp;= -\frac{\pi^3}{16} - \frac{\pi \log^2(2)}{16} + 2\text{ Im }\text{Li}_3\left(\frac{1+i}{2}\right)
\end{aligned}
\]&lt;/div&gt;
&lt;p&gt;On the other hand, we have:&lt;/p&gt;
&lt;div class="arithmatex"&gt;\[
\begin{aligned}
I_5 &amp;amp;= \int_0^1 \log(x) \left(\sum_{n=0}^\infty (-1)^n \tilde{H}_n x^{2n} \right) dx\\ &amp;amp;= \sum_{n=0}^\infty (-1)^n \tilde{H}_n \int_0^1 x^{2n}\log(x) \; dx \\
&amp;amp;= -\sum_{n=0}^\infty \frac{(-1)^n \tilde{H}_n}{(2n+1)^2} 
\end{aligned}
\]&lt;/div&gt;
&lt;p&gt;where &lt;span class="arithmatex"&gt;\(\tilde{H}_n = \sum_{j=0}^n \frac{1}{2j+1}\)&lt;/span&gt;. This gives us an interesting Euler sum:&lt;/p&gt;
&lt;div class="arithmatex"&gt;\[
\begin{equation}\label{evaluating-very-nasty-logarithmic-integrals-part-ii-eq-7}
\boxed{\sum_{n=0}^\infty \frac{(-1)^n \tilde{H}_n}{(2n+1)^2} = \frac{\pi^3}{16} + \frac{\pi \log^2(2)}{16} - 2\text{ Im }\text{Li}_3\left(\frac{1+i}{2}\right)}
\end{equation}
\]&lt;/div&gt;
&lt;p&gt;Of course, one can proceed in a similar manner to create more crazy integrals. The following problem is left as an exercise for the reader.&lt;/p&gt;
&lt;p&gt;&lt;strong&gt;Exercise 1:&lt;/strong&gt;  Using the method of residues, show that&lt;/p&gt;
&lt;div class="arithmatex"&gt;\[
\begin{equation}\label{evaluating-very-nasty-logarithmic-integrals-part-ii-eq-8}
\sum_{n=0}^\infty \frac{(-1)^n\tilde{H}_n}{2n+1} = \frac{G}{2}+\frac{\pi \log(2)}{8}
\end{equation}
\]&lt;/div&gt;
&lt;h2&gt;Integral #4&lt;/h2&gt;
&lt;p&gt;Many years ago, I encountered the following integral:&lt;/p&gt;
&lt;div class="arithmatex"&gt;\[
I_6 = \int_0^1 \frac{x \arctan(x)\log(1-x^2)}{1+x^2}dx
\]&lt;/div&gt;
&lt;p&gt;At that time, I couldn't find a solution to this problem. Hence, I ended up asking it on math.stackexchange.com. The answers that I received there involved evaluating complex logarithmic integrals by brute force. Recently, I discovered a much simpler way to solve it using the method of residues.&lt;/p&gt;
&lt;p&gt;Let's start by breaking down &lt;span class="arithmatex"&gt;\(I_6\)&lt;/span&gt; into Euler sums.&lt;/p&gt;
&lt;div class="arithmatex"&gt;\[
\begin{equation}\label{evaluating-very-nasty-logarithmic-integrals-part-ii-eq-9}
\begin{aligned}
I_6 &amp;amp;= \int_0^1 x\log(1-x^2) \left(\sum_{n=0}^\infty (-1)^n \tilde{H}_n x^{2n+1} \right)dx \\
&amp;amp;= \sum_{n=0}^\infty (-1)^n \tilde{H}_n \int_0^1 x^{2n+2}\log(1-x^2) dx \\
&amp;amp;= \sum_{n=0}^\infty (-1)^{n+1} \tilde{H}_n \left(\frac{\psi_0\left(n+\frac{5}{2} \right)+\gamma}{2n+3} \right) \\
&amp;amp;= \sum_{n=0}^\infty (-1)^{n+1}\left(\tilde{H}_{n+1}-\frac{1}{2n+3} \right)\left(\frac{-2\log(2)+2\tilde{H}_{n+1}}{2n+3} \right) \\
&amp;amp;= \sum_{n=0}^\infty (-1)^n \left(\tilde{H}_{n}-\frac{1}{2n+1} \right)\left(\frac{-2\log(2)+2\tilde{H}_{n}}{2n+1} \right) \\
&amp;amp;= -2\log(2)\sum_{n=0}^\infty \frac{(-1)^n \tilde{H}_n}{2n+1}+2G\log(2) + 2\sum_{n=0}^\infty \frac{(-1)^n (\tilde{H}_n)^2}{2n+1} -2\sum_{n=0}^\infty \frac{(-1)^n \tilde{H}_n}{(2n+1)^2} \\
&amp;amp;= G\log(2) - \frac{\pi \log^2(2)}{4} + 2\sum_{n=0}^\infty \frac{(-1)^n (\tilde{H}_n)^2}{2n+1} -2\sum_{n=0}^\infty \frac{(-1)^n \tilde{H}_n}{(2n+1)^2} 
\end{aligned}
\end{equation}
\]&lt;/div&gt;
&lt;p&gt;The result of exercise 1 was used in the last step.&lt;/p&gt;
&lt;p&gt;Now, integrate the function &lt;span class="arithmatex"&gt;\(f(z) = \pi\csc(\pi z) \frac{\left( \gamma + \psi_0 \left(-z+\frac{3}{2} \right)\right)^2}{-2z+1}\)&lt;/span&gt; over the positively oriented square, &lt;span class="arithmatex"&gt;\(C_N\)&lt;/span&gt;, with vertices &lt;span class="arithmatex"&gt;\(\pm \left(N+\frac{1}{4}\right)\pm i\left(N+\frac{1}{4} \right)\)&lt;/span&gt;. It takes a bit of effort to see that&lt;/p&gt;
&lt;div class="arithmatex"&gt;\[
\lim_{N\to \infty}\int_{C_N} f(z)\; dz = 0
\]&lt;/div&gt;
&lt;p&gt;This implies that the sum of residues of &lt;span class="arithmatex"&gt;\(f(z)\)&lt;/span&gt; at it's poles is equal to &lt;span class="arithmatex"&gt;\(0\)&lt;/span&gt;. We have&lt;/p&gt;
&lt;div class="arithmatex"&gt;\[
\begin{aligned}
\mathop{\text{Res}}\limits_{z=-n} f(z) &amp;amp;= (-1)^n \frac{\left(\gamma +\psi_0\left(n+\frac{3}{2}\right) \right)^2}{2n+1} = (-1)^n \frac{\left(-2\log(2)+2\tilde{H}_n \right)^2}{2n+1}, \quad n\in\{0,1,2,\cdots\} \\
\mathop{\text{Res}}\limits_{z=n} f(z) &amp;amp;= (-1)^{n-1} \frac{\left(\gamma+\psi_0\left(-n+\frac{3}{2} \right) \right)^2}{2n-1} = (-1)^{n-1} \frac{\left(-2\log(2)+2\tilde{H}_{n-1} -\frac{2}{2n-1}\right)^2}{2n-1}, \quad n\in\{1,2,3,\cdots\} \\
\mathop{\text{Res}}\limits_{z=\frac{2n+1}{2}} f(z) &amp;amp;= (-1)^{n-1} \frac{\pi H_n}{n} - (-1)^{n-1} \frac{3\pi}{2n^2}, \quad n\in\{1,2,3,\cdots\}
\end{aligned}
\]&lt;/div&gt;
&lt;p&gt;Summing up the residues and performing some algebraic simplifications gives:&lt;/p&gt;
&lt;div class="arithmatex"&gt;\[
\begin{equation}\label{evaluating-very-nasty-logarithmic-integrals-part-ii-eq-10}
\begin{aligned}
&amp;amp;\; 8\sum_{n=0}^\infty \frac{(-1)^n (\tilde{H}_n)^2}{2n+1}-8\sum_{n=0}^\infty \frac{(-1)^n \tilde{H}_n}{(2n+1)^2}-16\log(2)\sum_{n=0}^\infty \frac{(-1)^n \tilde{H}_n}{2n+1}+ 4\sum_{n=0}^\infty \frac{(-1)^n}{(2n+1)^3} \\ &amp;amp;\quad + 8\log(2)\sum_{n=0}^\infty \frac{(-1)^n }{(2n+1)^2} + \pi\sum_{n=1}^\infty \frac{(-1)^{n-1}H_n}{n} - \frac{3\pi}{2}\sum_{n=1}^\infty \frac{(-1)^{n-1}}{n^2} = 0 \\
&amp;amp;\implies 8\left(\sum_{n=0}^\infty \frac{(-1)^n (\tilde{H}_n)^2}{2n+1}-\sum_{n=0}^\infty \frac{(-1)^n \tilde{H}_n}{(2n+1)^2} \right) + \frac{\pi^3}{8} + \pi \left(\frac{\pi^2}{12}-\frac{\log^2(2)}{2}\right)-\frac{3\pi}{2}\left(\frac{\pi^2}{12} \right) = 0 \\
&amp;amp;\implies \sum_{n=0}^\infty \frac{(-1)^n (\tilde{H}_n)^2}{2n+1}-\sum_{n=0}^\infty \frac{(-1)^n \tilde{H}_n}{(2n+1)^2} = -\frac{\pi^3}{96}+\frac{\pi \log^2(2)}{16} 
\end{aligned}
\end{equation}
\]&lt;/div&gt;
&lt;p&gt;In the above calculation, we used the result of exercise 1 and that&lt;/p&gt;
&lt;div class="arithmatex"&gt;\[
\sum_{n=1}^\infty \frac{(-1)^{n-1}H_n}{n} = \frac{\pi^2}{12}-\frac{\log^2(2)}{2}
\]&lt;/div&gt;
&lt;p&gt;This follows from &lt;a href="https://integralsandseries.in/2020/07/05/an-alternating-euler-sum/"&gt;(A)&lt;/a&gt;.
Finally, plugging equation &lt;span class="arithmatex"&gt;\(\eqref{evaluating-very-nasty-logarithmic-integrals-part-ii-eq-10}\)&lt;/span&gt; into &lt;span class="arithmatex"&gt;\(\eqref{evaluating-very-nasty-logarithmic-integrals-part-ii-eq-9}\)&lt;/span&gt;, gives&lt;/p&gt;
&lt;div class="arithmatex"&gt;\[
\begin{equation}\label{evaluating-very-nasty-logarithmic-integrals-part-ii-eq-11}
\boxed{I_6 = -\frac{\pi^3}{48}-\frac{\pi}{8}\log^2 (2) +G\log (2)}
\end{equation}
\]&lt;/div&gt;</content><category term="Logarithmic Integrals"/><category term="logarithmic-integrals"/><category term="euler-sums"/><category term="polylogarithm"/></entry><entry><title>Evaluating very nasty logarithmic integrals: Part I</title><link href="https://integralsandseries.in/2020/08/01/evaluating-very-nasty-logarithmic-integrals-part-i/" rel="alternate"/><published>2020-08-01T09:15:41+00:00</published><updated>2026-10-24T00:00:00+05:30</updated><author><name>Shobhit Bhatnagar</name></author><id>tag:integralsandseries.in,2020-08-01:/2020/08/01/evaluating-very-nasty-logarithmic-integrals-part-i/</id><summary type="html">&lt;p&gt;The first part of a series on logarithmic integrals: harmonic-number sums, polylogarithms, and residues.&lt;/p&gt;</summary><content type="html">&lt;p&gt;Logarithmic integrals often become more manageable when we express them as Euler sums. This first part develops that approach and then introduces contour integration as another way to evaluate the resulting sums. We will use identities from &lt;a href="https://integralsandseries.in/2020/07/05/an-alternating-euler-sum/"&gt;An alternating Euler sum (A)&lt;/a&gt; and &lt;a href="https://integralsandseries.in/2020/07/23/euler-sums-involving-square-of-harmonic-numbers/"&gt;Euler sums involving squared harmonic numbers (B)&lt;/a&gt;.&lt;/p&gt;
&lt;h2&gt;Integral #1&lt;/h2&gt;
&lt;p&gt;Our first integral is the following:&lt;/p&gt;
&lt;div class="arithmatex"&gt;\[
\begin{aligned}
I &amp;amp;= \int_0^1 \frac{\log(t)\log(1-t)\log(1+t)}{t}dt
\end{aligned}
\]&lt;/div&gt;
&lt;p&gt;We will use the integral &lt;span class="arithmatex"&gt;\(J = \int_0^1 \frac{\log(t)\log^2(1-t)}{t}dt\)&lt;/span&gt; as a starting point. Make the substitution &lt;span class="arithmatex"&gt;\(t\mapsto t^2\)&lt;/span&gt; in &lt;span class="arithmatex"&gt;\(J\)&lt;/span&gt; to obtain:&lt;/p&gt;
&lt;div class="arithmatex"&gt;\[
\begin{aligned}
J &amp;amp;= 2\int_0^1  \frac{\log(t^2) \log^2(1-t^2)}{t}dt \\
&amp;amp;= 4\int_0^1 \frac{\log(t)\log^2(1-t)}{t}dt + 4\int_0^1 \frac{\log(t)\log^2(1+t)}{t}dt + 8\int_0^1 \frac{\log(t)\log(1-t) \log(1+t)}{t}dt \\
&amp;amp;= 4J + 4\int_0^1 \frac{\log(t)\log^2(1+t)}{t}dt + 8I
\end{aligned}
\]&lt;/div&gt;
&lt;p&gt;Solving the above equation for &lt;span class="arithmatex"&gt;\(I\)&lt;/span&gt; gives us:&lt;/p&gt;
&lt;div class="arithmatex"&gt;\[
\begin{equation}\label{evaluating-very-nasty-logarithmic-integrals-part-i-eq-1}
I = -\frac{3}{8}J - \frac{1}{2} \int_0^1 \frac{\log(t)\log^2(1+t)}{t}dt
\end{equation}
\]&lt;/div&gt;
&lt;p&gt;Applying integration by parts and using the generating function of the Harmonic number yields:&lt;/p&gt;
&lt;div class="arithmatex"&gt;\[
\begin{equation}\label{evaluating-very-nasty-logarithmic-integrals-part-i-eq-2}
\begin{aligned}
\int_0^1 \frac{\log(t)\log^2(1+t)}{t}dt &amp;amp;= -\int_0^1 \frac{\log^2(t)\log(1+t)}{1+t}dt \\
&amp;amp;= -\sum_{n=1}^\infty (-1)^{n+1} H_n \int_0^1 t^{n} \log^2(t) \; dt \\
&amp;amp;= -2\sum_{n=1}^\infty (-1)^{n+1} \frac{H_n}{(n+1)^3} \\
&amp;amp;= -2\sum_{n=0}^\infty (-1)^{n+1} \frac{H_{n+1}-\frac{1}{n+1}}{(n+1)^3} \\
&amp;amp;= 2\sum_{n=1}^\infty (-1)^{n+1} \frac{H_n}{n^3} - 2\sum_{n=1}^\infty \frac{(-1)^{n+1}}{n^4} \\
&amp;amp;= 2\text{Li}_4(-1) +  2\sum_{n=1}^\infty (-1)^{n+1} \frac{H_n}{n^3} 
\end{aligned}
\end{equation}
\]&lt;/div&gt;
&lt;p&gt;A similar calculation shows that:&lt;/p&gt;
&lt;div class="arithmatex"&gt;\[
\begin{equation}\label{evaluating-very-nasty-logarithmic-integrals-part-i-eq-3}
J = 2\zeta(4) - 2\sum_{n=1}^\infty \frac{H_n}{n^3}
\end{equation}
\]&lt;/div&gt;
&lt;p&gt;From &lt;a href="https://integralsandseries.in/2020/07/05/an-alternating-euler-sum/"&gt;(A)&lt;/a&gt;, we know how to evaluate &lt;span class="arithmatex"&gt;\(\sum_{n=1}^\infty (-1)^{n+1} \frac{H_n}{n^3}\)&lt;/span&gt; and &lt;span class="arithmatex"&gt;\(\sum_{n=1}^\infty \frac{H_n}{n^3}\)&lt;/span&gt;.&lt;/p&gt;
&lt;div class="arithmatex"&gt;\[
\begin{aligned}
\sum_{n=1}^\infty \frac{H_n}{n^3} &amp;amp;= \frac{\pi^4}{72} \\
\sum_{n=1}^\infty (-1)^{n+1}\frac{H_n}{n^3} &amp;amp;= \frac{11\pi^4}{360}+\frac{\pi^2}{12}\log^2(2)-\frac{\log^4(2)}{12}-\frac{7}{4}\log(2)\zeta(3) -2\text{Li}_4\left(\frac{1}{2}\right)
\end{aligned}
\]&lt;/div&gt;
&lt;p&gt;Finally, putting everything together gives us:&lt;/p&gt;
&lt;div class="arithmatex"&gt;\[
\boxed{I = -\frac{3\pi^4}{160}-\frac{\pi^2}{12}\log^2(2)+\frac{\log^4(2)}{12}+\frac{7}{4}\log(2)\zeta(3) +2\text{Li}_4\left(\frac{1}{2}\right)}
\]&lt;/div&gt;
&lt;h2&gt;Integral #2&lt;/h2&gt;
&lt;p&gt;The next integral on our list is&lt;/p&gt;
&lt;div class="arithmatex"&gt;\[
K = \int_0^1 \frac{\log(x)\log(1+x^2)\arctan(x)}{x}dx
\]&lt;/div&gt;
&lt;p&gt;This integral was originally posted by the user FDP on math.stackexchange.com. &lt;a href="https://math.stackexchange.com/questions/3774212/evaluating-int-01-frac-ln-x-ln1x2-arctan-xxdx"&gt;My solution&lt;/a&gt; is posted there as well.&lt;/p&gt;
&lt;p&gt;Using integration by parts gives us:&lt;/p&gt;
&lt;div class="arithmatex"&gt;\[
K = - \frac{1}{2}\int_0^1 \frac{\log^2(x)\log(1+x^2)}{1+x^2}dx - \int_0^1 \frac{x \log^2(x) \arctan(x)}{1+x^2}dx
\]&lt;/div&gt;
&lt;p&gt;Now, we can use the following series expansions to reduce &lt;span class="arithmatex"&gt;\(K\)&lt;/span&gt; into Euler sums:&lt;/p&gt;
&lt;div class="arithmatex"&gt;\[
\begin{aligned}
\frac{\arctan (x)}{1+x^2} &amp;amp;= \sum_{n=0}^\infty (-1)^n \tilde{H}_n x^{2n+1} , \quad |x| &amp;lt; 1\\
\frac{\log(1+x^2)}{1+x^2} &amp;amp;= \sum_{n=1}^\infty (-1)^{n+1} H_n x^{2n} , \quad |x| &amp;lt; 1 
\end{aligned}
\]&lt;/div&gt;
&lt;p&gt;where &lt;span class="arithmatex"&gt;\(\tilde{H}_n = \sum_{i=0}^n \frac{1}{2i+1}\)&lt;/span&gt;. This gives us:&lt;/p&gt;
&lt;div class="arithmatex"&gt;\[
\begin{equation}\label{evaluating-very-nasty-logarithmic-integrals-part-i-eq-4}
\begin{aligned}
K &amp;amp;= -\sum_{n=0}^\infty (-1)^n \tilde{H}_n\int_0^1 x^{2n+2} \log^2(x)\; dx-\frac{1}{2}\sum_{n=1}^\infty (-1)^{n+1} H_n\int_0^1 x^{2n}\log^2(x)\; dx \\
&amp;amp;= -2\sum_{n=0}^\infty \frac{(-1)^n \tilde{H}_n}{(2n+3)^3} - \sum_{n=1}^\infty \frac{(-1)^{n+1} H_n}{(2n+1)^3} \\
&amp;amp;= -2\sum_{n=1}^\infty \frac{(-1)^{n+1} H_{2n}}{(2n+1)^3} 
\end{aligned}
\end{equation}
\]&lt;/div&gt;
&lt;p&gt;We'll employ the contour integration method to evaluate the above Euler sum. It is a very powerful tool that can handle a large class of Euler sums (see, for e.g. &lt;a href="https://projecteuclid.org/euclid.em/1047674270"&gt;Euler sums and contour integral representations by Philippe Flajolet and Bruno Salvy&lt;/a&gt;).&lt;/p&gt;
&lt;p&gt;We'll integrate the function &lt;span class="arithmatex"&gt;\(f(z) = \pi \csc(\pi z) \frac{\gamma+\psi_0(-2z+1)}{(-2z+1)^3}\)&lt;/span&gt; around the positively oriented square, &lt;span class="arithmatex"&gt;\(C_N\)&lt;/span&gt;, with vertices &lt;span class="arithmatex"&gt;\(\pm \left(N+\frac{1}{4} \right)\pm \left(N+\frac{1}{4} \right)i\)&lt;/span&gt;. It is easy to see that&lt;/p&gt;
&lt;div class="arithmatex"&gt;\[
\lim_{N\to \infty}\int_{C_N}f(z)\; dz = 0
\]&lt;/div&gt;
&lt;p&gt;Hence, the sum of all residues of &lt;span class="arithmatex"&gt;\(f(z)\)&lt;/span&gt; at its poles is equal to &lt;span class="arithmatex"&gt;\(0\)&lt;/span&gt;. A straightforward computation shows that the residues are:&lt;/p&gt;
&lt;div class="arithmatex"&gt;\[
\begin{aligned}
\mathop{\text{Res}}\limits_{z=-n} f(z) &amp;amp;= (-1)^n \frac{H_{2n}}{(2n+1)^3} , \quad n\in \{0,1,2,\cdots\} \\
\mathop{\text{Res}}\limits_{z=\frac{2n+1}{2}} f(z) &amp;amp;= \frac{(-1)^{n+1} \pi}{16 n^3} , \quad n\in \{1,2,3,\cdots\} \\
\mathop{\text{Res}}\limits_{z=n} f(z) &amp;amp;= \frac{(-1)^{n+1}H_{2n-1}}{(2n-1)^3}- 3\frac{(-1)^{n+1}}{(2n-1)^4}, \quad n\in \{1,2,3,\cdots \}\\
\mathop{\text{Res}}\limits_{z=\frac{1}{2}} f(z) &amp;amp;= \frac{\pi \zeta(3)}{2}
\end{aligned}
\]&lt;/div&gt;
&lt;p&gt;The list of local expansions of basic kernels given on page 6 of the above mentioned paper are quite useful for carrying out these computations. Now, adding up all the residues gives us:&lt;/p&gt;
&lt;div class="arithmatex"&gt;\[
\begin{equation}\label{evaluating-very-nasty-logarithmic-integrals-part-i-eq-5}
\begin{aligned}
\frac{\pi \zeta(3)}{2}+\sum_{n=1}^\infty \frac{(-1)^n H_{2n}}{(2n+1)^3} + \frac{\pi}{16}\sum_{n=1}^\infty \frac{(-1)^{n+1}}{n^3} + \sum_{n=1}
^\infty \frac{(-1)^{n+1}H_{2n-1}}{(2n-1)^3} -3\sum_{n=1}^\infty \frac{(-1)^{n+1}}{(2n-1)^4}&amp;amp;= 0\\
\implies \frac{\pi \zeta(3)}{2}+\sum_{n=1}^\infty \frac{(-1)^n H_{2n}}{(2n+1)^3} + \frac{\pi}{16}\left(\frac{3\zeta(3)}{4} \right) + \sum_{n=1}^\infty \frac{(-1)^n H_{2n}}{(2n+1)^3} -2 \sum_{n=1}^\infty \frac{(-1)^{n+1}}{(2n-1)^4} &amp;amp;= 0 \\
\implies -2\sum_{n=1}^\infty \frac{(-1)^{n+1}H_{2n}}{(2n+1)^3} + \frac{35\pi \zeta(3)}{64} -2\beta(4) = 0 \\
\implies \boxed{\sum_{n=1}^\infty \frac{(-1)^{n+1}H_{2n}}{(2n+1)^3} = -\beta(4) + \frac{35\pi \zeta(3)}{128}} 
\end{aligned}
\end{equation}
\]&lt;/div&gt;
&lt;p&gt;where &lt;span class="arithmatex"&gt;\(\beta(s) = \sum_{n=0}^\infty \frac{(-1)^n}{(2n+1)^s}\)&lt;/span&gt; is the Dirichlet beta function. Finally, plugging equation &lt;span class="arithmatex"&gt;\(\eqref{evaluating-very-nasty-logarithmic-integrals-part-i-eq-5}\)&lt;/span&gt; into &lt;span class="arithmatex"&gt;\(\eqref{evaluating-very-nasty-logarithmic-integrals-part-i-eq-4}\)&lt;/span&gt; gives us:&lt;/p&gt;
&lt;div class="arithmatex"&gt;\[
\boxed{K = 2\beta(4) - \frac{35\pi \zeta(3)}{64}}
\]&lt;/div&gt;
&lt;p&gt;Following are some more examples of Euler sums that can be evaluated using the contour integration method:&lt;/p&gt;
&lt;div class="arithmatex"&gt;\[
\begin{aligned}
\sum_{n=0}^\infty\frac{(-1)^n\psi_2(n+1)}{2n+1} &amp;amp;= 8\beta(4)+\frac{\pi^2}{3}G-\frac{7\pi}{2}\zeta(3) \\
\sum_{n=0}^\infty\frac{(-1)^n\psi_1(n+1)}{(2n+1)^2} &amp;amp;= 6\beta(4)+\frac{\pi^2}{4}G-\frac{7\pi}{4}\zeta(3) \\
\sum_{n=1}^\infty \frac{(-1)^{n+1} H_n}{(2n+1)^3} &amp;amp;= -3\beta(4)+\frac{7\pi}{16}\zeta(3)+\frac{\pi^3}{16}\log(2)
\end{aligned}
\]&lt;/div&gt;
&lt;p&gt;where &lt;span class="arithmatex"&gt;\(G=\beta(2)\)&lt;/span&gt; denotes the Catalan's constant. Some integrals that can be evaluated with the above Euler sums are:&lt;/p&gt;
&lt;div class="arithmatex"&gt;\[
\begin{aligned}
\int_0^1 \frac{\log^2(x)\arctan(x)}{x\left(1-x^2 \right)}dx &amp;amp;=\beta(4)+\frac{7\pi \zeta(3)}{64}+\frac{\pi^3 \log(2)}{32} \\
\int_0^1\frac{\log(x)\arctan(x)\text{arctanh}(x)}{x}dx &amp;amp;= \frac{\pi^2}{16}G-\frac{7\pi\zeta(3)}{32} \\
\int_0^{\frac{\pi}{2}}\frac{x}{\sin x}\log^2\left(\frac{1+\cos x-\sin x}{1+\cos x+\sin x}\right)dx &amp;amp;= \frac{\pi^2}{6}G +4\beta(4)
\end{aligned}
\]&lt;/div&gt;</content><category term="Logarithmic Integrals"/><category term="logarithmic-integrals"/><category term="euler-sums"/><category term="polylogarithm"/><category term="residue-theorem"/></entry><entry><title>Euler sums involving squared harmonic numbers</title><link href="https://integralsandseries.in/2020/07/23/euler-sums-involving-square-of-harmonic-numbers/" rel="alternate"/><published>2020-07-23T17:33:33+00:00</published><updated>2026-10-24T00:00:00+05:30</updated><author><name>Shobhit Bhatnagar</name></author><id>tag:integralsandseries.in,2020-07-23:/2020/07/23/euler-sums-involving-square-of-harmonic-numbers/</id><summary type="html">&lt;p&gt;Generating functions for squared harmonic numbers provide evaluations of Euler sums and logarithmic integrals.&lt;/p&gt;</summary><content type="html">&lt;p&gt;The &lt;a href="https://integralsandseries.in/2020/07/05/an-alternating-euler-sum/"&gt;previous post on Euler sums&lt;/a&gt; evaluated sums containing &lt;span class="arithmatex"&gt;\(H_n\)&lt;/span&gt; and &lt;span class="arithmatex"&gt;\(H_n^{(2)}\)&lt;/span&gt;. We now turn to squares of harmonic numbers. Their generating function leads to the integral &lt;span class="arithmatex"&gt;\(\int_0^x \frac{\log^3(1-t)}{t}dt\)&lt;/span&gt;, from which several further evaluations follow.&lt;/p&gt;
&lt;h2&gt;A generating function for squared harmonic numbers&lt;/h2&gt;
&lt;p&gt;Our starting point is the identity&lt;/p&gt;
&lt;div class="arithmatex"&gt;\[
\sum_{n=1}^\infty (H_n)^2 x^n = \frac{\log^2(1-x)+\text{Li}_2(x)}{1-x} ,\quad -1\leq x &amp;lt; 1
\]&lt;/div&gt;
&lt;p&gt;This can be derived by plugging &lt;span class="arithmatex"&gt;\(H_n = \int_0^1\frac{1-t^n}{1-t}dt\)&lt;/span&gt; and interchanging the sum and the integral. We can rewrite the above equation using the fact that &lt;span class="arithmatex"&gt;\(\sum_{n=1}^\infty H_n^{(2)} x^n = \frac{\text{Li}_2(x)}{1-x}\)&lt;/span&gt;.&lt;/p&gt;
&lt;div class="arithmatex"&gt;\[
\begin{equation}\label{euler-sums-involving-square-of-harmonic-numbers-eq-1}
\sum_{n=1}^\infty (H_n)^2 x^n = \frac{\log^2(1-x)}{1-x} + \sum_{n=1}^\infty H_n^{(2)} x^n , \quad -1\leq x &amp;lt; 1
\end{equation}
\]&lt;/div&gt;
&lt;h2&gt;1. Evaluation of &lt;span class="arithmatex"&gt;\(\int_0^x \frac{\log^n(1-t)}{t}dt\)&lt;/span&gt;&lt;/h2&gt;
&lt;p&gt;In this section, we will derive a formula for the integral &lt;span class="arithmatex"&gt;\(\int_0^x \frac{\log^n(1-t)}{t}dt\)&lt;/span&gt; where &lt;span class="arithmatex"&gt;\(n\)&lt;/span&gt; is a positive integer. First, we'll consider the case when &lt;span class="arithmatex"&gt;\(0\leq x &amp;lt; 1\)&lt;/span&gt;. We have:&lt;/p&gt;
&lt;div class="arithmatex"&gt;\[
\begin{equation}\label{euler-sums-involving-square-of-harmonic-numbers-eq-2}
\begin{aligned}
\int_0^x \frac{\log^n (1-t)}{t}dt &amp;amp;= \int_0^{-\log(1-x)} \frac{t^n e^{-t}}{1-e^{-t}}dt \quad (t\mapsto 1-e^{-t}) \\
&amp;amp;= \sum_{j=1}^\infty \int_0^{-\log(1-x)}t^n e^{-jt} dt \\
&amp;amp;= -\sum_{j=1}^\infty \left[e^{-jt}\sum_{i=0}^n \frac{(-1)^{n-i}\log^{n-i}(1-x)}{j^{i+1}}n^{\underline{i}} \right]_0^{-\log(1-x)} \\
&amp;amp;= - \sum_{j=1}^\infty \left( (1-x)^j \sum_{i=0}^n \frac{(-1)^{n-i}\log^{n-i}(1-x)}{j^{i+1}}n^{\underline{i}}-\frac{n!}{j^{n+1}} \right) \\
&amp;amp;= n! \zeta(n+1) + \sum_{i=0}^n (-1)^{n-i+1} n^{\underline{i}}\log^{n-i}(1-x) \text{Li}_{i+1}(1-x) \end{aligned}
\end{equation}
\]&lt;/div&gt;
&lt;p&gt;A similar calculation shows that for &lt;span class="arithmatex"&gt;\(-1\leq x &amp;lt; 0\)&lt;/span&gt;, we have:&lt;/p&gt;
&lt;div class="arithmatex"&gt;\[
\begin{equation}\label{euler-sums-involving-square-of-harmonic-numbers-eq-3}
\begin{aligned}
\int_x^0 \frac{\log^n(1-t)}{t}dt &amp;amp;= -\frac{\log^{n+1}(1-x)}{n+1} - n! \zeta(n+1) + \sum_{i=0}^{n} n^{\underline{i}}\log^{n-i}(1-x)\text{Li}_{i+1}\left(\frac{1}{1-x}\right) \end{aligned}
\end{equation}
\]&lt;/div&gt;
&lt;h2&gt;2. Sums with &lt;span class="arithmatex"&gt;\((H_n)^2\)&lt;/span&gt;&lt;/h2&gt;
&lt;p&gt;We can divide equation &lt;span class="arithmatex"&gt;\(\eqref{euler-sums-involving-square-of-harmonic-numbers-eq-1}\)&lt;/span&gt; by &lt;span class="arithmatex"&gt;\(x\)&lt;/span&gt; and integrate both sides to get some interesting results.&lt;/p&gt;
&lt;div class="arithmatex"&gt;\[
\begin{align}
\sum_{n=1}^\infty \frac{(H_n)^2}{n}x^n &amp;amp;= -\frac{\log^3(1-x)}{3}-\log(1-x)\text{Li}_2(x)+\text{Li}_3(x), \quad -1\leq x &amp;lt; 1\label{euler-sums-involving-square-of-harmonic-numbers-eq-4}\\
\sum_{n=1}^\infty \frac{(H_n)^2}{n^2}x^n &amp;amp;= \text{Li}_4(x) + \frac{\text{Li}_2^2(x)}{2}-\frac{1}{3}\int_0^x \frac{\log^3(1-t)}{t}dt, \quad -1\leq x \leq 1\label{euler-sums-involving-square-of-harmonic-numbers-eq-5}
\end{align}
\]&lt;/div&gt;
&lt;p&gt;Equation &lt;span class="arithmatex"&gt;\(\eqref{euler-sums-involving-square-of-harmonic-numbers-eq-4}\)&lt;/span&gt; was derived using results from section 4 of &lt;a href="https://integralsandseries.in/2020/07/05/an-alternating-euler-sum/"&gt;this post&lt;/a&gt;.&lt;/p&gt;
&lt;p&gt;One can now plug in &lt;span class="arithmatex"&gt;\(x=-1\)&lt;/span&gt; in equation &lt;span class="arithmatex"&gt;\(\eqref{euler-sums-involving-square-of-harmonic-numbers-eq-5}\)&lt;/span&gt; to get:&lt;/p&gt;
&lt;div class="arithmatex"&gt;\[
\boxed{\sum_{n=1}^\infty \frac{(H_n)^2}{n^2}(-1)^{n+1} = \frac{41\pi^4}{1440} + \frac{\pi^2 \log^2(2)}{12}-\frac{\log^4(2)}{12}-\frac{7}{4}\log(3)\zeta(3)-2\text{Li}_4\left(\frac{1}{2}\right)}
\]&lt;/div&gt;
&lt;p&gt;Of course, equation &lt;span class="arithmatex"&gt;\(\eqref{euler-sums-involving-square-of-harmonic-numbers-eq-3}\)&lt;/span&gt; was used to evaluate &lt;span class="arithmatex"&gt;\(\int_{-1}^0 \frac{\log^3(1-t)}{t}dt\)&lt;/span&gt;.&lt;/p&gt;</content><category term="Euler Sums and Infinite Series"/><category term="euler-sums"/><category term="polylogarithm"/><category term="logarithmic-integrals"/><category term="infinite-series"/></entry><entry><title>A contour integration approach to infinite series</title><link href="https://integralsandseries.in/2020/07/14/the-contour-integration-approach-to-infinite-series/" rel="alternate"/><published>2020-07-14T20:12:16+00:00</published><updated>2026-10-24T00:00:00+05:30</updated><author><name>Shobhit Bhatnagar</name></author><id>tag:integralsandseries.in,2020-07-14:/2020/07/14/the-contour-integration-approach-to-infinite-series/</id><summary type="html">&lt;p&gt;A contour-integral approach to an infinite trigonometric series, with an application of equidistribution.&lt;/p&gt;</summary><content type="html">&lt;p&gt;We will evaluate the trigonometric series &lt;span class="arithmatex"&gt;\(\sum_{n=0}^\infty \frac{\cot\left(\frac{2n+1}{2}\pi\sqrt{2} \right)}{(2n+1)^3}\)&lt;/span&gt; by integrating a meromorphic function around a sequence of expanding squares. The residues encode the desired sum, while equidistribution helps us choose a useful subsequence of contours. Define the meromorphic function&lt;/p&gt;
&lt;div class="arithmatex"&gt;\[
f(z) = \frac{\pi \tan(\pi z)\tan(\pi z \theta)}{z^3}
\]&lt;/div&gt;
&lt;p&gt;where the parameter &lt;span class="arithmatex"&gt;\(\theta\)&lt;/span&gt; is a positive irrational number. Let &lt;span class="arithmatex"&gt;\(C_N\)&lt;/span&gt; denote the positively oriented square with vertices &lt;span class="arithmatex"&gt;\((N+1)(1+i),\; (N+1)(-1+i),\; (N+1)(-1-i)\)&lt;/span&gt; and &lt;span class="arithmatex"&gt;\((N+1)(1-i)\)&lt;/span&gt;. The irrationality of &lt;span class="arithmatex"&gt;\(\theta\)&lt;/span&gt; ensures that no pole on the real axis lies on the boundary of this square.&lt;/p&gt;
&lt;h3&gt;Estimating the contour integral&lt;/h3&gt;
&lt;p&gt;Put &lt;span class="arithmatex"&gt;\(m=N+1\)&lt;/span&gt;. We will estimate the horizontal and vertical sides separately. We use the elementary identities&lt;/p&gt;
&lt;div class="arithmatex"&gt;\[
|\tan(u+iv)|^2
=\frac{\sin^2u+\sinh^2v}{\cos^2u+\sinh^2v}
\]&lt;/div&gt;
&lt;p&gt;and, whenever &lt;span class="arithmatex"&gt;\(\tan u\)&lt;/span&gt; is finite,&lt;/p&gt;
&lt;div class="arithmatex"&gt;\[
|\tan(u+iv)|^2
=\frac{\tan^2u+\tanh^2v}
{1+\tan^2u\,\tanh^2v}.
\]&lt;/div&gt;
&lt;p&gt;The first identity, including its limiting cases when &lt;span class="arithmatex"&gt;\(\cos u=0\)&lt;/span&gt;, shows that for &lt;span class="arithmatex"&gt;\(v\neq0\)&lt;/span&gt;,&lt;/p&gt;
&lt;div class="arithmatex"&gt;\[
\tanh|v|\leq|\tan(u+iv)|\leq\coth|v|,
\]&lt;/div&gt;
&lt;p&gt;and, if &lt;span class="arithmatex"&gt;\(u\)&lt;/span&gt; is fixed while &lt;span class="arithmatex"&gt;\(v\)&lt;/span&gt; varies,&lt;/p&gt;
&lt;div class="arithmatex"&gt;\[
|\tan(u+iv)|\leq\max\{1,|\tan u|\}.
\]&lt;/div&gt;
&lt;p&gt;For the second bound, put &lt;span class="arithmatex"&gt;\(a=\tan^2u\)&lt;/span&gt; and &lt;span class="arithmatex"&gt;\(s=\tanh^2v\)&lt;/span&gt;. Then the square of the modulus is &lt;span class="arithmatex"&gt;\((a+s)/(1+as)\)&lt;/span&gt;, which lies between &lt;span class="arithmatex"&gt;\(a\)&lt;/span&gt; and &lt;span class="arithmatex"&gt;\(1\)&lt;/span&gt; as &lt;span class="arithmatex"&gt;\(s\)&lt;/span&gt; ranges from &lt;span class="arithmatex"&gt;\(0\)&lt;/span&gt; to &lt;span class="arithmatex"&gt;\(1\)&lt;/span&gt;. This proves the claimed estimate.&lt;/p&gt;
&lt;p&gt;On either horizontal side, write &lt;span class="arithmatex"&gt;\(z=x\pm im\)&lt;/span&gt; with &lt;span class="arithmatex"&gt;\(-m\leq x\leq m\)&lt;/span&gt;. Since &lt;span class="arithmatex"&gt;\(|z|\geq m\)&lt;/span&gt;, we have&lt;/p&gt;
&lt;div class="arithmatex"&gt;\[
|\tan(\pi z)|\leq\coth(\pi m),
\qquad
|\tan(\pi\theta z)|\leq\coth(\pi\theta m).
\]&lt;/div&gt;
&lt;p&gt;The combined length of the two horizontal sides is &lt;span class="arithmatex"&gt;\(4m\)&lt;/span&gt;. Therefore,&lt;/p&gt;
&lt;div class="arithmatex"&gt;\[
\int_{\text{horizontal sides}}|f(z)|\,|dz|
\leq
\frac{4\pi}{m^2}\coth(\pi m)\coth(\pi\theta m).
\]&lt;/div&gt;
&lt;p&gt;On either vertical side, write &lt;span class="arithmatex"&gt;\(z=\pm m+iy\)&lt;/span&gt; with &lt;span class="arithmatex"&gt;\(-m\leq y\leq m\)&lt;/span&gt;. Because &lt;span class="arithmatex"&gt;\(m\)&lt;/span&gt; is an integer,&lt;/p&gt;
&lt;div class="arithmatex"&gt;\[
|\tan(\pi z)|=|\tan(\pm m\pi+i\pi y)|
=|\tanh(\pi y)|\leq1.
\]&lt;/div&gt;
&lt;p&gt;Set&lt;/p&gt;
&lt;div class="arithmatex"&gt;\[
T_m:=|\tan(\pi m\theta)|.
\]&lt;/div&gt;
&lt;p&gt;The second consequence of the tangent identity gives&lt;/p&gt;
&lt;div class="arithmatex"&gt;\[
|\tan(\pi\theta(\pm m+iy))|
\leq\max\{1,T_m\}.
\]&lt;/div&gt;
&lt;p&gt;Again &lt;span class="arithmatex"&gt;\(|z|\geq m\)&lt;/span&gt;, and the two vertical sides have combined length &lt;span class="arithmatex"&gt;\(4m\)&lt;/span&gt;, so&lt;/p&gt;
&lt;div class="arithmatex"&gt;\[
\int_{\text{vertical sides}}|f(z)|\,|dz|
\leq\frac{4\pi}{m^2}\max\{1,T_m\}.
\]&lt;/div&gt;
&lt;p&gt;Combining the four sides yields the explicit estimate&lt;/p&gt;
&lt;div class="arithmatex"&gt;\[
\begin{aligned}
\left|\int_{C_N} f(z)\,dz\right|
&amp;amp;\leq\int_{C_N}|f(z)|\,|dz|\\
&amp;amp;\leq\frac{4\pi}{m^2}
\left(
\max\{1,T_m\}
+\coth(\pi m)\coth(\pi\theta m)
\right).
\end{aligned}
\]&lt;/div&gt;
&lt;h3&gt;Choosing the contours by equidistribution&lt;/h3&gt;
&lt;p&gt;It remains to keep &lt;span class="arithmatex"&gt;\(T_m\)&lt;/span&gt; away from the poles of the tangent. By &lt;a href="https://integralsandseries.in/2020/02/05/weyls-equidistribution-theorem/"&gt;Weyl's equidistribution theorem&lt;/a&gt;, the fractional parts &lt;span class="arithmatex"&gt;\(\{m\theta\}\)&lt;/span&gt; are equidistributed in &lt;span class="arithmatex"&gt;\([0,1)\)&lt;/span&gt;. In particular,&lt;/p&gt;
&lt;div class="arithmatex"&gt;\[
\lim_{M\to\infty}
\frac{1}{M}
\#\left\{1\leq m\leq M:\{m\theta\}\in
\left[0,\frac14\right]\right\}
=\frac14.
\]&lt;/div&gt;
&lt;p&gt;Thus there are infinitely many integers &lt;span class="arithmatex"&gt;\(m\)&lt;/span&gt; for which &lt;span class="arithmatex"&gt;\(\{m\theta\}\in[0,1/4]\)&lt;/span&gt;. Enumerate them as an increasing sequence &lt;span class="arithmatex"&gt;\(m_1&amp;lt;m_2&amp;lt;\cdots\)&lt;/span&gt;. Since tangent has period &lt;span class="arithmatex"&gt;\(\pi\)&lt;/span&gt;,&lt;/p&gt;
&lt;div class="arithmatex"&gt;\[
T_{m_k}
=|\tan(\pi\{m_k\theta\})|
\leq1.
\]&lt;/div&gt;
&lt;p&gt;Let &lt;span class="arithmatex"&gt;\(N_k=m_k-1\)&lt;/span&gt;. Substituting this bound into the contour estimate gives&lt;/p&gt;
&lt;div class="arithmatex"&gt;\[
\left|\int_{C_{N_k}}f(z)\,dz\right|
\leq\frac{4\pi}{m_k^2}
\left(1+\coth(\pi m_k)\coth(\pi\theta m_k)\right).
\]&lt;/div&gt;
&lt;p&gt;Because &lt;span class="arithmatex"&gt;\(m_k\to\infty\)&lt;/span&gt; and both hyperbolic cotangents tend to &lt;span class="arithmatex"&gt;\(1\)&lt;/span&gt;, the expression on the right is asymptotic to &lt;span class="arithmatex"&gt;\(8\pi/m_k^2\)&lt;/span&gt;. Hence&lt;/p&gt;
&lt;div class="arithmatex"&gt;\[
\lim_{k\to \infty}\int_{C_{N_k}} f(z)\; dz = 0.
\]&lt;/div&gt;
&lt;p&gt;On the other hand, the residue theorem gives&lt;/p&gt;
&lt;div class="arithmatex"&gt;\[
\frac{1}{2\pi i}\int_{C_{N_k}} f(z)\,dz
= \substack{\displaystyle \operatorname{Res} \\ z=0}f(z)
+ \sum_{|i+\frac12|&amp;lt;m_k}
\substack{\displaystyle \operatorname{Res} \\ z=\frac{2i+1}{2}}f(z)
+ \sum_{|j+\frac12|&amp;lt;\theta m_k}
\substack{\displaystyle \operatorname{Res} \\ z=\frac{2j+1}{2\theta}}f(z).
\]&lt;/div&gt;
&lt;p&gt;A simple calculation gives the following residues:&lt;/p&gt;
&lt;div class="arithmatex"&gt;\[
\begin{aligned}
\substack{\displaystyle \text{Res} \\ z=0}f(z) &amp;amp;= \pi^3 \theta \\
\substack{\displaystyle \text{Res} \\ z=\frac{2n+1}{2}}f(z)  &amp;amp;= -8\frac{\tan\left(\frac{\pi \theta}{2}(2n+1) \right)}{(2n+1)^3}, \quad n\in \{0,1,2,\cdots\}\\
\substack{\displaystyle \text{Res} \\ z=\frac{2n+1}{2\theta}}f(z)  &amp;amp;= -8\theta^2 \frac{\tan\left(\frac{\pi}{2\theta}(2n+1) \right)}{(2n+1)^3} , \quad n\in \{0,1,2,\cdots\}
\end{aligned}
\]&lt;/div&gt;
&lt;p&gt;The nonzero poles occur in pairs &lt;span class="arithmatex"&gt;\(z\)&lt;/span&gt; and &lt;span class="arithmatex"&gt;\(-z\)&lt;/span&gt;, and the two residues in each pair are equal. Letting &lt;span class="arithmatex"&gt;\(k\to\infty\)&lt;/span&gt; in the residue identity therefore gives the following relation, provided the two series converge:&lt;/p&gt;
&lt;div class="arithmatex"&gt;\[
\sum_{n=0}^\infty \frac{\tan\left(\frac{\pi \theta}{2}(2n+1) \right)}{(2n+1)^3} + \theta^2 \sum_{n=0}^\infty \frac{\tan\left(\frac{\pi}{2\theta}(2n+1) \right)}{(2n+1)^3} = \frac{\pi^3 \theta}{16}
\]&lt;/div&gt;
&lt;p&gt;Equidistribution was used only to choose contours on which the boundary integral is small; by itself it does not guarantee convergence of the two series. For the value needed here, &lt;span class="arithmatex"&gt;\(\theta=\sqrt2+1\)&lt;/span&gt;, convergence presents no problem. A quadratic irrational is badly approximable, so there is a constant &lt;span class="arithmatex"&gt;\(c&amp;gt;0\)&lt;/span&gt; such that&lt;/p&gt;
&lt;div class="arithmatex"&gt;\[
|q\theta-p|\geq\frac{c}{q}
\]&lt;/div&gt;
&lt;p&gt;for all integers &lt;span class="arithmatex"&gt;\(p\)&lt;/span&gt; and positive integers &lt;span class="arithmatex"&gt;\(q\)&lt;/span&gt;. The same is true of &lt;span class="arithmatex"&gt;\(1/\theta=\sqrt2-1\)&lt;/span&gt;. Consequently, the tangent factors in the two series are &lt;span class="arithmatex"&gt;\(O(2n+1)\)&lt;/span&gt;, even when their arguments approach a pole. After division by &lt;span class="arithmatex"&gt;\((2n+1)^3\)&lt;/span&gt;, the summands are &lt;span class="arithmatex"&gt;\(O((2n+1)^{-2})\)&lt;/span&gt;, and both series converge absolutely.&lt;/p&gt;
&lt;p&gt;Finally, substitute &lt;span class="arithmatex"&gt;\(\theta=\sqrt2+1\)&lt;/span&gt;. Since &lt;span class="arithmatex"&gt;\(2n+1\)&lt;/span&gt; is odd and &lt;span class="arithmatex"&gt;\(1/\theta=\sqrt2-1\)&lt;/span&gt;, periodicity gives&lt;/p&gt;
&lt;div class="arithmatex"&gt;\[
\tan\left(\frac{\pi\theta}{2}(2n+1)\right)
=\tan\left(\frac{\pi}{2\theta}(2n+1)\right)
=-\cot\left(\frac{\pi\sqrt2}{2}(2n+1)\right).
\]&lt;/div&gt;
&lt;p&gt;Moreover,&lt;/p&gt;
&lt;div class="arithmatex"&gt;\[
\frac{\theta}{1+\theta^2}
=\frac{1}{\theta+\theta^{-1}}
=\frac{1}{2\sqrt2}.
\]&lt;/div&gt;
&lt;p&gt;The relation above therefore reduces to&lt;/p&gt;
&lt;div class="arithmatex"&gt;\[
\boxed{\sum_{n=0}^\infty \frac{\cot\left(\frac{2n+1}{2}\pi\sqrt{2} \right)}{(2n+1)^3} = -\frac{\pi^3}{32\sqrt{2}}}
\]&lt;/div&gt;</content><category term="Contour Integration"/><category term="contour-integration"/><category term="residue-theorem"/><category term="infinite-series"/><category term="equidistribution"/></entry><entry><title>An alternating Euler Sum</title><link href="https://integralsandseries.in/2020/07/05/an-alternating-euler-sum/" rel="alternate"/><published>2020-07-05T19:55:22+00:00</published><updated>2026-10-24T00:00:00+05:30</updated><author><name>Shobhit Bhatnagar</name></author><id>tag:integralsandseries.in,2020-07-05:/2020/07/05/an-alternating-euler-sum/</id><summary type="html">&lt;p&gt;An alternating Euler sum leads to harmonic-number generating functions, logarithmic integrals, and polylogarithms.&lt;/p&gt;</summary><content type="html">&lt;p&gt;Our goal is an alternating Euler sum involving harmonic numbers. The route to its evaluation passes through a generating function, logarithmic integrals, and polylogarithmic identities:&lt;/p&gt;
&lt;div class="arithmatex"&gt;\[
\sum_{n=1}^\infty (-1)^{n+1}\frac{H_n}{n^3}
\]&lt;/div&gt;
&lt;p&gt;where &lt;span class="arithmatex"&gt;\(H_n = \sum_{k=1}^n \frac{1}{k}=\int_0^1 \frac{1-t^n}{1-t}dt\)&lt;/span&gt; is the &lt;span class="arithmatex"&gt;\(n\)&lt;/span&gt;-th harmonic number. This series resists contour integration techniques which makes its computation quite challenging. We will start with the following well known generating function identity:&lt;/p&gt;
&lt;div class="arithmatex"&gt;\[
\sum_{n=1}^\infty H_n t^n = -\frac{\log(1-t)}{1-t} ,\quad -1 \leq t &amp;lt; 1
\]&lt;/div&gt;
&lt;p&gt;Dividing the above equation by &lt;span class="arithmatex"&gt;\(t\)&lt;/span&gt; and integrating both sides, gives us:&lt;/p&gt;
&lt;div class="arithmatex"&gt;\[
\begin{aligned}
\sum_{n=1}^\infty H_n \frac{x^n}{n} &amp;amp;= -\int_0^x\frac{\log(1-t)}{t(1-t)}dt \\
&amp;amp;= -\int_0^x \left(\frac{1}{t} + \frac{1}{1-t} \right)\log(1-t) \; dt \\
&amp;amp;= \text{Li}_2(x) + \frac{1}{2}\log^2(1-x) 
\end{aligned}
\]&lt;/div&gt;
&lt;p&gt;where &lt;span class="arithmatex"&gt;\(-1\leq x &amp;lt; 1\)&lt;/span&gt;.&lt;/p&gt;
&lt;h2&gt;1. Computation of &lt;span class="arithmatex"&gt;\(\sum_{n=1}^\infty \frac{H_n}{n^2}x^n\)&lt;/span&gt;&lt;/h2&gt;
&lt;p&gt;Now, we will use the same process to evaluate &lt;span class="arithmatex"&gt;\(\sum_{n=1}^\infty \frac{H_n}{n^2}x^n\)&lt;/span&gt; but we'll have to divide the evaluation into two parts.&lt;/p&gt;
&lt;p&gt;&lt;strong&gt;(I)&lt;/strong&gt; First consider the case when &lt;span class="arithmatex"&gt;\(0 \leq x &amp;lt; 1\)&lt;/span&gt;. We don't need this for evaluating the original series but I'll do it anyway for completeness. We have:&lt;/p&gt;
&lt;div class="arithmatex"&gt;\[
\begin{equation}\label{an-alternating-euler-sum-eq-1}
\begin{aligned}
\sum_{n=1}^\infty \frac{H_n}{n^2} x^n &amp;amp;= \int_0^x\left(\frac{\text{Li}_2(t)}{t} + \frac{1}{2}\frac{\log^2(1-t)}{t}\right)dt \\
&amp;amp;= \text{Li}_3(x) + \frac{1}{2}\int_0^x \frac{\log^2(1-t)}{t} dt \\
&amp;amp;= \text{Li}_3(x) + \frac{1}{2}\int_{\log(1-x)}^0 \frac{t^2 e^t}{1-e^t}dt \quad (t\mapsto 1-e^t) \\
&amp;amp;= \text{Li}_3(x) + \frac{1}{2}\sum_{n=1}^\infty \int_{\log(1-x)}^0 t^2 e^{nt} \; dt \\
&amp;amp;= \text{Li}_3(x) + \frac{1}{2}\sum_{n=1}^\infty \left(\frac{2}{n^3} -\frac{\log^2(1-x)}{n}(1-x)^n+\frac{2\log(1-x)}{n^2}(1-x)^n-2\frac{(1-x)^n}{n^3}\right) \\
&amp;amp;= \text{Li}_3(x) + \frac{\log^2(1-x)\log(x)}{2} + \log(1-x)\text{Li}_2(1-x) - \text{Li}_3(1-x) + \zeta(3) 
\end{aligned}
\end{equation}
\]&lt;/div&gt;
&lt;p&gt;&lt;strong&gt;(II)&lt;/strong&gt; Similarly, for the case &lt;span class="arithmatex"&gt;\(-1\leq x &amp;lt; 0\)&lt;/span&gt;, we obtain:&lt;/p&gt;
&lt;div class="arithmatex"&gt;\[
\begin{equation}\label{an-alternating-euler-sum-eq-2}
\begin{aligned}
\sum_{n=1}^\infty \frac{H_n}{n^2}x^n &amp;amp;= \text{Li}_3(x) -\frac{1}{2}\int_x^0 \frac{\log^2(1-t)}{t}dt \\
&amp;amp;= \text{Li}_3(x) +\frac{1}{2}\int_{0}^{-x} \frac{\log^2(1+t)}{t}dt \quad (t\mapsto -t) \\
&amp;amp;= \text{Li}_3(x) +\frac{1}{2}\int_{0}^{\log(1-x)} \frac{t^2 e^t}{e^t-1}dt \quad (t\mapsto e^t-1) \\
&amp;amp;= \text{Li}_3(x) +\frac{1}{2} \sum_{n=0}^\infty \int_0^{\log(1-x)} t^2 e^{-nt} dt \\
&amp;amp;= \text{Li}_3(x) +\frac{\log^3(1-x)}{6} + \frac{1}{2}\sum_{n=1}^\infty \int_0^{\log(1-x)} t^2 e^{-nt} dt \\
&amp;amp;= \text{Li}_3(x) +\frac{\log^3(1-x)}{6} + \frac{1}{2}\sum_{n=1}^\infty \left(\frac{2}{n^3} -\log^2(1-x)\frac{(1-x)^{-n}}{n}-2\log(1-x)\frac{(1-x)^{-n}}{n^2}-2\frac{(1-x)^{-n}}{n^3}\right) \\
&amp;amp;= \text{Li}_3(x) -\frac{\log^3(1-x)}{3} +\frac{\log^2(1-x)\log(-x)}{2} -\log(1-x)\text{Li}_2\left( \frac{1}{1-x}\right)-\text{Li}_3\left(\frac{1}{1-x}\right)+\zeta(3) \end{aligned}
\end{equation}
\]&lt;/div&gt;
&lt;h2&gt;2. Evaluation of &lt;span class="arithmatex"&gt;\(\sum_{n=1}^\infty \frac{H_n}{n^3}x^n\)&lt;/span&gt;&lt;/h2&gt;
&lt;p&gt;This is the hardest step in the evaluation. Once again, we will divide the evaluation into two parts.&lt;/p&gt;
&lt;p&gt;&lt;strong&gt;(I)&lt;/strong&gt; Similar to section 1, we'll first consider the case when &lt;span class="arithmatex"&gt;\(0\leq x &amp;lt; 1\)&lt;/span&gt;.&lt;/p&gt;
&lt;p&gt;Using integration by parts, we obtain:&lt;/p&gt;
&lt;div class="arithmatex"&gt;\[
\begin{equation}\label{an-alternating-euler-sum-eq-3}
\begin{aligned}
\int_0^x \frac{\zeta(3)-\text{Li}_3(1-t)}{t}dt &amp;amp;= \log(t)\left(\zeta(3)-\text{Li}_3(1-t) \right) \Big|_{0}^x - \int_0^x \frac{\log(t)\text{Li}_2(1-t)}{1-t}dt \\
&amp;amp;= \log(x)\left(\zeta(3)-\text{Li}_3(1-x) \right) - \frac{1}{2}\text{Li}_2^2 (1-x) + \frac{\zeta^2 (2)}{2} 
\end{aligned}
\end{equation}
\]&lt;/div&gt;
&lt;div class="arithmatex"&gt;\[
\begin{equation}\label{an-alternating-euler-sum-eq-4}
\begin{aligned}
\int_0^x \frac{\log(1-t)\text{Li}_2(1-t)}{t}dt &amp;amp;= \log(t)\log(1-t)\text{Li}_2(1-t) \Big|_0^x - \int_0^x \log(t) \left(\frac{-\text{Li}_2(1-t)}{1-t} + \frac{\log(1-t)\log(t)}{1-t}\right)dt \\
&amp;amp;= \log(x)\log(1-x)\text{Li}_2(1-x) + \frac{1}{2}\text{Li}_2^2(1-x)-\frac{\zeta^2(2)}{2} - \int_0^x \frac{\log^2(t) \log(1-t)}{1-t}dt \end{aligned}
\end{equation}
\]&lt;/div&gt;
&lt;div class="arithmatex"&gt;\[
\begin{equation}\label{an-alternating-euler-sum-eq-5}
\begin{aligned}
\int_0^x \frac{\log(t)\log^2(1-t)}{2t}dt &amp;amp;= \frac{1}{4}\log^2(t)\log^2(1-t)\Big|_0^x +\frac{1}{2}\int_0^x \frac{\log^2(t)\log(1-t)}{1-t}dt \\
&amp;amp;= \frac{1}{4}\log^2(x)\log^2(1-x) +\frac{1}{2}\int_0^x \frac{\log^2(t)\log(1-t)}{1-t}dt 
\end{aligned}
\end{equation}
\]&lt;/div&gt;
&lt;p&gt;Putting together the results of equations &lt;span class="arithmatex"&gt;\(\eqref{an-alternating-euler-sum-eq-3}\)&lt;/span&gt;, &lt;span class="arithmatex"&gt;\(\eqref{an-alternating-euler-sum-eq-4}\)&lt;/span&gt; and &lt;span class="arithmatex"&gt;\(\eqref{an-alternating-euler-sum-eq-5}\)&lt;/span&gt; gives us:&lt;/p&gt;
&lt;div class="arithmatex"&gt;\[
\begin{equation}\label{an-alternating-euler-sum-eq-6}
\begin{aligned}
\sum_{n=1}^\infty \frac{H_n}{n^3}x^n &amp;amp;= \text{Li}_4(x) +\frac{1}{4}\log^2(x)\log^2(1-x) + \log(x)\log(1-x)\text{Li}_2(1-x)\\ &amp;amp;\quad + \log(x)\left(\zeta(3)-\text{Li}_3(1-x) \right) -\frac{1}{2}\int_0^x \frac{\log^2(t)\log(1-t)}{1-t}dt 
\end{aligned}
\end{equation}
\]&lt;/div&gt;
&lt;p&gt;&lt;strong&gt;(II)&lt;/strong&gt; Now, let &lt;span class="arithmatex"&gt;\(-1\leq x &amp;lt; 0\)&lt;/span&gt;. We have:&lt;/p&gt;
&lt;div class="arithmatex"&gt;\[
\begin{equation}\label{an-alternating-euler-sum-eq-7}
\begin{aligned}
-\int_x^0 \frac{\zeta(3)-\text{Li}_3\left(\frac{1}{1-t}\right)}{t}dt &amp;amp;= \int_0^{\frac{-x}{1-x}}\frac{\zeta(3)-\text{Li}_3(1-t)}{t(1-t)}dt \quad \left(t\mapsto\frac{-t}{1-t} \right)\\
&amp;amp;= \int_0^{\frac{-x}{1-x}}\frac{\zeta(3)-\text{Li}_3(1-t)}{t}dt + \int_0^{\frac{-x}{1-x}}\frac{\zeta(3)-\text{Li}_3(1-t)}{1-t}dt \\
&amp;amp;= \log\left(\frac{-x}{1-x}\right)\left(\zeta(3) - \text{Li}_3\left(\frac{1}{1-x}\right) \right) - \frac{1}{2}\text{Li}_2^2\left(\frac{1}{1-x}\right) + \frac{\zeta^2(2)}{2} \\
&amp;amp;\quad + \zeta(3)\log(1-x) + \text{Li}_4\left(\frac{1}{1-x} \right) - \zeta(4) 
\end{aligned}
\end{equation}
\]&lt;/div&gt;
&lt;p&gt;Here, we used equation &lt;span class="arithmatex"&gt;\(\eqref{an-alternating-euler-sum-eq-3}\)&lt;/span&gt; to simplify the integral after the transformation. Similarly, we obtain:&lt;/p&gt;
&lt;div class="arithmatex"&gt;\[
\begin{equation}\label{an-alternating-euler-sum-eq-8}
\begin{aligned}
\int_x^0 \frac{\log(1-t)\text{Li}_2\left(\frac{1}{1-t}\right)}{t}dt &amp;amp;= \int_0^{\frac{-x}{1-x}}\frac{\log(1-t)\text{Li}_2(1-t)}{t(1-t)}dt \\
&amp;amp;= \int_0^{\frac{-x}{1-x}}\frac{\log(1-t)\text{Li}_2(1-t)}{t}dt + \int_0^{\frac{-x}{1-x}}\frac{\log(1-t)\text{Li}_2(1-t)}{1-t}dt \\
&amp;amp;= -\log\left(\frac{-x}{1-x} \right)\log(1-x)\text{Li}_2\left(\frac{1}{1-x}\right)+\frac{1}{2}\text{Li}_2^2\left(\frac{1}{1-x}\right)-\frac{\zeta^2(2)}{2} \\
&amp;amp;\quad +\text{Li}_4\left(\frac{1}{1-x}\right)+\log(1-x)\text{Li}_3\left(\frac{1}{1-x}\right) -\zeta(4) \\
&amp;amp;\quad -\int_0^{\frac{-x}{1-x}}\frac{\log^2(t)\log(1-t)}{1-t}dt
\end{aligned}
\end{equation}
\]&lt;/div&gt;
&lt;div class="arithmatex"&gt;\[
\begin{equation}\label{an-alternating-euler-sum-eq-9}
\begin{aligned}
\int_x^0 \left( \frac{\log^3(1-t)}{3t} - \frac{\log^2(1-t)\log(-t)}{2t}\right) dt &amp;amp;= \frac{1}{6}\log^3(1-x)\log\left(\frac{-x}{1-x}\right) + \frac{1}{24}\log^4(1-x) \\
&amp;amp;\quad +\frac{1}{4}\log^2\left(\frac{-x}{1-x}\right)\log^2(1-x) + \frac{1}{2}\int_0^{\frac{-x}{1-x}}\frac{\log^2(t)\log(1-t)}{1-t}dt \end{aligned}
\end{equation}
\]&lt;/div&gt;
&lt;p&gt;Finally, putting these results together gives:&lt;/p&gt;
&lt;div class="arithmatex"&gt;\[
\begin{equation}\label{an-alternating-euler-sum-eq-10}
\begin{aligned}
\sum_{n=1}^\infty \frac{H_n}{n^3}x^n &amp;amp;= \text{Li}_4(x) + 2\text{Li}_4\left( \frac{1}{1-x}\right) + \log\left(\frac{-x}{1-x} \right)\left(-\text{Li}_3\left(\frac{1}{1-x}\right) +\frac{\log^3(1-x)}{6}-\log(1-x)\text{Li}_2\left(\frac{1}{1-x} \right)\right) \\
&amp;amp;\quad + \log(1-x)\text{Li}_3\left(\frac{1}{1-x}\right) + \frac{\log^4(1-x)}{24} +\frac{1}{4}\log^2 \left(\frac{-x}{1-x}\right)\log^2(1-x) +\zeta(3) \log(-x)- 2\zeta(4) \\
&amp;amp;\quad -\frac{1}{2}\int_0^{\frac{-x}{1-x}}\frac{\log^2(t)\log(1-t)}{1-t}dt 
\end{aligned}
\end{equation}
\]&lt;/div&gt;
&lt;p&gt;The integral &lt;span class="arithmatex"&gt;\(\int \frac{\log^2(t)\log(1-t)}{1-t}dt\)&lt;/span&gt; can be evaluated in terms of Polylogarithms (refer to section 7.6 of "Polylogarithms and Associated Functions" by Leonard Lewin). Luckily for us, there is a much simpler was to evaluate this integral between the limits &lt;span class="arithmatex"&gt;\(0\)&lt;/span&gt; and &lt;span class="arithmatex"&gt;\(\frac{1}{2}\)&lt;/span&gt;.&lt;/p&gt;
&lt;h2&gt;3. Evaluation of &lt;span class="arithmatex"&gt;\(\int_0^{\frac{1}{2}}\frac{\log^2(t)\log(1-t)}{1-t}dt\)&lt;/span&gt;&lt;/h2&gt;
&lt;p&gt;Let &lt;span class="arithmatex"&gt;\(I=\int_0^{1}\frac{\log^2(t)\log(1-t)}{1-t}dt\)&lt;/span&gt; and &lt;span class="arithmatex"&gt;\(J=\int_0^{\frac{1}{2}}\frac{\log^2(t)\log(1-t)}{1-t}dt\)&lt;/span&gt;. The integral, &lt;span class="arithmatex"&gt;\(I\)&lt;/span&gt;, can be evaluated by the differentiation under the integral technique.&lt;/p&gt;
&lt;div class="arithmatex"&gt;\[
\begin{aligned}
I &amp;amp;= \lim_{y\to 0^+}\lim_{x\to 1}\frac{\partial^2 }{\partial x^2} \frac{\partial }{\partial y} \int_0^1 t^{x-1} (1-t)^{y-1} dt \\
&amp;amp;= \lim_{y\to 0^+}\lim_{x\to 1}\frac{\partial^2 }{\partial x^2} \frac{\partial }{\partial y} \left\{\frac{\Gamma(x)\Gamma(y)}{\Gamma(x+y)} \right\}
\end{aligned}
\]&lt;/div&gt;
&lt;p&gt;It takes a bit of effort to compute the derivatives in terms of Polygamma functions so I won't write the details here. One can easily verify that the end result is:&lt;/p&gt;
&lt;div class="arithmatex"&gt;\[
I = -\frac{\pi^4}{180}
\]&lt;/div&gt;
&lt;p&gt;Next, apply integration by parts to the integral &lt;span class="arithmatex"&gt;\(J\)&lt;/span&gt;:&lt;/p&gt;
&lt;div class="arithmatex"&gt;\[
\begin{aligned}
J &amp;amp;= \int_0^{\frac{1}{2}}\frac{\log^2(t)\log(1-t)}{1-t}dt \\
&amp;amp;= -\frac{\log^2(t)\log^2(1-t)}{2}\Big|_0^{\frac{1}{2}} + \int_0^{\frac{1}{2}} \frac{\log(t)\log^2(1-t)}{t}dt \\
&amp;amp;= -\frac{\log^4(2)}{2} + \int_{\frac{1}{2}}^1 \frac{\log^2(t)\log(1-t)}{1-t}dt \quad (t\mapsto 1-t)\\
&amp;amp;= -\frac{\log^4(4)}{2} + I-J
\end{aligned}
\]&lt;/div&gt;
&lt;p&gt;Now, one can solve the above equation for &lt;span class="arithmatex"&gt;\(J\)&lt;/span&gt; to get:&lt;/p&gt;
&lt;div class="arithmatex"&gt;\[
\begin{aligned}
J &amp;amp;= -\frac{\log^4(2)}{4}+\frac{I}{2} \\
&amp;amp;= -\frac{\log^4(2)}{4}-\frac{\pi^4}{360}
\end{aligned}
\]&lt;/div&gt;
&lt;p&gt;Finally, we have everything needed to evaluate the original series. Plugging in &lt;span class="arithmatex"&gt;\(x=-1\)&lt;/span&gt; in equation &lt;span class="arithmatex"&gt;\(\eqref{an-alternating-euler-sum-eq-10}\)&lt;/span&gt; and performing some simplifications gives us the beautiful result:&lt;/p&gt;
&lt;div class="arithmatex"&gt;\[
\boxed{\sum_{n=1}^\infty \frac{H_n}{n^3}(-1)^{n+1} = \frac{11\pi^4}{360}+\frac{\pi^2}{12}\log^2(2)-\frac{\log^4(2)}{12}-\frac{7}{4}\log(2)\zeta(3) -2\text{Li}_4\left(\frac{1}{2}\right)}
\]&lt;/div&gt;
&lt;p&gt;A similar result is obtained by plugging &lt;span class="arithmatex"&gt;\(x=\frac{1}{2}\)&lt;/span&gt; into equation &lt;span class="arithmatex"&gt;\(\eqref{an-alternating-euler-sum-eq-6}\)&lt;/span&gt;:&lt;/p&gt;
&lt;div class="arithmatex"&gt;\[
\boxed{\sum_{n=1}^\infty \frac{H_n}{n^3 2^n}= \frac{\pi^4}{720}+\frac{\log^4(2)}{24}-\frac{1}{8}\log(2)\zeta(3) +\text{Li}_4\left(\frac{1}{2}\right)}
\]&lt;/div&gt;
&lt;h2&gt;4. Further Results&lt;/h2&gt;
&lt;p&gt;Let &lt;span class="arithmatex"&gt;\(H_n^{(2)} = \zeta(2) - \psi_1(n+1) = \sum_{k=1}^n \frac{1}{k^2}\)&lt;/span&gt;. Then, it is easy to verify that:&lt;/p&gt;
&lt;div class="arithmatex"&gt;\[
\sum_{n=1}^\infty t^n H_n^{(2)} = \frac{\text{Li}_2(t)}{1-t}, \quad -1\leq t &amp;lt; 1
\]&lt;/div&gt;
&lt;p&gt;Now, dividing the above equation by &lt;span class="arithmatex"&gt;\(t\)&lt;/span&gt; and integrating both sides, gives us:&lt;/p&gt;
&lt;div class="arithmatex"&gt;\[
\begin{aligned}
\sum_{n=1}^\infty \frac{H_n^{(2)}}{n}x^n &amp;amp;= \int_0^x \text{Li}_2(t)\left( \frac{1}{t}+\frac{1}{1-t}\right) \\
&amp;amp;= \text{Li}_3(x) + \int_0^x \frac{\text{Li}_2(t)}{1-t} dt \\
&amp;amp;= \text{Li}_3(x) -\log(1-x)\text{Li}_2(x) - \int_0^x \frac{\log^2(1-t)}{t}dt \end{aligned}
\]&lt;/div&gt;
&lt;p&gt;From our previous calculation, we know that&lt;/p&gt;
&lt;div class="arithmatex"&gt;\[
\int_0^x \frac{\log^2(1-t)}{t}dt = 2\sum_{n=1}^\infty \frac{H_n}{n^2}x^n -2\text{Li}_3(x)
\]&lt;/div&gt;
&lt;p&gt;Hence, we obtain the following relation:&lt;/p&gt;
&lt;div class="arithmatex"&gt;\[
\begin{equation}\label{an-alternating-euler-sum-eq-11}
\sum_{n=1}^\infty \frac{H_n^{(2)}}{n}x^n =3\text{Li}_3(x)-\log(1-x)\text{Li}_2(x) - 2\sum_{n=1}^\infty \frac{H_n}{n^2}x^n
\end{equation}
\]&lt;/div&gt;
&lt;p&gt;Once again, divide the above equation by &lt;span class="arithmatex"&gt;\(x\)&lt;/span&gt; and integrate both sides to get:&lt;/p&gt;
&lt;div class="arithmatex"&gt;\[
\begin{equation}\label{an-alternating-euler-sum-eq-12}
\sum_{n=1}^\infty \frac{H_n^{(2)}}{n^2}x^n = 3\text{Li}_4(x) + \frac{1}{2}\text{Li}_2^2(x) - 2\sum_{n=1}^\infty \frac{H_n}{n^3}x^n
\end{equation}
\]&lt;/div&gt;
&lt;p&gt;Equations &lt;span class="arithmatex"&gt;\(\eqref{an-alternating-euler-sum-eq-11}\)&lt;/span&gt; and &lt;span class="arithmatex"&gt;\(\eqref{an-alternating-euler-sum-eq-12}\)&lt;/span&gt; are valid for &lt;span class="arithmatex"&gt;\(-1\leq x &amp;lt; 1\)&lt;/span&gt;. Plugging in &lt;span class="arithmatex"&gt;\(x=\frac{1}{2}\)&lt;/span&gt; in equation &lt;span class="arithmatex"&gt;\(\eqref{an-alternating-euler-sum-eq-12}\)&lt;/span&gt; and using the known closed form for &lt;span class="arithmatex"&gt;\(\sum_{n=1}^\infty \frac{H_n}{n^3 2^n}\)&lt;/span&gt; gives us:&lt;/p&gt;
&lt;div class="arithmatex"&gt;\[
\boxed{ \sum_{n=1}^\infty \frac{H_n^{(2)}}{n^2 2^n} = \frac{\pi^4}{1440}-\frac{\pi^2}{24}\log^2(2) + \frac{\log^4(2)}{24}+ \frac{1}{4}\log(2)\zeta(3) + \text{Li}_4\left(\frac{1}{2}\right) }
\]&lt;/div&gt;</content><category term="Euler Sums and Infinite Series"/><category term="euler-sums"/><category term="polylogarithm"/><category term="logarithmic-integrals"/><category term="infinite-series"/></entry><entry><title>Ramanujan's Master Theorem: Part I</title><link href="https://integralsandseries.in/2020/07/02/ramanujans-master-theorem-part-i/" rel="alternate"/><published>2020-07-02T12:38:30+00:00</published><updated>2026-10-24T00:00:00+05:30</updated><author><name>Shobhit Bhatnagar</name></author><id>tag:integralsandseries.in,2020-07-02:/2020/07/02/ramanujans-master-theorem-part-i/</id><summary type="html">&lt;p&gt;Use Ramanujan's master theorem to connect power-series coefficients with Mellin transforms of Bessel functions.&lt;/p&gt;</summary><content type="html">&lt;p&gt;Ramanujan's master theorem (RMT) connects the coefficients of a power series with a Mellin transform. We will use this connection to evaluate integrals involving one Bessel function and a product of two Bessel functions.&lt;/p&gt;
&lt;h2&gt;The master-theorem principle&lt;/h2&gt;
&lt;p&gt;Suppose that &lt;span class="arithmatex"&gt;\(f(z)\)&lt;/span&gt; has the expansion&lt;/p&gt;
&lt;div class="arithmatex"&gt;\[
f(z) = \sum_{n=0}^\infty \frac{\varphi(n)}{n!}(-z)^n
\]&lt;/div&gt;
&lt;p&gt;Under suitable analytic continuation and growth hypotheses on the coefficient function &lt;span class="arithmatex"&gt;\(\varphi\)&lt;/span&gt;, the master theorem gives, in a strip where the integral converges,&lt;/p&gt;
&lt;div class="arithmatex"&gt;\[
\int_0^\infty x^{s-1} f(x)\; dx = \Gamma(s) \varphi(-s)
\]&lt;/div&gt;
&lt;p&gt;The hypotheses matter: the values &lt;span class="arithmatex"&gt;\(\varphi(n)\)&lt;/span&gt; at nonnegative integers alone do not determine &lt;span class="arithmatex"&gt;\(\varphi(-s)\)&lt;/span&gt;, and a local power series does not justify integrating term by term over the entire positive axis. Here we use the principle to derive the Bessel identities; for a discussion of its hypotheses, see &lt;a href="https://www.math.tulane.edu/~vhm/papers_html/ram-feynman.pdf"&gt;González, Moll, and Schmidt&lt;/a&gt;.&lt;/p&gt;
&lt;h2&gt;A single Bessel function&lt;/h2&gt;
&lt;p&gt;One application is the following Mellin transform:&lt;/p&gt;
&lt;div class="arithmatex"&gt;\[
\begin{equation}\label{ramanujans-master-theorem-part-i-eq-1}
\int_0^\infty x^{\sigma-1} J_\nu (x) \; dx = \frac{2^{\sigma-1}\Gamma\left(\frac{\sigma+\nu}{2}\right)}{\Gamma\left(\frac{2-\sigma+\nu}{2} \right)} \; ,\quad  -\nu &amp;lt; \sigma &amp;lt; \frac{3}{2}
\end{equation}
\]&lt;/div&gt;
&lt;p&gt;where &lt;span class="arithmatex"&gt;\(J_\nu (x)\)&lt;/span&gt; is the Bessel function of the first kind.&lt;/p&gt;
&lt;p&gt;Indeed, &lt;span class="arithmatex"&gt;\(J_\nu(x)\)&lt;/span&gt; has the following series expansion around &lt;span class="arithmatex"&gt;\(x=0\)&lt;/span&gt;:&lt;/p&gt;
&lt;div class="arithmatex"&gt;\[
J_\nu(x) =\sum_{n=0}^\infty \frac{(-1)^n }{n! \Gamma(n+\nu+1)}\left(\frac{x}{2} \right)^{\nu+2n}
\]&lt;/div&gt;
&lt;p&gt;Hence, we may apply the RMT to the function &lt;span class="arithmatex"&gt;\(x^{-\nu/2}J_\nu(2\sqrt{x})\)&lt;/span&gt; to obtain:&lt;/p&gt;
&lt;div class="arithmatex"&gt;\[
\int_0^\infty x^{s-\nu/2-1} J_\nu(2\sqrt{x}) dx=\frac{\Gamma(s)}{\Gamma(\nu+1-s)}
\]&lt;/div&gt;
&lt;p&gt;Now, one can perform the substitutions &lt;span class="arithmatex"&gt;\(x=t^2/4\)&lt;/span&gt; and &lt;span class="arithmatex"&gt;\(s=\frac{\sigma+\nu}{2}\)&lt;/span&gt; to transform the above integral into the integral of equation &lt;span class="arithmatex"&gt;\(\eqref{ramanujans-master-theorem-part-i-eq-1}\)&lt;/span&gt;.&lt;/p&gt;
&lt;p&gt;It turns out that a similar approach also works for the product &lt;span class="arithmatex"&gt;\(J_\nu (x) J_\mu(x)\)&lt;/span&gt;. First, we need to compute its series expansion. This can be done by multiplying the individual series expansions and rearranging/grouping certain terms.&lt;/p&gt;
&lt;div class="arithmatex"&gt;\[
\begin{equation}\label{ramanujans-master-theorem-part-i-eq-2}
\begin{aligned}
J_{\nu}(x)J_{\mu}(x) &amp;amp;= \left(\sum_{n=0}^\infty \frac{(-1)^n }{n! \Gamma(n+\nu+1)}\left(\frac{x}{2} \right)^{\nu+2n}\right) \left(\sum_{m=0}^\infty \frac{(-1)^m }{m! \Gamma(m+\nu+1)}\left(\frac{x}{2} \right)^{\nu+2m} \right) \\
&amp;amp;= \sum_{n=0}^\infty \sum_{m=0}^\infty \frac{(-1)^{n+m} x^{\nu+\mu+2(m+n)}}{2^{\nu+\mu+2(m+n)}} \cdot \frac{1}{m! n!\Gamma(n+\nu+1)\Gamma(m+\mu+1)} \\
&amp;amp;= \sum_{r=0}^\infty \frac{(-1)^{r} x^{\nu+\mu+2r}}{2^{\nu+\mu+2r}}\sum\limits_{\substack{0\leq m,n \leq r \\ m+n=r}}\frac{1}{m! n!\Gamma(n+\nu+1)\Gamma(m+\mu+1)} \\
&amp;amp;= \sum_{r=0}^\infty \frac{(-1)^{r} x^{\nu+\mu+2r}}{2^{\nu+\mu+2r} r! \Gamma(r+\nu+1)\Gamma(r+\mu+1)}\sum\limits_{\substack{0\leq m,n \leq r \\ m+n=r}}\binom{r}{m,n} \left(\prod_{i=m+1}^r  (\nu+i)\right) \left(\prod_{j=n+1}^r (\mu+j)\right) \\
&amp;amp;= \sum_{r=0}^\infty \frac{(-1)^{r} x^{\nu+\mu+2r}}{2^{\nu+\mu+2r} r! \Gamma(r+\nu+1)\Gamma(r+\mu+1)}\sum _{n=0}^r\binom{r}{n}(\nu +r)^{\underline{n}}(\mu +r)^{\underline{r-n}} \\
&amp;amp;= \sum_{r=0}^\infty \frac{(-1)^{r} x^{\nu+\mu+2r}}{2^{\nu+\mu+2r} r! \Gamma(r+\nu+1)\Gamma(r+\mu+1)} (\nu +\mu+2r)^{\underline{r}} \\
&amp;amp;= \sum_{r=0}^\infty \frac{(-1)^{r} \Gamma(\nu+\mu+2r+1)}{ r! \Gamma(r+\nu+1)\Gamma(r+\mu+1)\Gamma(\mu+\nu+r+1)} \left( \frac{x}{2}\right)^{\nu+\mu+2r} \quad \; 
\end{aligned}
\end{equation}
\]&lt;/div&gt;
&lt;p&gt;To simplify the inner summation, we used the binomial theorem for falling factorials.&lt;/p&gt;
&lt;p&gt;Therefore, applying RMT to the function &lt;span class="arithmatex"&gt;\(x^{-\frac{\nu+\mu}{2}}J_{\nu}(2\sqrt{x})J_{\mu}(2\sqrt{x})\)&lt;/span&gt;, gives us:&lt;/p&gt;
&lt;div class="arithmatex"&gt;\[
\int_0^\infty x^{s-\frac{\nu+\mu}{2}-1} J_{\nu}(2\sqrt{x})J_{\mu}(2\sqrt{x}) \; dx = \frac{\Gamma(s)\Gamma(\nu+\mu+1-2s)}{\Gamma(\nu+1-s)\Gamma(\mu+1-s)\Gamma(\nu+\mu+1-s)}
\]&lt;/div&gt;
&lt;p&gt;Finally, make the substitutions &lt;span class="arithmatex"&gt;\(x=t^2/4\)&lt;/span&gt; and &lt;span class="arithmatex"&gt;\(s=\frac{\sigma+\nu+\mu}{2}\)&lt;/span&gt; in the above integral to get:&lt;/p&gt;
&lt;div class="arithmatex"&gt;\[
\begin{equation}\label{ramanujans-master-theorem-part-i-eq-3}
\boxed{ \int_0^\infty x^{\sigma-1}J_\nu(x)J_\mu(x)\; dx = \frac{2^{\sigma-1} \Gamma\left(\frac{\nu+\mu+\sigma}{2} \right)\Gamma\left(1-\sigma\right)}{\Gamma\left(\frac{\nu-\mu-\sigma}{2} +1\right)\Gamma\left(\frac{\mu-\nu-\sigma}{2} +1\right)\Gamma\left(\frac{\nu+\mu-\sigma}{2} + 1\right)} } \quad \;
\end{equation}
\]&lt;/div&gt;
&lt;p&gt;The above equation holds provided that the condition &lt;span class="arithmatex"&gt;\(-(\nu+\mu)&amp;lt; \sigma &amp;lt; 1\)&lt;/span&gt; is satisfied.&lt;/p&gt;</content><category term="Beta and Gamma Functions"/><category term="gamma-function"/><category term="mellin-transform"/><category term="bessel-functions"/><category term="infinite-series"/></entry><entry><title>Fourier Series of the Log-Gamma Function and Vardi's Integral</title><link href="https://integralsandseries.in/2020/06/01/fourier-series-of-the-log-gamma-function-and-vardis-integral/" rel="alternate"/><published>2020-06-01T12:11:38+00:00</published><updated>2026-10-24T00:00:00+05:30</updated><author><name>Shobhit Bhatnagar</name></author><id>tag:integralsandseries.in,2020-06-01:/2020/06/01/fourier-series-of-the-log-gamma-function-and-vardis-integral/</id><summary type="html">&lt;p&gt;Derive Kummer's Fourier series for the logarithm of the gamma function, then use it to evaluate Vardi's integral.&lt;/p&gt;</summary><content type="html">&lt;p&gt;Kummer's Fourier series for &lt;span class="arithmatex"&gt;\(\log\Gamma\)&lt;/span&gt; provides a useful bridge between special functions and logarithmic integrals. We will derive the series and then evaluate it at a suitable point to obtain Vardi's integral:&lt;/p&gt;
&lt;div class="arithmatex"&gt;\[
\int_0^1 \frac{\log\log \left(\frac{1}{x}\right)}{1+x^2}dx = \frac{\pi}{2}\log\left(\sqrt{2\pi}\frac{\Gamma\left(\frac{3}{4}\right)}{\Gamma\left(\frac{1}{4}\right)} \right)
\]&lt;/div&gt;
&lt;h2&gt;Fourier Series of the Log-Gamma Function:&lt;/h2&gt;
&lt;p&gt;For &lt;span class="arithmatex"&gt;\(s\in (0,1)\)&lt;/span&gt;, we have&lt;/p&gt;
&lt;div class="arithmatex"&gt;\[
\begin{equation}\label{fourier-series-of-the-log-gamma-function-and-vardis-integral-eq-1}
\log \Gamma(s) = \left(\frac{1}{2}-s \right)(\gamma + \log 2)-\frac{1}{2}\log(\sin (\pi s)) + (1-s) \log(\pi) + \frac{1}{\pi}\sum_{n=1}^\infty \frac{\sin(2\pi n s)\log n}{n}
\end{equation}
\]&lt;/div&gt;
&lt;p&gt;&lt;strong&gt;Proof:&lt;/strong&gt;  It suffices to do the following integrals:&lt;/p&gt;
&lt;div class="arithmatex"&gt;\[
\begin{aligned}
\int_0^1 \log \Gamma (s) \; ds &amp;amp;= \frac{1}{2}\log(2\pi) \\
\int_0^1 \log \Gamma(s) \cos(2\pi n s)\; ds &amp;amp;= \frac{1}{4n} \quad \forall n\in \mathbb{Z}^+ \\
\int_0^1 \log \Gamma(s) \sin(2\pi n s)\; ds &amp;amp;= \frac{\gamma + \log(2n\pi )}{2n\pi}\quad \forall n\in \mathbb{Z}^+
\end{aligned}
\]&lt;/div&gt;
&lt;p&gt;The first integral can be evaluated with the help of Euler's reflection formula:&lt;/p&gt;
&lt;div class="arithmatex"&gt;\[
\begin{aligned}
\int_0^1 \log \Gamma(s) \; ds &amp;amp;= \frac{1}{2} \int_0^1 \log \Gamma(s) \; ds + \frac{1}{2}\int_0^1 \log \Gamma(1-s) \; ds \\
&amp;amp;= \frac{1}{2}\int_0^1 \log\left(\frac{\pi}{\sin(\pi s)} \right)\; ds \\
&amp;amp;= \frac{\log (\pi)}{2} - \frac{1}{2}\int_0^1 \log(\sin(\pi s))\; ds \\
&amp;amp;= \frac{\log(2\pi)}{2}
\end{aligned}
\]&lt;/div&gt;
&lt;p&gt;The second integral can also be dealt in a similar way. We have:&lt;/p&gt;
&lt;div class="arithmatex"&gt;\[
\begin{aligned}
\int_0^1 \log \Gamma(s) \cos(2\pi n s)\; ds &amp;amp;= \frac{1}{2}\int_0^1 \log \Gamma(s) \cos(2\pi n s)\; ds + \frac{1}{2}\int_0^1 \log \Gamma(1-s) \cos(2\pi n (1-s))\; ds \\
&amp;amp;= \frac{1}{2}\int_0^1 \log\left(\frac{\pi}{\sin(\pi s)} \right)\cos(2\pi n s)\; ds \\
&amp;amp;= -\frac{1}{2}\int_0^1 \log(2\sin(\pi s))\cos(2\pi n s)\; ds \\
&amp;amp;= \frac{1}{2}\int_0^1 \left(\sum_{k=1}^\infty \frac{\cos(2\pi k s)}{k} \right)\cos(2\pi n s)\; ds \\
&amp;amp;= \frac{1}{2}\sum_{k=1}^\infty \frac{1}{k}\int_0^1 \cos(2\pi k s)\cos(2\pi n s)\; ds \\
&amp;amp;= \frac{1}{4n}
\end{aligned}
\]&lt;/div&gt;
&lt;p&gt;In the above calculation, we used the well known Fourier series:&lt;/p&gt;
&lt;div class="arithmatex"&gt;\[
\begin{equation}\label{fourier-series-of-the-log-gamma-function-and-vardis-integral-eq-2}
\log(2\sin (\pi s)) = -\sum_{k=1}^\infty \frac{\cos(2\pi k s)}{k} \quad \forall s\in (0,1) \quad
\end{equation}
\]&lt;/div&gt;
&lt;p&gt;The third integral is the most troublesome of all since the trick involving Euler's reflection formula does not work. We will instead use the following integral representation of the Log-Gamma function:&lt;/p&gt;
&lt;div class="arithmatex"&gt;\[
\log \Gamma(s) = \int_0^\infty \left(\frac{s-1}{t e^t} -\frac{1-e^{t(1-s)}}{t(e^t-1)}\right) dt \quad \forall s&amp;gt;0
\]&lt;/div&gt;
&lt;p&gt;One can easily verify the above equation via the differentiation under the integral technique. Therefore, upon changing the order of integration we get:&lt;/p&gt;
&lt;div class="arithmatex"&gt;\[
\begin{aligned}
\int_0^1 \log \Gamma(s) \sin(2\pi n s)\; ds &amp;amp;= \int_0^\infty \left(\frac{1}{t e^t}\int_0^1 s\sin(2\pi ns)\; ds +\frac{1}{t(e^t-1)}\int_0^1e^{t(1-s)}\sin(2\pi n s)\; ds  \right)dt \\
&amp;amp;= \int_0^\infty \left[\frac{1}{t e^t}\left(-\frac{1}{2\pi n}\right) +\frac{1}{t(e^t-1)}\left(\frac{2\pi n (e^t-1)}{t^2 + (2\pi n)^2} \right)  \right]dt \\
&amp;amp;= \int_0^\infty \left(-\frac{1}{2\pi n t e^t} + \frac{2\pi n}{t\left( t^2 + (2\pi n)^2 \right)} \right)dt \\
&amp;amp;= \frac{1}{2\pi n}\int_0^\infty\left(-\frac{1}{te^t} +\frac{1}{t}-\frac{t}{t^2 + (2\pi n)^2} \right) dt \\
&amp;amp;= \frac{1}{2\pi n}\left(\gamma + \left[ \log t - \log (t) e^{-t} - \frac{1}{2}\log\left( t^2 + (2\pi n)^2 \right)\right]_{t=0}^\infty  \right) \\
&amp;amp;= \frac{\gamma + \log(2\pi n)}{2\pi n}
\end{aligned}
\]&lt;/div&gt;
&lt;p&gt;To get equation &lt;span class="arithmatex"&gt;\(\eqref{fourier-series-of-the-log-gamma-function-and-vardis-integral-eq-1}\)&lt;/span&gt;, one needs to piece together all these calculations. Equation &lt;span class="arithmatex"&gt;\(\eqref{fourier-series-of-the-log-gamma-function-and-vardis-integral-eq-2}\)&lt;/span&gt; along with the result:&lt;/p&gt;
&lt;div class="arithmatex"&gt;\[
\pi \left(\frac{1}{2}- s\right) = \sum_{k=1}^\infty \frac{\sin(2\pi k s)}{k} \quad \forall s\in (0,1)
\]&lt;/div&gt;
&lt;p&gt;are needed to perform simplifications.&lt;/p&gt;
&lt;p&gt;Now, we turn our attention to the Vardi's integral:&lt;/p&gt;
&lt;div class="arithmatex"&gt;\[
\begin{equation}\label{fourier-series-of-the-log-gamma-function-and-vardis-integral-eq-3}
\begin{aligned}
I &amp;amp;= \int_0^1 \frac{\log\log \left(\frac{1}{x}\right)}{1+x^2}dx \\ &amp;amp;= \int_0^\infty \frac{\log(t) e^{-t}}{1 + e^{-2t}}dt \\
&amp;amp;= \int_0^\infty \log(t)\sum_{n=0}^\infty (-1)^n e^{-(2n+1)t} \; dt\\
&amp;amp;= \sum_{n=0}^\infty (-1)^n \int_0^\infty \log (t) e^{-(2n+1)t}\; dt \\
&amp;amp;= -\sum_{n=0}^\infty (-1)^n \left(\frac{\log(2n+1)}{2n+1}+\frac{\gamma}{2n+1} \right) \\
&amp;amp;=  -\frac{\gamma \pi}{4}-\sum_{n=1}^\infty \frac{\sin\left(\frac{\pi n}{2}\right)\log n}{n} 
\end{aligned}
\end{equation}
\]&lt;/div&gt;
&lt;p&gt;To get the value of the sum, plug &lt;span class="arithmatex"&gt;\(s=\frac{1}{4}\)&lt;/span&gt; in equation &lt;span class="arithmatex"&gt;\(\eqref{fourier-series-of-the-log-gamma-function-and-vardis-integral-eq-1}\)&lt;/span&gt;.&lt;/p&gt;
&lt;div class="arithmatex"&gt;\[
\sum_{n=1}^\infty \frac{\sin\left(\frac{\pi n}{2}\right)\log n}{n} = \pi \log \Gamma\left(\frac{1}{4}\right) - \frac{\gamma \pi}{4} - \frac{\pi \log 2}{2}- \frac{3\pi}{4}\log(\pi)
\]&lt;/div&gt;
&lt;p&gt;Substituting the above into equation &lt;span class="arithmatex"&gt;\(\eqref{fourier-series-of-the-log-gamma-function-and-vardis-integral-eq-3}\)&lt;/span&gt; and performing some simplifications gives the desired result.&lt;/p&gt;</content><category term="Logarithmic Integrals"/><category term="logarithmic-integrals"/><category term="gamma-function"/><category term="fourier-series"/><category term="definite-integrals"/></entry><entry><title>Bernoulli numbers and a related integral</title><link href="https://integralsandseries.in/2020/04/19/bernoulli-numbers-and-a-related-integral/" rel="alternate"/><published>2020-04-19T10:32:48+00:00</published><updated>2026-10-24T00:00:00+05:30</updated><author><name>Shobhit Bhatnagar</name></author><id>tag:integralsandseries.in,2020-04-19:/2020/04/19/bernoulli-numbers-and-a-related-integral/</id><summary type="html">&lt;p&gt;From the defining recursion for Bernoulli polynomials to their Fourier expansions and an associated integral.&lt;/p&gt;</summary><content type="html">&lt;p&gt;Bernoulli polynomials link a simple differential recursion to Fourier series and definite integrals. We begin with their defining conditions, derive the identities we need, and then apply them to an integral.&lt;/p&gt;
&lt;h2&gt;Bernoulli polynomials&lt;/h2&gt;
&lt;p&gt;Define the sequence &lt;span class="arithmatex"&gt;\(\{B_r(x)\}_{r=0}^{\infty}\)&lt;/span&gt; by&lt;/p&gt;
&lt;div class="arithmatex"&gt;\[
\begin{aligned}
B_0(x) &amp;amp;= 1 \\
B_r^\prime(x) &amp;amp;= r B_{r-1}(x) \quad \forall r\geq 1 \\
\int_0^1 B_r(x) dx &amp;amp;= 0 \quad \forall r\geq 1
\end{aligned}
\]&lt;/div&gt;
&lt;p&gt;The first few Bernoulli Polynomials are:&lt;/p&gt;
&lt;div class="arithmatex"&gt;\[
\begin{aligned}
B_0(x) &amp;amp; =1 \\
B_1(x) &amp;amp; =x-\frac{1}{2} \\
B_2(x) &amp;amp; =x^2-x+\frac{1}{6} \\
B_3(x) &amp;amp; =x^3-\frac{3}{2}x^2+\frac{1}{2}x \\
B_4(x) &amp;amp; =x^4-2x^3+x^2-\frac{1}{30} \\
\end{aligned}
\]&lt;/div&gt;
&lt;p&gt;The numbers &lt;span class="arithmatex"&gt;\(B_n = B_n(0)\)&lt;/span&gt; are called the Bernoulli numbers. Integrating the relation &lt;span class="arithmatex"&gt;\(B_r^\prime(x)=rB_r(x)\)&lt;/span&gt; between 0 and 1 gives:&lt;/p&gt;
&lt;div class="arithmatex"&gt;\[
B_r(1)-B_r(0) = \int_0^1 B_r^\prime (x) dx = r\int_0^1 B_{r-1}(x) dx = 0 \quad \forall r\geq 2
\]&lt;/div&gt;
&lt;p&gt;This motivates us to define the periodic Bernoulli polynomials by&lt;/p&gt;
&lt;div class="arithmatex"&gt;\[
\tilde{B}_r(x) = B_r(\langle x\rangle), \quad x\in\mathbb{R}, \; r\geq 2
\]&lt;/div&gt;
&lt;p&gt;where &lt;span class="arithmatex"&gt;\(\langle x\rangle\)&lt;/span&gt; denotes the fractional part of &lt;span class="arithmatex"&gt;\(x\)&lt;/span&gt;. We will now compute the Fourier series of &lt;span class="arithmatex"&gt;\(\tilde{B}_r(x)\)&lt;/span&gt;, where &lt;span class="arithmatex"&gt;\(r\geq 2\)&lt;/span&gt;. The &lt;span class="arithmatex"&gt;\(n\)&lt;/span&gt;-th Fourier coefficient is given by:&lt;/p&gt;
&lt;div class="arithmatex"&gt;\[
\begin{aligned}
a_n &amp;amp;= \int_0^1 \tilde{B}_r(x) e^{-2\pi i n x} dx= \int_0^1 B_r(x) e^{-2\pi i n x} dx
\end{aligned}
\]&lt;/div&gt;
&lt;p&gt;Let's first consider the case when &lt;span class="arithmatex"&gt;\(n\neq 0\)&lt;/span&gt;. Integration by parts, gives us:&lt;/p&gt;
&lt;div class="arithmatex"&gt;\[
\begin{equation}\label{bernoulli-numbers-and-a-related-integral-eq-1}
\begin{aligned}
a_n &amp;amp;= -\frac{e^{-2\pi i n x}}{2\pi i n}B_r(x)\Big|_0^1 + \frac{1}{2\pi i n}\int_0^1 B_r^\prime (x) e^{-2\pi i n x} dx \\ 
&amp;amp;= \frac{1}{2\pi i n}\int_0^1 B_r^\prime (x) e^{-2\pi i n x} dx \\
&amp;amp;= \frac{r}{2\pi i n}\int_0^1 B_{r-1}(x) e^{-2\pi i n x} dx 
\end{aligned}
\end{equation}
\]&lt;/div&gt;
&lt;p&gt;The repeated use of equation &lt;span class="arithmatex"&gt;\(\eqref{bernoulli-numbers-and-a-related-integral-eq-1}\)&lt;/span&gt; gives:&lt;/p&gt;
&lt;div class="arithmatex"&gt;\[
\begin{aligned}
a_n &amp;amp;= \frac{r!}{(2\pi i n)^{r-1}} \int_0^1 B_1(x) e^{-2\pi i nx} dx \\
&amp;amp;= \frac{r!}{(2\pi i n)^{r-1}} \int_0^1 \left(x-\frac{1}{2} \right) e^{-2\pi i nx} dx \\
&amp;amp;= \frac{r!}{(2\pi i n)^{r-1}}\int_0^1 x e^{-2\pi i n x} dx \\
&amp;amp;= -\frac{r!}{(2\pi i n)^r}
\end{aligned}
\]&lt;/div&gt;
&lt;p&gt;When &lt;span class="arithmatex"&gt;\(n=0\)&lt;/span&gt;, we have &lt;span class="arithmatex"&gt;\(a_0 = \int_0^1 B_r(x)dx = 0\)&lt;/span&gt;. Note that the Fourier series&lt;/p&gt;
&lt;div class="arithmatex"&gt;\[
-r! \sum_{\substack{n=-\infty \\ n\neq 0}} \frac{e^{2\pi i n x}}{(2\pi i n)^r}
\]&lt;/div&gt;
&lt;p&gt;converges absolutely for all &lt;span class="arithmatex"&gt;\(r\geq 2\)&lt;/span&gt;. Therefore, it converges uniformly to &lt;span class="arithmatex"&gt;\(\tilde{B}_r(x)\)&lt;/span&gt; for all &lt;span class="arithmatex"&gt;\(r\geq 2\)&lt;/span&gt;. This leads to the following bound:&lt;/p&gt;
&lt;div class="arithmatex"&gt;\[
\begin{equation}\label{bernoulli-numbers-and-a-related-integral-eq-2}
|\tilde{B}_r(x)| \leq \frac{2r!}{(2\pi)^r}\sum_{n=1}^\infty \frac{1}{n^r} &amp;lt; \frac{4r!}{(2\pi)^r} \;\; \forall r\geq 2
\end{equation}
\]&lt;/div&gt;
&lt;p&gt;Note that the above inequality also remains valid for &lt;span class="arithmatex"&gt;\(r=0\)&lt;/span&gt; and &lt;span class="arithmatex"&gt;\(r=1\)&lt;/span&gt;. Now, let's consider the generating function:&lt;/p&gt;
&lt;div class="arithmatex"&gt;\[
F(x,t) = \sum_{n=0}^\infty \frac{\tilde{B}_n(x) t^n}{n!}
\]&lt;/div&gt;
&lt;p&gt;The inequality &lt;span class="arithmatex"&gt;\(\eqref{bernoulli-numbers-and-a-related-integral-eq-2}\)&lt;/span&gt; implies that:&lt;/p&gt;
&lt;div class="arithmatex"&gt;\[
|F(x,t)| &amp;lt; 4 \sum_{n=0}^\infty \left(\frac{t}{2\pi}\right)^n
\]&lt;/div&gt;
&lt;p&gt;Therefore, the series converges uniformly for all &lt;span class="arithmatex"&gt;\(t\in [0,2\pi]\)&lt;/span&gt; and all &lt;span class="arithmatex"&gt;\(x\)&lt;/span&gt;. We, may, therefore differentiate term by term to obtain:&lt;/p&gt;
&lt;div class="arithmatex"&gt;\[
\frac{\partial F(x,t)}{\partial x} = \sum_{n=1}^\infty \frac{\tilde{B}_{n-1}(x)}{(n-1)!}t^n = t F(x,t)
\]&lt;/div&gt;
&lt;p&gt;Solving the above differential equation, we get &lt;span class="arithmatex"&gt;\(F(x,t) = G(t) e^{xt}\)&lt;/span&gt; where &lt;span class="arithmatex"&gt;\(G\)&lt;/span&gt; is some arbitrary function of &lt;span class="arithmatex"&gt;\(t\)&lt;/span&gt;. Next, we integrate &lt;span class="arithmatex"&gt;\(F(x,t)\)&lt;/span&gt; between 0 and 1:&lt;/p&gt;
&lt;div class="arithmatex"&gt;\[
\begin{aligned}
\int_0^1 F(x,t) dx &amp;amp;= G(t) \int_0^1 e^{xt} dx \\
&amp;amp;= G(t) \frac{e^t-1}{t}
\end{aligned}
\]&lt;/div&gt;
&lt;p&gt;On the other hand, note that:&lt;/p&gt;
&lt;div class="arithmatex"&gt;\[
\begin{aligned}
\int_0^1 F(x,t) dx &amp;amp;= \int_0^1 \sum_{n=0}^\infty \frac{\tilde{B}_n(x) t^n}{n!} dx \\
&amp;amp;= 1 + \sum_{n=1}^\infty \frac{t^n}{n!}\int_0^1 B_n(x) dx \\
&amp;amp;= 1
\end{aligned}
\]&lt;/div&gt;
&lt;p&gt;Therefore, we obtain &lt;span class="arithmatex"&gt;\(G(t) = \frac{t}{e^t - 1}\)&lt;/span&gt; and&lt;/p&gt;
&lt;div class="arithmatex"&gt;\[
\boxed{F(x,t) = \frac{t e^{xt}}{e^t-1}}
\]&lt;/div&gt;
&lt;p&gt;An interesting property of the Bernoulli numbers is that &lt;span class="arithmatex"&gt;\(B_{2n+1}=0\)&lt;/span&gt; for all &lt;span class="arithmatex"&gt;\(n\geq 1\)&lt;/span&gt;. To see this, consider:&lt;/p&gt;
&lt;div class="arithmatex"&gt;\[
\frac{t}{e^t -1} + \frac{t}{2}= 1+\sum_{n=2}^\infty \frac{B_n t^n}{n!}
\]&lt;/div&gt;
&lt;p&gt;Now, on the left hand side we have an even function of &lt;span class="arithmatex"&gt;\(t\)&lt;/span&gt;. Therefore, the coefficients of the odd powers of &lt;span class="arithmatex"&gt;\(t\)&lt;/span&gt; on the right hand side are equal to 0. Using the Fourier series expansion, we can express the even-index Bernoulli numbers in terms of the Riemann zeta function:&lt;/p&gt;
&lt;div class="arithmatex"&gt;\[
B_{2n} = \frac{2 (-1)^{n-1} (2n)!}{(2\pi)^{2n}} \zeta(2n)
\]&lt;/div&gt;
&lt;p&gt;The Bernoulli polynomials satisfy the following recursive equation:&lt;/p&gt;
&lt;div class="arithmatex"&gt;\[
{B}_n(x) = \sum_{k=0}^n \binom{n}{k} B_{n-k} x^k
\]&lt;/div&gt;
&lt;p&gt;This can be proved by noting that:&lt;/p&gt;
&lt;div class="arithmatex"&gt;\[
\begin{aligned}
\sum_{n=0}^\infty \frac{{B}_n(x) t^n}{n!} &amp;amp;= \frac{te^{xt}}{e^t-1} \\
&amp;amp;= e^{xt} \sum_{n=0}^\infty \frac{B_n t^n}{n!} \\
&amp;amp;= \sum_{m=0}^\infty \frac{(xt)^m}{m!} \sum_{n=0}^\infty \frac{B_n t^n}{n!} \\
&amp;amp;= \sum_{m=0}^\infty \sum_{n=0}^\infty \frac{B_n x^m t^{n+m}}{n! m!} \\
&amp;amp;= \sum_{n=0}^\infty \sum_{k=0}^n \frac{B_k t^n x^{n-k}}{k! (n-k)!} \\
&amp;amp;= \sum_{n=0}^\infty \frac{t^n}{n!}\sum_{k=0}^n \binom{n}{k} B_k x^{n-k}
\end{aligned}
\]&lt;/div&gt;
&lt;p&gt;where &lt;span class="arithmatex"&gt;\(x\in [0,1]\)&lt;/span&gt;. Now, compare the coefficients of &lt;span class="arithmatex"&gt;\(t^n\)&lt;/span&gt; to get the desired result. Plugging in &lt;span class="arithmatex"&gt;\(x=1\)&lt;/span&gt;, gives the identity:&lt;/p&gt;
&lt;div class="arithmatex"&gt;\[
\sum_{k=0}^{n-1} \binom{n}{k} B_k = 0
\]&lt;/div&gt;
&lt;p&gt;Now, let's turn our attention to the integral:&lt;/p&gt;
&lt;div class="arithmatex"&gt;\[
I=\int_0^{\frac{\pi}{2}}\frac{\sin(2nx)}{\sin^{2n+2}(x)}\cdot \frac{1}{e^{2\pi \cot x}-1} dx
\]&lt;/div&gt;
&lt;p&gt;where &lt;span class="arithmatex"&gt;\(n\in\mathbb{N}\)&lt;/span&gt;. We will use the following trigonometric identity:&lt;/p&gt;
&lt;div class="arithmatex"&gt;\[
\frac{\sin(2nx)}{\sin^{2n}(x)} =(-1)^n \sum_{r=1}^{n}\binom{2n}{2r-1} (-1)^{r}\cot^{2r-1}(x)
\]&lt;/div&gt;
&lt;p&gt;Substituting the above into the integral, gives:&lt;/p&gt;
&lt;div class="arithmatex"&gt;\[
\begin{aligned}
I &amp;amp;= (-1)^n \int_0^{\pi\over 2}\left( \sum_{r=1}^{n}\binom{2n}{2r-1} (-1)^{r}\cot^{2r-1}(x)\right)\frac{\csc^2(x)}{e^{2\pi \cot x}-1}dx \\ 
&amp;amp;= (-1)^n \sum_{r=1}^{n}\binom{2n}{2r-1} (-1)^{r} \int_0^{\pi \over 2}\cot^{2r-1}(x)\frac{\csc^2(x)}{e^{2\pi \cot x}-1}dx \\ 
&amp;amp;= (-1)^n \sum_{r=1}^{n}\binom{2n}{2r-1} (-1)^{r} \int_0^\infty \frac{t^{2r-1}}{e^{2\pi t}-1}dt  \\ 
&amp;amp;= (-1)^n \sum_{r=1}^{n}\binom{2n}{2r-1} (-1)^{r}\frac{(2r-1)! \zeta(2r)}{(2\pi)^r }\\ 
&amp;amp;= (-1)^n \sum_{r=1}^{n}\binom{2n}{2r-1} (-1)^{r} (-1)^{r-1} \frac{B_{2r}}{4r}\\ 
&amp;amp;= \frac{(-1)^{n-1}}{4}\sum_{r=1}^{n}\binom{2n}{2r-1}\frac{B_{2r}}{r} \\
&amp;amp;= \frac{(-1)^{n-1}}{2(2n+1)}\sum_{r=1}^n \binom{2n+1}{2r} B_{2r} \\
&amp;amp;= \frac{(-1)^{n-1}}{2(2n+1)} \left[\sum_{r=0}^{2n} \binom{2n+1}{r} B_r - \binom{2n+1}{0}B_0 - \binom{2n+1}{1} B_1\right] \\
&amp;amp;= \frac{(-1)^{n-1}}{2(2n+1)} \left[-\binom{2n+1}{0}B_0 - \binom{2n+1}{1} B_1\right] \\
&amp;amp;= \frac{(-1)^{n-1}}{4}\cdot \frac{2n-1}{2n+1}
\end{aligned}
\]&lt;/div&gt;</content><category term="Euler Sums and Infinite Series"/><category term="bernoulli-numbers"/><category term="fourier-series"/><category term="infinite-series"/><category term="definite-integrals"/></entry><entry><title>Weyl's Equidistribution Theorem</title><link href="https://integralsandseries.in/2020/02/05/weyls-equidistribution-theorem/" rel="alternate"/><published>2020-02-05T16:39:57+00:00</published><updated>2025-11-13T15:49:54+00:00</updated><author><name>Shobhit Bhatnagar</name></author><id>tag:integralsandseries.in,2020-02-05:/2020/02/05/weyls-equidistribution-theorem/</id><summary type="html">&lt;p&gt;Weyl's criterion connects uniform distribution modulo one with exponential sums and averages of Riemann-integrable functions.&lt;/p&gt;</summary><content type="html">&lt;p&gt;Weyl's criterion lets us test uniform distribution by checking exponential sums. We will prove the equivalence between this test, interval counts, and averages of Riemann-integrable functions. A sequence of real numbers &lt;span class="arithmatex"&gt;\(x_1, x_2, \cdots\)&lt;/span&gt; is said to be equidistributed (mod 1) if for every sub-interval &lt;span class="arithmatex"&gt;\((a,b)\subset [0,1]\)&lt;/span&gt;, we have&lt;/p&gt;
&lt;div class="arithmatex"&gt;\[
\lim_{N\to \infty}\frac{|\{1\leq n\leq N:\; \langle x_n \rangle\in (a,b)\}|}{N} = b-a
\]&lt;/div&gt;
&lt;p&gt;where &lt;span class="arithmatex"&gt;\(\langle x \rangle\)&lt;/span&gt; denotes the fractional part of &lt;span class="arithmatex"&gt;\(x\)&lt;/span&gt;. Weyl's equidistribution criterion states that the following statements are equivalent:&lt;/p&gt;
&lt;ol&gt;
&lt;li&gt;&lt;span class="arithmatex"&gt;\(x_1, x_2, \cdots\)&lt;/span&gt; are equidistributed (mod 1).&lt;/li&gt;
&lt;li&gt;
&lt;p&gt;For each non-zero integer &lt;span class="arithmatex"&gt;\(k\)&lt;/span&gt;, we have&lt;/p&gt;
&lt;div class="arithmatex"&gt;\[
\lim_{N\to\infty}\frac{1}{N}\sum_{n=1}^N e^{2\pi i k x_n}=0
\]&lt;/div&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;p&gt;For each Riemann integrable function &lt;span class="arithmatex"&gt;\(f:[0,1]\to\mathbb{C}\)&lt;/span&gt;, we have&lt;/p&gt;
&lt;div class="arithmatex"&gt;\[
\lim_{N\to \infty}\frac{1}{N}\sum_{n=1}^N f(\langle x_n \rangle) = \int_0^1 f(x) dx
\]&lt;/div&gt;
&lt;/li&gt;
&lt;/ol&gt;
&lt;h2&gt;Proof: (1) ⇒ (3)&lt;/h2&gt;
&lt;p&gt;Let &lt;span class="arithmatex"&gt;\(I=[a,b)\subseteq [0,1]\)&lt;/span&gt; and note that&lt;/p&gt;
&lt;div class="arithmatex"&gt;\[
\frac{|\{1 \leq n \leq N: \langle x_n \rangle\in [a,b) \}|}{N}=\frac{1}{N}\sum_{n=1}^N \chi_{[a,b)}(\langle x_n \rangle)
\]&lt;/div&gt;
&lt;p&gt;where &lt;span class="arithmatex"&gt;\(\chi_{[a,b)}(x)\)&lt;/span&gt; equals 1 if &lt;span class="arithmatex"&gt;\(x\in [a,b)\)&lt;/span&gt; and 0 otherwise. This shows that (3) holds for the case when &lt;span class="arithmatex"&gt;\(f\)&lt;/span&gt; is a characteristic function. Now, let &lt;span class="arithmatex"&gt;\(\lambda_1, \lambda_2\in \mathbb{R}\)&lt;/span&gt; and &lt;span class="arithmatex"&gt;\(f_1\)&lt;/span&gt;, &lt;span class="arithmatex"&gt;\(f_2\)&lt;/span&gt; be functions for which (3) holds. Then,&lt;/p&gt;
&lt;div class="arithmatex"&gt;\[
\begin{aligned}\lim_{N\to \infty}\frac{1}{N}\sum_{n=1}^N (\lambda_1 f_1 + \lambda_2 f_2)(\langle x_n \rangle) &amp;amp;= \lim_{N\to \infty} \frac{\lambda_1}{N}\sum_{n=1}^N f_1(\langle x_n\rangle) + \lim_{N\to \infty}\frac{\lambda_2}{N}\sum_{n=1}^Nf_2(\langle x_n\rangle) \\ &amp;amp;= \lambda_1\int_0^1 f_1(x) dx + \lambda_2 \int_0^1 f_2(x) dx \\ &amp;amp;= \int_0^1 (\lambda_1 f_1 + \lambda_2 f_2)(x) dx\end{aligned}
\]&lt;/div&gt;
&lt;p&gt;Thus, (3) holds for all linear combinations of characteristic functions of subintervals of &lt;span class="arithmatex"&gt;\([0,1]\)&lt;/span&gt;.&lt;/p&gt;
&lt;p&gt;Now, let &lt;span class="arithmatex"&gt;\(f:[0,1]\to \mathbb{R}\)&lt;/span&gt; be an integrable function, and let &lt;span class="arithmatex"&gt;\(\epsilon &amp;gt;0\)&lt;/span&gt;. Choose step functions &lt;span class="arithmatex"&gt;\(f_1\)&lt;/span&gt; and &lt;span class="arithmatex"&gt;\(f_2\)&lt;/span&gt; such that:&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;&lt;span class="arithmatex"&gt;\(f_1\leq f\leq f_2\)&lt;/span&gt; pointwise&lt;/li&gt;
&lt;li&gt;&lt;span class="arithmatex"&gt;\(\int_0^1 (f_2(x)-f_1(x))dx &amp;lt; \frac{\epsilon}{2}\)&lt;/span&gt;&lt;/li&gt;
&lt;li&gt;There exists &lt;span class="arithmatex"&gt;\(N_0\)&lt;/span&gt; such that &lt;span class="arithmatex"&gt;\(\left|\int_0^1 f_1(x)dx - \frac{1}{N}\sum_{n=1}^N f_1(\langle x_n\rangle) \right| &amp;lt; \frac{\epsilon}{2}\)&lt;/span&gt; and &lt;span class="arithmatex"&gt;\(\left|\int_0^1 f_2(x)dx - \frac{1}{N}\sum_{n=1}^N f_2(\langle x_n\rangle) \right| &amp;lt; \frac{\epsilon}{2}\)&lt;/span&gt; for all &lt;span class="arithmatex"&gt;\(N\geq N_0\)&lt;/span&gt;&lt;/li&gt;
&lt;/ul&gt;
&lt;p&gt;It follows that for &lt;span class="arithmatex"&gt;\(N\geq N_0\)&lt;/span&gt;,&lt;/p&gt;
&lt;div class="arithmatex"&gt;\[
\begin{aligned}
\int_0^1 f(x) dx - \frac{1}{N}\sum_{n=1}^N f(\langle x_n\rangle) &amp;amp;\leq \int_0^1 f(x) dx - \frac{1}{N}\sum_{n=1}^N f_1(\langle x_n\rangle) \\
&amp;amp;&amp;lt; \int_0^1 f(x) dx -\int_0^1 f_1(x) dx +\frac{\epsilon}{2} \\
&amp;amp;&amp;lt; \int_0^1 (f_2(x)-f_1(x)) dx + \frac{\epsilon}{2} \\
&amp;amp;&amp;lt; \epsilon
\end{aligned}
\]&lt;/div&gt;
&lt;p&gt;In a similar way, we can prove that&lt;/p&gt;
&lt;div class="arithmatex"&gt;\[
\int_0^1 f(x) dx - \frac{1}{N}\sum_{n=1}^N f(\langle x_n\rangle) &amp;gt; -\epsilon \quad \forall\; N\geq N_0
\]&lt;/div&gt;
&lt;p&gt;Therefore, we have&lt;/p&gt;
&lt;div class="arithmatex"&gt;\[
\left|\int_0^1 f(x) dx - \frac{1}{N}\sum_{n=1}^N f(\langle x_n\rangle) \right| &amp;lt; \epsilon \quad \forall\; N\geq N_0
\]&lt;/div&gt;
&lt;p&gt;To see that (3) holds when &lt;span class="arithmatex"&gt;\(f\)&lt;/span&gt; is complex valued, we need only consider the real and imaginary parts separately.&lt;/p&gt;
&lt;h2&gt;(2) ⇒ (3)&lt;/h2&gt;
&lt;p&gt;First let &lt;span class="arithmatex"&gt;\(f\)&lt;/span&gt; be continuous and &lt;span class="arithmatex"&gt;\(1\)&lt;/span&gt;-periodic. Trigonometric polynomials uniformly approximate such functions on the circle. For any &lt;span class="arithmatex"&gt;\(\epsilon&amp;gt;0\)&lt;/span&gt;, choose&lt;/p&gt;
&lt;div class="arithmatex"&gt;\[
p(x)=\sum_{|k|\leq m}c_k e^{2\pi i kx},\qquad \|f-p\|_\infty&amp;lt;\epsilon.
\]&lt;/div&gt;
&lt;p&gt;By (2), the average of &lt;span class="arithmatex"&gt;\(p(x_n)\)&lt;/span&gt; tends to its constant coefficient &lt;span class="arithmatex"&gt;\(c_0=\int_0^1p(x)\,dx\)&lt;/span&gt;. Thus&lt;/p&gt;
&lt;div class="arithmatex"&gt;\[
\limsup_{N\to\infty}\left|\frac1N\sum_{n=1}^N f(\langle x_n\rangle)-\int_0^1 f(x)\,dx\right|\leq2\epsilon.
\]&lt;/div&gt;
&lt;p&gt;Letting &lt;span class="arithmatex"&gt;\(\epsilon\to0\)&lt;/span&gt; proves the assertion for continuous periodic &lt;span class="arithmatex"&gt;\(f\)&lt;/span&gt;.&lt;/p&gt;
&lt;p&gt;To pass to interval indicators, fix an arc &lt;span class="arithmatex"&gt;\(I\)&lt;/span&gt; of the circle. For any &lt;span class="arithmatex"&gt;\(\epsilon&amp;gt;0\)&lt;/span&gt;, choose continuous periodic functions &lt;span class="arithmatex"&gt;\(g_-\)&lt;/span&gt; and &lt;span class="arithmatex"&gt;\(g_+\)&lt;/span&gt;, with short linear ramps near the endpoints, such that&lt;/p&gt;
&lt;div class="arithmatex"&gt;\[
g_-\leq\chi_I\leq g_+,\qquad \int_0^1(g_+-g_-)\,dx&amp;lt;\epsilon.
\]&lt;/div&gt;
&lt;p&gt;Their integrals bracket the length of &lt;span class="arithmatex"&gt;\(I\)&lt;/span&gt;. Applying the result just proved to &lt;span class="arithmatex"&gt;\(g_-\)&lt;/span&gt; and &lt;span class="arithmatex"&gt;\(g_+\)&lt;/span&gt; squeezes the limiting interval frequency to that length. The same construction with a small neighborhood of a single point shows that endpoint visits have density zero, so the choice of open, closed, or half-open endpoints does not affect the result. This proves (1). The argument in (1) ⇒ (3) now extends the conclusion to all Riemann-integrable functions.&lt;/p&gt;
&lt;p&gt;Periodicity is essential in the first approximation step: a continuous function on &lt;span class="arithmatex"&gt;\([0,1]\)&lt;/span&gt; whose endpoint values differ cannot be uniformly approximated there by trigonometric polynomials.&lt;/p&gt;
&lt;p&gt;The implications &lt;strong&gt;(3) ⇒ (1)&lt;/strong&gt; and &lt;strong&gt;(3) ⇒ (2)&lt;/strong&gt; are obvious.&lt;/p&gt;
&lt;h2&gt;References&lt;/h2&gt;
&lt;ul&gt;
&lt;li&gt;Hannigan-Daley, Brad. Equidistribution and Weyl’s criterion. Retrieved from &lt;em&gt;http://individual.utoronto.ca/hannigandaley/equidistribution.pdf&lt;/em&gt;. Accessed 5 Feb. 2020.&lt;/li&gt;
&lt;li&gt;Stein, Elias M. and Shakarchi, Rami. &lt;em&gt;Fourier Analysis: An Introduction&lt;/em&gt;. Princeton University Press, 2003&lt;/li&gt;
&lt;/ul&gt;</content><category term="Number Theory"/><category term="number-theory"/><category term="equidistribution"/><category term="fourier-series"/></entry><entry><title>Eisenstein's Proof of Quadratic Reciprocity</title><link href="https://integralsandseries.in/2020/01/25/eisensteins-proof-of-quadratic-reciprocity/" rel="alternate"/><published>2020-01-25T16:47:43+00:00</published><updated>2026-10-24T00:00:00+05:30</updated><author><name>Shobhit Bhatnagar</name></author><id>tag:integralsandseries.in,2020-01-25:/2020/01/25/eisensteins-proof-of-quadratic-reciprocity/</id><summary type="html">&lt;p&gt;Eisenstein's trigonometric proof of quadratic reciprocity, starting with Euler's criterion and Gauss's lemma.&lt;/p&gt;</summary><content type="html">&lt;p&gt;Eisenstein's proof of quadratic reciprocity turns a question about quadratic residues into a symmetry between two products of sines. We will first establish Euler's criterion and Gauss's lemma, then use them to identify the sign of that product.&lt;/p&gt;
&lt;p&gt;&lt;strong&gt;Definition:&lt;/strong&gt; For an odd prime &lt;span class="arithmatex"&gt;\(p\)&lt;/span&gt;, the Legendre symbol &lt;span class="arithmatex"&gt;\(\left(\frac{a}{p}\right)\)&lt;/span&gt; records whether &lt;span class="arithmatex"&gt;\(a\)&lt;/span&gt; is a nonzero square modulo &lt;span class="arithmatex"&gt;\(p\)&lt;/span&gt;; it is zero when &lt;span class="arithmatex"&gt;\(p\)&lt;/span&gt; divides &lt;span class="arithmatex"&gt;\(a\)&lt;/span&gt;.&lt;/p&gt;
&lt;div class="arithmatex"&gt;\[
\left(\frac{a}{p}\right) = \begin{cases}0 \quad \text{if }p|a \\ 1 \quad \text{if }a\text{ is a quadratic residue modulo }p \\ -1 \quad \text{if }a\text{ is a quadratic non-residue modulo }p\end{cases}
\]&lt;/div&gt;
&lt;p&gt;&lt;strong&gt;Theorem (Quadratic Reciprocity Law):&lt;/strong&gt; If &lt;span class="arithmatex"&gt;\(p\)&lt;/span&gt; and &lt;span class="arithmatex"&gt;\(q\)&lt;/span&gt; are distinct odd primes, then the quadratic reciprocity theorem states that the congruences&lt;/p&gt;
&lt;div class="arithmatex"&gt;\[
\begin{aligned} x^2 \equiv q \quad (\text{mod }p) \\ x^2 \equiv p \quad (\text{mod }q) \end{aligned}
\]&lt;/div&gt;
&lt;p&gt;are both solvable or both unsolvable unless both &lt;span class="arithmatex"&gt;\(p\)&lt;/span&gt; and &lt;span class="arithmatex"&gt;\(q\)&lt;/span&gt; leave the remainder &lt;span class="arithmatex"&gt;\(3\)&lt;/span&gt; when divided by &lt;span class="arithmatex"&gt;\(4\)&lt;/span&gt;. Written symbolically,&lt;/p&gt;
&lt;div class="arithmatex"&gt;\[
\left(\frac{p}{q}\right)\left(\frac{q}{p}\right) = (-1)^{(p-1)(q-1)/4}
\]&lt;/div&gt;
&lt;p&gt;We will start by proving two important results about quadratic residues that will be useful later on.&lt;/p&gt;
&lt;p&gt;&lt;strong&gt;Lemma 1:&lt;/strong&gt; Let &lt;span class="arithmatex"&gt;\(n\not\equiv 0 \;(\text{mod }p)\)&lt;/span&gt;. Then &lt;span class="arithmatex"&gt;\(n\)&lt;/span&gt; is a quadratic residue modulo &lt;span class="arithmatex"&gt;\(p\)&lt;/span&gt; iff &lt;span class="arithmatex"&gt;\(n^{\frac{p-1}{2}}\equiv 1 \; (\text{mod }p)\)&lt;/span&gt;.&lt;/p&gt;
&lt;p&gt;&lt;strong&gt;Proof:&lt;/strong&gt; Fermat's little theorem tells us that &lt;span class="arithmatex"&gt;\(n^{p-1}\equiv 1 \;(\text{mod }p)\)&lt;/span&gt; whenever &lt;span class="arithmatex"&gt;\(p \not| n\)&lt;/span&gt;. Since,&lt;/p&gt;
&lt;div class="arithmatex"&gt;\[
n^{p-1}-1\equiv (n^{\frac{p-1}{2}}-1)(n^{\frac{p-1}{2}}+1)\equiv 0 \; (\text{mod }p)
\]&lt;/div&gt;
&lt;p&gt;we have &lt;span class="arithmatex"&gt;\(n^{\frac{p-1}{2}}\equiv \pm 1\; (\text{mod }p)\)&lt;/span&gt;. Therefore, it suffices to prove that &lt;span class="arithmatex"&gt;\(n\)&lt;/span&gt; is a quadratic residue modulo &lt;span class="arithmatex"&gt;\(p\)&lt;/span&gt; if and only if &lt;span class="arithmatex"&gt;\(n^{\frac{p-1}{2}}\equiv 1 \; (\text{mod }p)\)&lt;/span&gt;.&lt;/p&gt;
&lt;p&gt;Suppose that &lt;span class="arithmatex"&gt;\(\left(\frac{n}{p} \right)=1\)&lt;/span&gt;. Then, there is an integer &lt;span class="arithmatex"&gt;\(x\)&lt;/span&gt; such that &lt;span class="arithmatex"&gt;\(n\equiv x^2 \; (\text{mod p})\)&lt;/span&gt;. Now, we have&lt;/p&gt;
&lt;div class="arithmatex"&gt;\[
n^{\frac{p-1}{2}}\equiv x^{p-1} \equiv 1 \equiv \left(\frac{n}{p} \right) \; (\text{mod }p)
\]&lt;/div&gt;
&lt;p&gt;Conversely, assume that &lt;span class="arithmatex"&gt;\(n^{\frac{p-1}{2}}\equiv 1 \; (\text{mod }p)\)&lt;/span&gt;. Let &lt;span class="arithmatex"&gt;\(g\)&lt;/span&gt; be a primitive root of &lt;span class="arithmatex"&gt;\(p\)&lt;/span&gt;. Then, we have &lt;span class="arithmatex"&gt;\(n\equiv g^k \; (\text{mod }p)\)&lt;/span&gt; for some integer &lt;span class="arithmatex"&gt;\(k\)&lt;/span&gt;. Since &lt;span class="arithmatex"&gt;\(n^{\frac{p-1}{2}}\equiv g^{\frac{k(p-1)}{2}} \equiv 1 \; (\text{mod }p)\)&lt;/span&gt;, the order of &lt;span class="arithmatex"&gt;\(g\)&lt;/span&gt; must divide the exponent &lt;span class="arithmatex"&gt;\(\frac{k(p-1)}{2}\)&lt;/span&gt;. Therefore, &lt;span class="arithmatex"&gt;\(p-1 | \frac{k(p-1)}{2}\)&lt;/span&gt; and thus &lt;span class="arithmatex"&gt;\(k\)&lt;/span&gt; is an even integer. Let's say &lt;span class="arithmatex"&gt;\(k=2j\)&lt;/span&gt; for some integer &lt;span class="arithmatex"&gt;\(j\)&lt;/span&gt;. Then, we have&lt;/p&gt;
&lt;div class="arithmatex"&gt;\[
n \equiv g^k \equiv g^{2j} \equiv (g^j)^2 \; (\text{mod }p)
\]&lt;/div&gt;
&lt;p&gt;This proves that &lt;span class="arithmatex"&gt;\(n\)&lt;/span&gt; is a quadratic residue modulo &lt;span class="arithmatex"&gt;\(p\)&lt;/span&gt;.&lt;/p&gt;
&lt;p&gt;&lt;strong&gt;Lemma 2 (Gauss's Lemma):&lt;/strong&gt; For any odd prime &lt;span class="arithmatex"&gt;\(p\)&lt;/span&gt;, let &lt;span class="arithmatex"&gt;\(a\)&lt;/span&gt; be an integer that is co-prime to &lt;span class="arithmatex"&gt;\(p\)&lt;/span&gt;. Consider the integers&lt;/p&gt;
&lt;div class="arithmatex"&gt;\[
S = \left\{ a,\ 2a,\ 3a,\cdots, \frac{p-1}{2}a \right\}
\]&lt;/div&gt;
&lt;p&gt;and their least positive residues modulo &lt;span class="arithmatex"&gt;\(p\)&lt;/span&gt;. Let &lt;span class="arithmatex"&gt;\(n\)&lt;/span&gt; be the number of these residues that are greater than &lt;span class="arithmatex"&gt;\(p/2\)&lt;/span&gt;. Then&lt;/p&gt;
&lt;div class="arithmatex"&gt;\[
\left(\frac{a}{p}\right)=(-1)^n
\]&lt;/div&gt;
&lt;p&gt;&lt;strong&gt;Proof:&lt;/strong&gt; Since &lt;span class="arithmatex"&gt;\(p\not | a\)&lt;/span&gt;, none of the integers in &lt;span class="arithmatex"&gt;\(S\)&lt;/span&gt; are congruent to 0 and no two of them are congruent to each other modulo &lt;span class="arithmatex"&gt;\(p\)&lt;/span&gt;. Let &lt;span class="arithmatex"&gt;\(r_1, \cdots, r_m\)&lt;/span&gt; be the residues modulo &lt;span class="arithmatex"&gt;\(p\)&lt;/span&gt; smaller than &lt;span class="arithmatex"&gt;\(\frac{p}{2}\)&lt;/span&gt;, and let &lt;span class="arithmatex"&gt;\(s_1, \cdots, s_n\)&lt;/span&gt; be the residues modulo &lt;span class="arithmatex"&gt;\(p\)&lt;/span&gt; greater than &lt;span class="arithmatex"&gt;\(\frac{p}{2}\)&lt;/span&gt;. Then &lt;span class="arithmatex"&gt;\(m+n=\frac{p-1}{2}\)&lt;/span&gt; and the integers&lt;/p&gt;
&lt;div class="arithmatex"&gt;\[
r_1, \cdots, r_m, p-s_1, \cdots , p-s_n
\]&lt;/div&gt;
&lt;p&gt;are all positive and less than &lt;span class="arithmatex"&gt;\(\frac{p}{2}\)&lt;/span&gt;. Now, we will prove that no two of these integers are equal. Suppose that for some choice of &lt;span class="arithmatex"&gt;\(i\)&lt;/span&gt; and &lt;span class="arithmatex"&gt;\(j\)&lt;/span&gt; we have &lt;span class="arithmatex"&gt;\(p-s_i = r_j\)&lt;/span&gt;. We can choose integers &lt;span class="arithmatex"&gt;\(u\)&lt;/span&gt; and &lt;span class="arithmatex"&gt;\(v\)&lt;/span&gt;, with &lt;span class="arithmatex"&gt;\(1 \leq u,v \leq \frac{p-1}{2}\)&lt;/span&gt; and satisfying&lt;/p&gt;
&lt;div class="arithmatex"&gt;\[
\begin{aligned}
s_i &amp;amp;\equiv u a \; (\text{mod }p) \\
r_j &amp;amp;\equiv v a \; (\text{mod }p)
\end{aligned}
\]&lt;/div&gt;
&lt;p&gt;Now, we have&lt;/p&gt;
&lt;div class="arithmatex"&gt;\[
s_i+r_j \equiv a(u+v) \equiv p \equiv 0 \; (\text{mod }p)
\]&lt;/div&gt;
&lt;p&gt;This implies that &lt;span class="arithmatex"&gt;\(u+v \equiv 0 \; (\text{mod }p)\)&lt;/span&gt;. However, this is not possible because &lt;span class="arithmatex"&gt;\(1\leq u+v \leq p-1\)&lt;/span&gt;. Thus, we have proven that the numbers &lt;span class="arithmatex"&gt;\(r_1,\cdots, r_m, p-s_1, \cdots p-s_n\)&lt;/span&gt; are simply a rearrangement of the integers &lt;span class="arithmatex"&gt;\(1,2,\cdots, \frac{p-1}{2}\)&lt;/span&gt;. Their product is equal to &lt;span class="arithmatex"&gt;\(\left(\frac{p-1}{2} \right)!\)&lt;/span&gt;. Therefore,&lt;/p&gt;
&lt;div class="arithmatex"&gt;\[
\begin{aligned}
\left(\frac{p-1}{2}\right)! &amp;amp;= r_1 \cdots r_m (p-s_1)\cdots (p-s_n) \\
&amp;amp;\equiv (-1)^n r_1 \cdots r_m s_1\cdots s_n \; (\text{mod }p) \\
&amp;amp;\equiv (-1)^n a\cdot 2a\cdots \left(\frac{p-1}{2}\right)a \; (\text{mod }p) \\
&amp;amp;\equiv (-1)^n a^{\frac{p-1}{2}} \left( \frac{p-1}{2}\right)! \; (\text{mod }p)
\end{aligned}
\]&lt;/div&gt;
&lt;p&gt;The &lt;span class="arithmatex"&gt;\(\left( \frac{p-1}{2}\right)!\)&lt;/span&gt; term can be cancelled from both sides as &lt;span class="arithmatex"&gt;\(p\not| \left( \frac{p-1}{2}\right)!\)&lt;/span&gt;. In other words, we have &lt;span class="arithmatex"&gt;\(a^{\frac{p-1}{2}}\equiv (-1)^n \; (\text{mod }p)\)&lt;/span&gt;. This completes the proof of Gauss's lemma.&lt;/p&gt;
&lt;p&gt;We are now ready to prove the Quadratic reciprocity theorem.&lt;/p&gt;
&lt;h2&gt;Proof of the Quadratic Reciprocity Theorem:&lt;/h2&gt;
&lt;p&gt;Using the periodicity properties of &lt;span class="arithmatex"&gt;\(\sin\)&lt;/span&gt; and Gauss's lemma, it is easy to verify the following result:&lt;/p&gt;
&lt;p&gt;&lt;strong&gt;Lemma:&lt;/strong&gt; Let &lt;span class="arithmatex"&gt;\(p\)&lt;/span&gt; and &lt;span class="arithmatex"&gt;\(q\)&lt;/span&gt; be distinct odd primes and let &lt;span class="arithmatex"&gt;\(A = \left\{ \alpha\in \mathbb{Z} | 1\leq \alpha \leq \frac{p-1}{2}\right\}\)&lt;/span&gt; be a half system modulo &lt;span class="arithmatex"&gt;\(p\)&lt;/span&gt;. Then,&lt;/p&gt;
&lt;div class="arithmatex"&gt;\[
\begin{equation}\label{eisensteins-proof-of-quadratic-reciprocity-eq-1}
\left(\frac{q}{p}\right) = \prod_{\alpha\in A}\frac{\sin\left(\frac{2\pi}{p}q\alpha\right)}{\sin\left(\frac{2\pi}{p}\alpha\right)}
\end{equation}
\]&lt;/div&gt;
&lt;p&gt;We start by examining the right hand side of equation &lt;span class="arithmatex"&gt;\(\eqref{eisensteins-proof-of-quadratic-reciprocity-eq-1}\)&lt;/span&gt;. The addition theorem for trigonometric functions yields &lt;span class="arithmatex"&gt;\(\sin 2\alpha = 2\sin\alpha\cos\alpha\)&lt;/span&gt; and &lt;span class="arithmatex"&gt;\(\sin 3\alpha = \sin\alpha(3-4\sin^2\alpha)\)&lt;/span&gt;. Induction shows that &lt;span class="arithmatex"&gt;\(\sin q\alpha = \sin\alpha P(\sin\alpha)\)&lt;/span&gt; for all odd &lt;span class="arithmatex"&gt;\(q\geq 1\)&lt;/span&gt;, where &lt;span class="arithmatex"&gt;\(P\in \mathbb{Z}[X]\)&lt;/span&gt; is a polynomial of degree &lt;span class="arithmatex"&gt;\(q-1\)&lt;/span&gt; and highest coefficient &lt;span class="arithmatex"&gt;\((-4)^{\frac{q-1}{2}}\)&lt;/span&gt;. After factoring out the leading coefficient, there are rational coefficients &lt;span class="arithmatex"&gt;\(a_i\)&lt;/span&gt; such that&lt;/p&gt;
&lt;div class="arithmatex"&gt;\[
\begin{aligned}\frac{\sin qz}{\sin z} &amp;amp;= (-4)^{\frac{q-1}{2}} \left( (\sin z)^{q-1}+a_{q-2} (\sin z)^{q-2}+\cdots + a_0 \right) \\ &amp;amp;= (-4)^{\frac{q-1}{2}} \psi(X), \quad \text{where }X=\sin z\end{aligned}
\]&lt;/div&gt;
&lt;p&gt;Since &lt;span class="arithmatex"&gt;\(\phi(z)=\frac{\sin qz}{\sin z}\)&lt;/span&gt; is an even function, so is &lt;span class="arithmatex"&gt;\(\psi(X)\)&lt;/span&gt;, hence all coefficients of odd powers of &lt;span class="arithmatex"&gt;\(X\)&lt;/span&gt; vanish. Now &lt;span class="arithmatex"&gt;\(\phi(z)\)&lt;/span&gt; has zeros &lt;span class="arithmatex"&gt;\(\left\{ \pm \frac{2\pi}{q}\beta, \ 1\leq \beta \leq \frac{q-1}{2}\right\}\)&lt;/span&gt;. Since &lt;span class="arithmatex"&gt;\(\psi\)&lt;/span&gt; is monic of degree &lt;span class="arithmatex"&gt;\(q-1\)&lt;/span&gt;, we may write&lt;/p&gt;
&lt;div class="arithmatex"&gt;\[
\psi(X) = \prod_{\beta\in B}\left(X^2-\sin^2\frac{2\pi\beta}{q} \right)
\]&lt;/div&gt;
&lt;p&gt;where &lt;span class="arithmatex"&gt;\(B=\left\{1,\cdots,\frac{q-1}{2} \right\}\)&lt;/span&gt; is a half system modulo &lt;span class="arithmatex"&gt;\(q\)&lt;/span&gt;. Replacing &lt;span class="arithmatex"&gt;\(X\)&lt;/span&gt; by &lt;span class="arithmatex"&gt;\(\sin z\)&lt;/span&gt;, we get&lt;/p&gt;
&lt;div class="arithmatex"&gt;\[
\begin{equation}\label{eisensteins-proof-of-quadratic-reciprocity-eq-2}
\frac{\sin qz}{\sin z} = (-4)^{\frac{q-1}{2}} \prod_{\beta\in B }\left( \sin^2z -\sin^2\frac{2\pi\beta}{q}\right)
\end{equation}
\]&lt;/div&gt;
&lt;p&gt;Put &lt;span class="arithmatex"&gt;\(z=\frac{2\pi\alpha}{p}\)&lt;/span&gt; in equation &lt;span class="arithmatex"&gt;\(\eqref{eisensteins-proof-of-quadratic-reciprocity-eq-2}\)&lt;/span&gt; and plug the result into equation &lt;span class="arithmatex"&gt;\(\eqref{eisensteins-proof-of-quadratic-reciprocity-eq-1}\)&lt;/span&gt;.&lt;/p&gt;
&lt;div class="arithmatex"&gt;\[
\begin{equation}\label{eisensteins-proof-of-quadratic-reciprocity-eq-3}
\begin{aligned} \left(\frac{q}{p}\right) &amp;amp;= \prod_{\alpha\in A} (-4)^{\frac{q-1}{2}} \prod_{\beta\in B} \left( \sin^2\frac{2\pi\alpha}{p} -\sin^2\frac{2\pi\beta}{q}\right)\\ &amp;amp;= (-4)^{\frac{q-1}{2} \frac{p-1}{2}} \prod_{\alpha\in A}\prod_{\beta\in B} \left( \sin^2\frac{2\pi\alpha}{p} -\sin^2\frac{2\pi\beta}{q}\right) \end{aligned}
\end{equation}
\]&lt;/div&gt;
&lt;p&gt;Exchanging &lt;span class="arithmatex"&gt;\(p\)&lt;/span&gt; and &lt;span class="arithmatex"&gt;\(q\)&lt;/span&gt; on the right side of &lt;span class="arithmatex"&gt;\(\eqref{eisensteins-proof-of-quadratic-reciprocity-eq-3}\)&lt;/span&gt; give rise to factor of &lt;span class="arithmatex"&gt;\((-1)^{(p-1)(q-1)/4}\)&lt;/span&gt;. Therefore,&lt;/p&gt;
&lt;div class="arithmatex"&gt;\[
\begin{equation}\label{eisensteins-proof-of-quadratic-reciprocity-eq-4}
\left(\frac{q}{p}\right) = (-1)^{(p-1)(q-1)/4}\left(\frac{p}{q}\right)
\end{equation}
\]&lt;/div&gt;
&lt;p&gt;which is the quadratic reciprocity law.&lt;/p&gt;
&lt;h2&gt;References&lt;/h2&gt;
&lt;ul&gt;
&lt;li&gt;Lemmermeyer, Franz. "Reciprocity Laws: From Euler to Eisenstein". New York, Springer, 2000&lt;/li&gt;
&lt;li&gt;Burton, David M. "Elementary Number Theory". New Delhi, Tata McGraw-Hill Publishing Company Limited, May 1 2006&lt;/li&gt;
&lt;/ul&gt;</content><category term="Number Theory"/><category term="number-theory"/><category term="abstract-algebra"/></entry><entry><title>Simplification of Incomplete Beta Functions</title><link href="https://integralsandseries.in/2020/01/24/hello-world/" rel="alternate"/><published>2020-01-24T07:47:14+00:00</published><updated>2026-10-24T00:00:00+05:30</updated><author><name>Shobhit Bhatnagar</name></author><id>tag:integralsandseries.in,2020-01-24:/2020/01/24/hello-world/</id><summary type="html">&lt;p&gt;Two incomplete beta integrals, evaluated through substitutions and the addition formulas for the Weierstrass elliptic function.&lt;/p&gt;</summary><content type="html">&lt;p&gt;We will evaluate two algebraic integrals by rewriting them as incomplete beta functions. The first yields to a pair of substitutions; the second leads to the addition and duplication formulas for the Weierstrass elliptic function.&lt;/p&gt;
&lt;div class="arithmatex"&gt;\[
\begin{align}
\int_0^1\frac{dx}{\sqrt{1-x}\sqrt[6]{9-x}\sqrt[3]x}&amp;amp;=\frac\pi{\sqrt3} \label{hello-world-eq-1}\\
\int_0^1\frac{dx}{\sqrt{1-x}\sqrt[4]x\sqrt[4]{2-x\sqrt3}} &amp;amp;= \frac{2\sqrt{2}\pi}{3\sqrt[8]{3}} \label{hello-world-eq-2}
\end{align}
\]&lt;/div&gt;
&lt;p&gt;These problems are from a &lt;a href="https://math.stackexchange.com/questions/541135/conjecture-int-01-frac-mathrm-dx-sqrt1-x-sqrt4x-sqrt42-x-sqrt"&gt;math.stackexchange.com&lt;/a&gt; question posted by &lt;a href="https://math.stackexchange.com/users/19661/vladimir-reshetnikov?tab=questions"&gt;Vladimir Reshetnikov&lt;/a&gt;.&lt;/p&gt;
&lt;h2&gt;Alternate forms&lt;/h2&gt;
&lt;p&gt;The equations &lt;span class="arithmatex"&gt;\(\eqref{hello-world-eq-1}\)&lt;/span&gt; and &lt;span class="arithmatex"&gt;\(\eqref{hello-world-eq-2}\)&lt;/span&gt; can be expressed in terms of the incomplete beta function using some elementary hypergeometric identities. This makes our problems equivalent to proving that&lt;/p&gt;
&lt;div class="arithmatex"&gt;\[
\begin{align}
B\left(\frac{1}{9};\frac{1}{6},\frac{1}{3}\right) &amp;amp;= \frac{\sqrt{3}}{2^{\frac{4}{3}}\pi}\Gamma\left(\frac{1}{3}\right)^3 \label{hello-world-eq-3}\\
B\left(\frac{\sqrt{3}}{2};\frac{1}{4},\frac{1}{4}\right) &amp;amp;= \frac{2}{3\sqrt{\pi}}\Gamma\left(\frac{1}{4}\right)^2 \label{hello-world-eq-4}
\end{align}
\]&lt;/div&gt;
&lt;p&gt;&lt;strong&gt;Proof of &lt;span class="arithmatex"&gt;\(\eqref{hello-world-eq-3}\)&lt;/span&gt;&lt;/strong&gt;&lt;/p&gt;
&lt;div class="arithmatex"&gt;\[
B\left(\frac{1}{9};\frac{1}{6},\frac{1}{3}\right)  = \int_0^{\frac{1}{9}}x^{-\frac{5}{6}}\left( 1-x\right)^{-\frac{2}{3}} dx
\]&lt;/div&gt;
&lt;p&gt;Substitute &lt;span class="arithmatex"&gt;\(x=\frac{y^3}{1+y^3}\)&lt;/span&gt; in the above integral to get&lt;/p&gt;
&lt;div class="arithmatex"&gt;\[
B\left(\frac{1}{9};\frac{1}{6},\frac{1}{3}\right) =3\int_0^{\frac{1}{2}}\frac{1}{\sqrt{y+y^4}}dy
\]&lt;/div&gt;
&lt;p&gt;We can now transform this integral into a beta integral using the substitution &lt;span class="arithmatex"&gt;\(y=\frac{1-z}{2+z}\)&lt;/span&gt;.&lt;/p&gt;
&lt;div class="arithmatex"&gt;\[
B\left(\frac{1}{9};\frac{1}{6},\frac{1}{3}\right)  =3\int_0^1\frac{1}{\sqrt{1-z^3}}dz = B\left( \frac{1}{3},\frac{1}{2}\right)=\frac{\sqrt{3}}{2^{\frac{4}{3}}\pi}\Gamma\left(\frac{1}{3}\right)^3
\]&lt;/div&gt;
&lt;p&gt;This proves equations &lt;span class="arithmatex"&gt;\(\eqref{hello-world-eq-1}\)&lt;/span&gt; and &lt;span class="arithmatex"&gt;\(\eqref{hello-world-eq-3}\)&lt;/span&gt;.&lt;/p&gt;
&lt;h2&gt;Proof of &lt;span class="arithmatex"&gt;\(\eqref{hello-world-eq-4}\)&lt;/span&gt;&lt;/h2&gt;
&lt;p&gt;The proof of integrals &lt;span class="arithmatex"&gt;\(\eqref{hello-world-eq-2}\)&lt;/span&gt; and &lt;span class="arithmatex"&gt;\(\eqref{hello-world-eq-4}\)&lt;/span&gt; is more involved. Using the substitution &lt;span class="arithmatex"&gt;\(x=\frac{4t^2}{1+4t^2}\)&lt;/span&gt;, the integral transforms into the Weierstrass form:&lt;/p&gt;
&lt;div class="arithmatex"&gt;\[
B\left(\frac{\sqrt{3}}{2};\frac{1}{4},\frac{1}{4}\right) =\int_0^{\frac{\sqrt{3}}{2}}x^{-\frac{3}{4}}(1-x)^{-\frac{3}{4}}dx=2\sqrt{2} \int_0^\alpha \frac{dt}{\sqrt{4t^3+t}}
\]&lt;/div&gt;
&lt;p&gt;where &lt;span class="arithmatex"&gt;\(\alpha=\frac{\sqrt{3+2\sqrt{3}}}{2}\)&lt;/span&gt;. Let &lt;span class="arithmatex"&gt;\(\wp(z)\)&lt;/span&gt; denote the Weierstrass Elliptic function with invariants &lt;span class="arithmatex"&gt;\(g_2=-1\)&lt;/span&gt; and &lt;span class="arithmatex"&gt;\(g_3=0\)&lt;/span&gt;. &lt;span class="arithmatex"&gt;\(\wp(z)\)&lt;/span&gt; satisfies the differential equation:&lt;/p&gt;
&lt;div class="arithmatex"&gt;\[
\wp'(z)^2=4\wp(z)^3+\wp(z)
\]&lt;/div&gt;
&lt;p&gt;The half periods are &lt;span class="arithmatex"&gt;\(\omega_1=\frac{1+i}{4}L\)&lt;/span&gt; and &lt;span class="arithmatex"&gt;\(\omega_2=\frac{-1+i}{4}L\)&lt;/span&gt; where &lt;span class="arithmatex"&gt;\(L=\frac{1}{\sqrt{2\pi}}\Gamma\left(\frac{1}{4}\right)^2\)&lt;/span&gt; is the Lemniscate constant. Now, we can express our integral as follows:&lt;/p&gt;
&lt;div class="arithmatex"&gt;\[
B\left(\frac{\sqrt{3}}{2};\frac{1}{4},\frac{1}{4}\right) =2\sqrt{2}\left(\wp^{-1}(0)-\wp^{-1}(\alpha) \right)
\]&lt;/div&gt;
&lt;p&gt;Note that the following identity is easy to prove using the beta function:&lt;/p&gt;
&lt;div class="arithmatex"&gt;\[
\int_0^\infty \frac{dt}{\sqrt{4t^3+t}}=\frac{1}{2\sqrt{2\pi}}\Gamma\left(\frac{1}{4}\right)^2=\frac{L}{2}
\]&lt;/div&gt;
&lt;p&gt;Therefore, &lt;span class="arithmatex"&gt;\(\wp^{-1}(0)=\frac{L}{2}\)&lt;/span&gt;. To prove the claim we only need to prove that &lt;span class="arithmatex"&gt;\(\wp\left(\frac{L}{6}\right)=\alpha\)&lt;/span&gt;. Using the addition theorem of &lt;span class="arithmatex"&gt;\(\wp(z)\)&lt;/span&gt; and the fact that &lt;span class="arithmatex"&gt;\(\wp\left(\frac{L}{2}\right)=0\)&lt;/span&gt; we get:&lt;/p&gt;
&lt;div class="arithmatex"&gt;\[
\begin{equation}\label{hello-world-eq-5}
\begin{aligned}
\wp\left(\frac{L}{6}\right) &amp;amp;= \wp\left(\frac{L}{2}-\frac{L}{3}\right)\\
&amp;amp;= \frac{1}{4}\left(\frac{\wp'\left(\frac{L}{3}\right)}{\wp\left(\frac{L}{3}\right)} \right)^2-\wp\left(\frac{L}{3}\right) \\
&amp;amp;= \frac{4\wp\left( \frac{L}{3}\right)^3+\wp\left(\frac{L}{3}\right)}{4\wp\left(\frac{L}{3}\right)^2}-\wp\left(\frac{L}{3}\right)\\
&amp;amp;= \frac{1}{4\wp\left(\frac{L}{3}\right)}
\end{aligned}
\end{equation}
\]&lt;/div&gt;
&lt;p&gt;On the other hand, by the duplication theorem:&lt;/p&gt;
&lt;div class="arithmatex"&gt;\[
\begin{equation}\label{hello-world-eq-6}
\begin{aligned} \wp\left(\frac{L}{3}\right)&amp;amp;= \frac{1}{4}\frac{\left(6\wp\left(\frac{L}{6}\right)^2+\frac{1}{2}\right)^2}{4\wp\left(\frac{L}{6}\right)^3+\wp\left(\frac{L}{6}\right)}-2\wp\left(\frac{L}{6}\right) \end{aligned}
\end{equation}
\]&lt;/div&gt;
&lt;p&gt;Combine equations &lt;span class="arithmatex"&gt;\(\eqref{hello-world-eq-5}\)&lt;/span&gt; and &lt;span class="arithmatex"&gt;\(\eqref{hello-world-eq-6}\)&lt;/span&gt; to get:&lt;/p&gt;
&lt;div class="arithmatex"&gt;\[
\frac{1+4\wp\left(\frac{L}{6}\right)^2}{\left(6\wp\left(\frac{L}{6}\right)^2+\frac{1}{2} \right)^2-32\wp\left(\frac{L}{6}\right)^4-8\wp\left(\frac{L}{6}\right)^2}=1 \\
\implies 16\wp\left(\frac{L}{6}\right)^4-24\wp\left(\frac{L}{6}\right)^2-3=0
\]&lt;/div&gt;
&lt;p&gt;Since &lt;span class="arithmatex"&gt;\(\wp\left( \frac{L}{6}\right)\)&lt;/span&gt; is positive, we conclude that&lt;/p&gt;
&lt;div class="arithmatex"&gt;\[
\wp\left(\frac{L}{6}\right)=\frac{\sqrt{3+2\sqrt{3}}}{2}
\]&lt;/div&gt;
&lt;p&gt;This completes our proof of equation &lt;span class="arithmatex"&gt;\(\eqref{hello-world-eq-4}\)&lt;/span&gt; and &lt;span class="arithmatex"&gt;\(\eqref{hello-world-eq-2}\)&lt;/span&gt;.&lt;/p&gt;</content><category term="Elliptic Functions and Integrals"/><category term="elliptic-integrals"/><category term="elliptic-functions"/><category term="beta-function"/></entry></feed>