math and physics play

Evaluating some real trig integrals with unit circle contours.

January 19, 2025 math and physics play No comments , , , , ,

[Click here for a PDF version of this post]

Here are a couple of problems from [1].

A sine integral.

This is problem (31(a)). For \( a > b > 0 \), find
\begin{equation}\label{eqn:unitCircleContourIntegrals:20}
I = \int_0^{2 \pi} \frac{d\theta}{a + b \sin\theta}.
\end{equation}
We can proceed by making a change of variables \( z = e^{i\theta} \), for which \( dz = i z d\theta \). Also let \( \alpha = a/b \), so
\begin{equation}\label{eqn:unitCircleContourIntegrals:40}
\begin{aligned}
I
&= \inv{b} \oint_{\Abs{z} = 1} \frac{-i dz}{z} \inv{\alpha + (1/2i)\lr{z – 1/z}} \\
&= \frac{2}{b} \oint_{\Abs{z} = 1} \frac{dz}{2 i z \alpha + z^2 – 1} \\
&= \frac{2}{b} \oint_{\Abs{z} = 1} \frac{dz}{\lr{ z + i \alpha + i\sqrt{\alpha^2 – 1}}\lr{ z + i \alpha – i\sqrt{\alpha^2 – 1}}}.
\end{aligned}
\end{equation}
Clearly the mixed sign factor represents the pole that falls within the unit circle, so we have only one residue to include
\begin{equation}\label{eqn:unitCircleContourIntegrals:60}
\begin{aligned}
I
&= \frac{2}{b} 2 \pi i \evalbar{ \inv{ z + i \alpha + i\sqrt{\alpha^2 – 1}} }{ z = -i \alpha + i \sqrt{ \alpha^2 – 1 } } \\
&= \frac{4 \pi i}{b} \inv{ 2 i \sqrt{\alpha^2 – 1}} \\
&= \frac{2 \pi}{\sqrt{a^2 – b^2}}.
\end{aligned}
\end{equation}

Sines and cosines upstairs and downstairs.

This is problem (31(b)). Given \( a > b > 0 \) (again), this time we want to find
\begin{equation}\label{eqn:unitCircleContourIntegrals:80}
I = \int_0^{2 \pi} \frac{\sin^2 \theta d\theta}{a + b \cos\theta}.
\end{equation}
We’d like to make the same \( z = e^{i \theta} \) substitution, but have to prepare a bit. We rewrite the sine
\begin{equation}\label{eqn:unitCircleContourIntegrals:100}
\begin{aligned}
\sin^2 \theta
&= \inv{2} \lr{ 1 – \cos(2\theta) } \\
&= \inv{2} – \inv{4}\lr{ e^{2 i \theta} + e^{-2 i \theta} },
\end{aligned}
\end{equation}
so, again setting \( \alpha = a/b \), we have
\begin{equation}\label{eqn:unitCircleContourIntegrals:120}
\begin{aligned}
I
&= \inv{b} \oint_{\Abs{z} = 1} \lr{ \inv{2} – \inv{4}\lr{ z^2 + 1/z^2 } } \frac{-i dz}{z} \inv{\alpha + (1/2)\lr{ z + 1/z} } \\
&= \frac{-i}{2 b} \oint_{\Abs{z} = 1} \lr{ 2 – z^2 – \inv{z^2} } \frac{dz}{ 2 \alpha z + z^2 + 1 } \\
&= \frac{-i}{2 b} \oint_{\Abs{z} = 1} dz \frac{ 2 z^2 – z^4 – 1 }{ z^2 \lr{ 2 \alpha z + z^2 + 1} } \\
&= \frac{-i}{2 b} \oint_{\Abs{z} = 1} dz \frac{ 2 z^2 – z^4 – 1 }{ z^2 \lr{ z + \alpha + \sqrt{ \alpha^2 – 1} }\lr{ z + \alpha – \sqrt{ \alpha^2 – 1} } }.
\end{aligned}
\end{equation}
The enclosed poles are at \( z = 0 \) (a second order pole) and \( z = -\alpha + \sqrt{ \alpha^2 – 1} \), so the integral is
\begin{equation}\label{eqn:unitCircleContourIntegrals:140}
\begin{aligned}
I
&= \lr{ 2 \pi i } \lr{ \frac{-i}{2 b} } \lr{
\evalbar{ \lr{ \frac{ 2 z^2 – z^4 – 1 }{ 2 \alpha z + z^2 + 1 } }’ }{z = 0}
+
\evalbar{ \frac{ 2 z^2 – z^4 – 1 }{ z^2 \lr{ z + \alpha + \sqrt{ \alpha^2 – 1} } } }{ z = -\alpha + \sqrt{ \alpha^2 – 1} }
}
\end{aligned}
\end{equation}
The derivative residue simplifies to
\begin{equation}\label{eqn:unitCircleContourIntegrals:160}
\begin{aligned}
\evalbar{ \lr{ \frac{ 2 z^2 – z^4 – 1 }{ 2 \alpha z + z^2 + 1 } }’ }{z = 0}
&=
\evalbar{ \frac{ 4 z – 4 z^3 }{2 \alpha z + z^2 + 1} – \frac{ 2 z^2 – z^4 – 1}{\lr{ 2 \alpha z + z^2 + 1 }^2 }\lr{ 2 \alpha + 2 z } }{z = 0} \\
&= 2 \alpha,
\end{aligned}
\end{equation}
whereas the remaining residue is
\begin{equation}\label{eqn:unitCircleContourIntegrals:180}
\evalbar{ -\frac{ \lr{z^2 – 1}^2 }{ z^2 \lr{ 2 \sqrt{ \alpha^2 – 1} } } }{ z = -\alpha + \sqrt{ \alpha^2 – 1} }
=
\evalbar{ -\lr{z – \inv{z}}^2 \inv{ 2 \sqrt{ \alpha^2 – 1} } }{ z = -\alpha + \sqrt{ \alpha^2 – 1} },
\end{equation}
but
\begin{equation}\label{eqn:unitCircleContourIntegrals:220}
\begin{aligned}
\inv{z}
&= \inv{ -\alpha + \sqrt{ \alpha^2 – 1 } } \frac{ \lr{ \alpha + \sqrt{ \alpha^2 – 1 }} }{ \lr{ \alpha + \sqrt{ \alpha^2 – 1 } } } \\
&= \frac{ \alpha + \sqrt{ \alpha^2 – 1 } }{ -\alpha^2 + \lr{ \alpha^2 – 1} } \\
&= -\lr{ \alpha + \sqrt{ \alpha^2 – 1 } },
\end{aligned}
\end{equation}
and
\begin{equation}\label{eqn:unitCircleContourIntegrals:240}
\begin{aligned}
z – \inv{z}
&= -\alpha + \sqrt{ \alpha^2 – 1 } + \alpha + \sqrt{ \alpha^2 – 1 }
&= 2 \sqrt{ \alpha^2 – 1 },
\end{aligned}
\end{equation}
so
\begin{equation}\label{eqn:unitCircleContourIntegrals:260}
\begin{aligned}
\evalbar{ -\frac{ \lr{z^2 – 1}^2 }{ z^2 \lr{ 2 \sqrt{ \alpha^2 – 1} } } }{ z = -\alpha + \sqrt{ \alpha^2 – 1} }
&= – \frac{ \lr{ 2 \sqrt{ \alpha^2 – 1 } }^2 }{ 2 \sqrt{ \alpha^2 – 1} } \\
&= – 2 \sqrt{ \alpha^2 – 1 },
\end{aligned}
\end{equation}
for a final answer of
\begin{equation}\label{eqn:unitCircleContourIntegrals:200}
\begin{aligned}
I
&= \frac{2 \pi}{b} \lr{ \alpha – \sqrt{\alpha^2 – 1} } \\
&= \frac{2 \pi}{b^2} \lr{ a – \sqrt{a^2 – b^2} }.
\end{aligned}
\end{equation}

Another cosine integral.

Last problem of this sort (31 (c)), was to find, again with \( a > b > 0 \)
\begin{equation}\label{eqn:unitCircleContourIntegrals:280}
I = \int_0^{2 \pi} \frac{ d\theta} {\lr{ a + b \cos \theta }^2 }.
\end{equation}
Making our \( z = e^{i \theta} \) substitution, and setting \( \alpha = a/b \), we have
\begin{equation}\label{eqn:unitCircleContourIntegrals:300}
\begin{aligned}
I &= \inv{b^2} \oint_{\Abs{z} = 1} \frac{ -i dz/z} {\lr{ \alpha + (1/2)\lr{ z + 1/z } }^2 } \\
&= \frac{-4 i}{b^2} \oint_{\Abs{z} = 1} \frac{ z dz}{\lr{ 2 \alpha z + z^2 + 1 }^2 } \\
&= \frac{-4 i}{b^2} \oint_{\Abs{z} = 1} \frac{ z dz}{\lr{ z + \alpha + \sqrt{\alpha^2 – 1} }^2\lr{ z + \alpha – \sqrt{\alpha^2 – 1} }^2}.
\end{aligned}
\end{equation}
Again, only this mixed sign pole will be within the unit circle, so
\begin{equation}\label{eqn:unitCircleContourIntegrals:320}
\begin{aligned}
I
&= \lr{\frac{-4 i}{b^2} }\lr{ 2 \pi i }
\lr{
\evalbar{ \lr{ \frac{z}{\lr{ z + \alpha + \sqrt{\alpha^2 – 1} }^2} }’ }{z = -\alpha + \sqrt{\alpha^2 – 1} }
}
\end{aligned}
\end{equation}

That derivative is
\begin{equation}\label{eqn:unitCircleContourIntegrals:340}
\begin{aligned}
\lr{ \frac{z}{\lr{ z + \alpha + \sqrt{\alpha^2 – 1} }^2} }’
&=
\inv{\lr{ z + \alpha + \sqrt{\alpha^2 – 1} }^2} – \frac{2 z}{\lr{ z + \alpha + \sqrt{\alpha^2 – 1} }^3} \\
&= \frac{z + \alpha + \sqrt{\alpha^2 – 1} – 2 z}{\lr{ z + \alpha + \sqrt{\alpha^2 – 1} }^3} \\
&= \frac{-z + \alpha + \sqrt{\alpha^2 – 1}}{\lr{ z + \alpha + \sqrt{\alpha^2 – 1} }^3}.
\end{aligned}
\end{equation}
Evaluating it at our pole \( z = -\alpha + \sqrt{\alpha^2 – 1} \), we have
\begin{equation}\label{eqn:unitCircleContourIntegrals:360}
\begin{aligned}
\frac{-z + \alpha + \sqrt{\alpha^2 – 1}}{\lr{ z + \alpha + \sqrt{\alpha^2 – 1} }^3}
&=
\frac{ \alpha – \sqrt{\alpha^2 – 1} + \alpha + \sqrt{\alpha^2 – 1}}{\lr{ -\alpha + \sqrt{\alpha^2 – 1} + \alpha + \sqrt{\alpha^2 – 1} }^3} \\
&= \frac{ 2 \alpha }{\lr{ 2 \sqrt{\alpha^2 – 1} }^3 } \\
&= \inv{4} \frac{ \alpha }{\lr{ \alpha^2 – 1}^{3/2} },
\end{aligned}
\end{equation}
so
\begin{equation}\label{eqn:unitCircleContourIntegrals:380}
\begin{aligned}
I
&= \frac{8 \pi}{b^2} \inv{4} \frac{ \alpha }{\lr{ \alpha^2 – 1}^{3/2} } \\
&= \frac{2 \pi a }{b^3 \lr{ \alpha^2 – 1}^{3/2} },
\end{aligned}
\end{equation}
but \( b^3 = \lr{ b^2}^{3/2} \), for
\begin{equation}\label{eqn:unitCircleContourIntegrals:400}
I = \frac{ 2 \pi a }{ \lr{ a^2 – b^2 }^{3/2} }.
\end{equation}

References

[1] F.W. Byron and R.W. Fuller. Mathematics of Classical and Quantum Physics. Dover Publications, 1992.

What will be the value of k to satisfy this integral equation

January 19, 2025 math and physics play No comments , ,

[Click here for a PDF version of this post]

Another problem from x/twitter [1]:

Find \( k \), where
\begin{equation}\label{eqn:trigProp:20}
\int_0^{2 \pi} \sin^4 x dx = k \int_0^{\pi/2} \cos^4 x dx.
\end{equation}
I initially misread the integration range in the second integral as \( 2 \pi \), not \( \pi/2 \), in which case the answer is just 1 by inspection. However, solving the stated problem, is not much more difficult.

Since sine and cosine are equal up to a shift by \( \pi/2 \)
\begin{equation}\label{eqn:trigProp:40}
\sin(u + \pi/2) = \frac{e^{i(u + \pi/2)} – e^{-i(u + \pi/2)}}{2i} = \frac{e^{i u} + e^{-i u}}{2} = \cos u,
\end{equation}
we can make an \( x = u + \pi/2 \) substitution in the sine integral.

Observe that \( \cos^4 x = \Abs{\cos x}^4 \), but the area under \( \Abs{\cos x} \) is the same for each \( \pi/2 \) interval. This is shown in fig. 1.

fig. 1. Plot of |cos x|

Of course, the area under \( \cos^4 x \), will also have the same periodicity, but those regions will be rounded out by the power operation, as shown in fig. 2.

fig. 2. Plot of cos^4 x.

Since the area under \( \cos^4 x \) is the same for each \( \pi/2 \) wide interval, we have
\begin{equation}\label{eqn:trigProp:60}
\boxed{
k = 4.
}
\end{equation}

References

[1] CalcInsights. What will be the value of k to satisfy this integral equation, 2025. URL https://x.com/CalcInsights_/status/1880932308108341443. [Online; accessed 19-Jan-2025].

A fun ellipse related integral.

January 18, 2025 math and physics play No comments , , ,

[Click here for a PDF version of this post]

Motivation.

This was a problem I found on twitter ([2])

Find
\begin{equation}\label{eqn:ellipicalIntegral:20}
I = \int_0^\pi \frac{dx}{a^2 \cos^2 x + b^2 \sin^2 x}.
\end{equation}

I posted my solution there (as a screenshot), but had a sign wrong. Here’s a correction.

Solution.

Let’s first assume we aren’t interested in the \( a^2 = b^2 \), nor either of the \( a = 0, b = 0\) cases (if either of \( a, b \) is zero, then the integral is divergent.)

We can make a couple simple transformations to start with
\begin{equation}\label{eqn:ellipicalIntegral:40}
\begin{aligned}
\cos^2 x &= \frac{\cos(2x) + 1}{2} \\
\sin^2 x &= \frac{1 – \cos(2x)}{2},
\end{aligned}
\end{equation}
and then \( u = 2 x \), for \( dx = du/2 \)
\begin{equation}\label{eqn:ellipicalIntegral:60}
\begin{aligned}
I
&= \int_0^{2\pi} 2 \frac{du/2}{a^2 \lr{ 1 + \cos u } + b^2 \lr{1 – \cos u}} \\
&= \int_0^{2\pi} \frac{du}{ \lr{ a^2 – b^2 } \cos u + a^2 + b^2 }.
\end{aligned}
\end{equation}
There is probably a simple way to evaluate this integral, but let’s try it the fun way, using contour integration. Following examples from [1], let \( z = e^{i u} \), where \( dz = i z du \), and \( \alpha = \lr{ a^2 + b^2 }/\lr{ a^2 – b^2 } \), for
\begin{equation}\label{eqn:ellipicalIntegral:80}
\begin{aligned}
I
&= \oint_{\Abs{z} = 1} \frac{dz/(i z)}{ \lr{ a^2 – b^2 } \lr{ z + \inv{z}}/2 + a^2 + b^2 } \\
&= \frac{2}{i \lr{ a^2 – b^2 }} \oint_{\Abs{z} = 1} \frac{dz}{ z \lr{ z + \inv{z} + 2 \alpha} } \\
&= \frac{2}{i \lr{ a^2 – b^2 }} \oint_{\Abs{z} = 1} \frac{dz}{ z^2 + 2 \alpha z + 1 } \\
&= \frac{2}{i \lr{ a^2 – b^2 }} \oint_{\Abs{z} = 1} \frac{dz}{ \lr{ z + \alpha – \sqrt{\alpha^2 – 1}}\lr{ z + \alpha + \sqrt{\alpha^2 – 1}} }.
\end{aligned}
\end{equation}

There is a single enclosed pole on the real axis. For \( a^2 > b^2 \) where \( \alpha > 0 \) that pole is at \( z = -\alpha + \sqrt{ \alpha^2 – 1} \), so the integral is
\begin{equation}\label{eqn:ellipicalIntegral:100}
\begin{aligned}
I
&= 2 \pi i \frac{2}{i \lr{ a^2 – b^2 }} \evalbar{ \frac{1}{ z + \alpha + \sqrt{\alpha^2 – 1 } }}{z = -\alpha + \sqrt{ \alpha^2 – 1}} \\
&= \frac{4 \pi}{ a^2 – b^2 } \frac{1}{ 2 \sqrt{\alpha^2 – 1 } } \\
&= \frac{4 \pi }{ 2 \sqrt{\lr{a^2 + b^2}^2 – \lr{a^2 – b^2}^2 } } \\
&= \frac{2 \pi }{ \sqrt{4 a^2 b^2 } } \\
&= \frac{\pi }{ \Abs{ a b } },
\end{aligned}
\end{equation}
and for \( a^2 < b^2 \) where \( \alpha < 0 \), the enclosed pole is at \( z = -\alpha – \sqrt{ \alpha^2 – 1} \), where
\begin{equation}\label{eqn:ellipicalIntegral:120}
\begin{aligned}
I
&= 2 \pi i \frac{2}{i \lr{ a^2 – b^2 }} \evalbar{ \frac{1}{ z + \alpha – \sqrt{\alpha^2 – 1 } }}{z = -\alpha – \sqrt{ \alpha^2 – 1}} \\
&= \frac{4 \pi}{ a^2 – b^2 } \frac{1}{ -2 \sqrt{\alpha^2 – 1 } } \\
&= \frac{4 \pi}{ b^2 – a^2 } \frac{1}{ 2 \sqrt{\alpha^2 – 1 } } \\
&= \frac{4 \pi }{ 2 \sqrt{\lr{a^2 + b^2}^2 – \lr{b^2 – a^2}^2 } } \\
&= \frac{2 \pi }{ \sqrt{4 a^2 b^2 } } \\
&= \frac{\pi }{ \Abs{ a b } }.
\end{aligned}
\end{equation}
Observe that this also holds for the \( a = b \) case.

References

[1] F.W. Byron and R.W. Fuller. Mathematics of Classical and Quantum Physics. Dover Publications, 1992.

[2] CalcInsights. A decent integral problem to try out, 2025. URL https://x.com/CalcInsights_/status/1880110549146431780. [Online; accessed 18-Jan-2025].

Sum of squares and cubes, using difference calculus.

January 17, 2025 math and physics play No comments , , , ,

[Click here for a PDF version of this post]

Motivation.

I showed Karl Gauss’s trick for summing a \( 1, 2, \cdots, n \) sequence. Add it up twice, reversing the sum and adding by columns
\begin{equation}\label{eqn:sumOfSquares:21}
\begin{array}{c|c|c|c|c}
1 & 2 & \cdots & n-1 & n \\
n & n-1 & \cdots & 2 & 1
\end{array}
\end{equation}
We get \( n + 1 \), \( n \) times, so
\begin{equation}\label{eqn:sumOfSquares:41}
\sum_{k = 1}^n k = \frac{n}{2}\lr{ n + 1 }.
\end{equation}

Karl pointed out to me that he’d looked up the formula for the sum of squares, and found
\begin{equation}\label{eqn:sumOfSquares:61}
\sum_{k = 1}^n k^2 = \frac{n}{6}\lr{ 2 n + 1 }\lr{ n + 1 }.
\end{equation}

I couldn’t think of some equivalent of the Guassian trick to sum that, but had the vague memory that we could figure it out using difference calculus. I have a little Dover book [1] on the subject that I read some of when I was in school. Without resorting to that book, I tried to dredge up the memory of how this result could be derived.

Difference operator.

The key is defining a difference operator, akin to a derivative

Definition 1.1: Difference operator (reverse.)

Given a sequence \( y_n \), let
\begin{equation*}
\Delta y_n = y_n – y_{n-1}.
\end{equation*}

It’s also possible to define forward difference operators \( \Delta y_n = y_{n+1} – y_n \), or both, and it turns out that the text uses forward differences. I’ll use reverse difference operator here, since that’s what I tried. The ideas should hold either way.

We can apply the difference operator to some simple sequences, such as \( y_n = \textrm{constant}, y_n = n, y_n = n^2, \cdots \). For those, we find
\begin{equation}\label{eqn:sumOfSquares:81}
\begin{aligned}
\Delta 1
&= 0 \\
\Delta n
&= n – \lr{ n – 1} \\
&= 1 \\
\Delta n^2
&= n^2 – \lr{ n – 1}^2 \\
&= 2 n – 1 \\
\Delta n^3
&= n^3 – \lr{ n – 1}^3 \\
&= 3 n^2 – 3 n + 1.
\end{aligned}
\end{equation}
Rearranging, we find
\begin{equation}\label{eqn:sumOfSquares:101}
\begin{aligned}
1 &= \Delta n \\
n &= \inv{2} \lr{ \Delta n^2 + 1 } \\
&= \inv{2} \lr{ \Delta n^2 + \Delta n } \\
&= \inv{2} \Delta \lr{ n^2 + n } \\
n^2
&= \inv{3} \lr{ \Delta n^3 + 3 n – 1 } \\
&= \inv{3} \lr{ \Delta n^3 + \frac{3}{2} \Delta \lr{ n^2 + n } – \Delta n } \\
&= \inv{6} \Delta \lr{ 2 n^3 + 3 \lr{ n^2 + n } – 2 n } \\
&= \inv{6} \Delta \lr{ 2 n^3 + 3 n^2 + n }.
\end{aligned}
\end{equation}

Sum of squares.

We can now proceed to find the difference of our sum of squares sequence. Let
\begin{equation}\label{eqn:sumOfSquares:121}
y_n = \sum_{k = 1}^n k^2,
\end{equation}
for which we have
\begin{equation}\label{eqn:sumOfSquares:141}
\Delta y_n = n^2 = \Delta \frac{2 n^3 + 3 n^2 + n }{6}.
\end{equation}
Akin to integrating, we’ve determined \( y_n \) up to a constant
\begin{equation}\label{eqn:sumOfSquares:161}
y_n = \frac{2 n^3 + 3 n^2 + n }{6} + C,
\end{equation}
but since \( y_1 = 1 \), and
\begin{equation}\label{eqn:sumOfSquares:181}
y_1 = \frac{2 \times 1^3 + 3 \times 1^2 + 1 }{6} + C = 1 + C,
\end{equation}
so \( C = 0 \). We need only factor to find the desired result
\begin{equation}\label{eqn:sumOfSquares:201}
\sum_{k = 1}^n k^2 = \frac{n}{6}\lr{ 2 n + 1 }\lr{ n + 1 }.
\end{equation}

Sum of cubes.

Let’s also apply this to compute a formula for the sum of cubes. We need one more difference computation

\begin{equation}\label{eqn:sumOfSquares:221}
\begin{aligned}
\Delta n^4
&= n^4 – \lr{ n – 1 }^4 \\
&= 4 n^3 – 6 n^2 + 4 n – 1,
\end{aligned}
\end{equation}
or
\begin{equation}\label{eqn:sumOfSquares:241}
\begin{aligned}
n^3 &= \inv{4} \lr{ \Delta n^4 + 6 n^2 – 4 n + 1 } \\
&= \inv{4} \lr{ \Delta n^4 + \Delta \lr{ 2 n^3 + 3 n^2 + n } – 2 \Delta \lr{ n^2 + n } + \Delta n } \\
&= \inv{4} \Delta \lr{ n^4 + 2 n^3 + n^2 },
\end{aligned}
\end{equation}
so
\begin{equation}\label{eqn:sumOfSquares:261}
\sum_{k=1}^n n^3 = \inv{4} \lr{ n^4 + 2 n^3 + n^2 } + C,
\end{equation}
but we see that \( C = 0 \) is required to satisfy the \( n = 1 \) case. That is
\begin{equation}\label{eqn:sumOfSquares:281}
\sum_{k=1}^n n^3 = \inv{4} n^2 \lr{ n + 1 }^2.
\end{equation}

Difference calculus is a pretty fun tool!

References

[1] Hyman Levy and Freda Lessman. Finite difference equations. Courier Corporation, 1992.

Evaluating a sum using a contour integral.

December 18, 2024 math and physics play , , , , , , , , ,

[Click here for a PDF version of this post]

One of my favorite Dover books, [1], is a powerhouse of a reference, and has a huge set of the mathematical tricks and techniques.  Probably most of the tricks that any engineer or physicist would ever want.

Reading it a bit today, I encountered the following interesting looking theorem for evaluating sums using contour integrals.

Theorem 1.1:

Given a meromorphic function \( f(z) \) that shares no poles with \( \cot( \pi z ) \), where \( C \) encloses the zeros of \( \sin( \pi z \), located at \( z = a, a+1, \cdots b \), then
\begin{equation*}
\sum_{m=a}^b f(m) = \inv{2 \pi i} \oint_C \pi \cot( \pi z ) f(z) dz -\quad \sum_{\mbox{poles of \( f(z) \) in \( C \)}} \mathrm{Res}\lr{ \pi \cot( \pi z ) f(z) }.
\end{equation*}

The enclosing contour may look like fig. 1.

fig. 1. Sample contour

Start proof:

We basically want to evaluate
\begin{equation}\label{eqn:sumUsingContour:20}
\oint_C \pi \cot( \pi z ) f(z) dz,
\end{equation}
using residues. To see why this works, observe that \( \cot( \pi z ) \) is periodic, as plotted in fig. 2.

fig. 2. Cotangent.

In particular, if \( z = m + \epsilon \), we have
\begin{equation}\label{eqn:sumUsingContour:40}
\begin{aligned}
\cot(\pi z)
&= \frac{\cos(\pi(m + \epsilon))}{\sin(\pi(m + \epsilon))} \\
&= \frac{(-1)^m \cos(\pi \epsilon)}{(-1)^m \sin(\pi \epsilon)} \\
&= \cot(\pi \epsilon).
\end{aligned}
\end{equation}
The residue of \( \pi \cot(\pi z) \), at \( z = 0 \), or at any other integer point, is
\begin{equation}\label{eqn:sumUsingContour:60}
\frac{\pi}{
\pi z – (\pi z)^3/6 + \cdots
}
= 1.
\end{equation}
This means that we have
\begin{equation}\label{eqn:sumUsingContour:80}
\oint_C \pi \cot( \pi z ) f(z) dz = 2 \pi i \sum_{m = a}^b f(m) + 2 \pi i \quad \sum_{\mbox{poles of \( f(z) \) in \( C \)}} \mathrm{Res}\lr{ \pi \cot( \pi z ) f(z) }.
\end{equation}
We just have to rearrange and scale to complete the proof.

End proof.

In the book the sample application was to use this to show that
\begin{equation}\label{eqn:sumUsingContour:100}
\coth x – \inv{x} = \sum_{m=1}^\infty \frac{2x}{x^2 + m^2 \pi^2}.
\end{equation}
That’s then integrated to show that
\begin{equation}\label{eqn:sumUsingContour:120}
\frac{\sinh x}{x} = \prod_{m = 1}^\infty \lr{ 1 + \frac{x^2}{m^2 \pi^2} },
\end{equation}
or with \( x = i \theta \),
\begin{equation}\label{eqn:sumUsingContour:140}
\sin \theta = \theta \prod_{m = 1}^\infty \lr{ 1 – \frac{\theta^2}{m^2 \pi^2} },
\end{equation}
and finally equating \( \theta^3 \) terms in this infinite product, we find
\begin{equation}\label{eqn:sumUsingContour:160}
\sum_{m = 1}^\infty \inv{m^2} = \frac{\pi^2}{6},
\end{equation}
which is \( \zeta(2) \), a specific value of the Riemann zeta function.

All this is done in a couple spectacularly dense pages of calculation, and illustrates the kind of gems in this book. At about 700 pages, it’s got a lot of gems.

References

[1] F.W. Byron and R.W. Fuller. Mathematics of Classical and Quantum Physics. Dover Publications, 1992.