# Math 70300

Homework 5
Due: November 14
1. Calculate the integrals using contour integration. Complete explanations are required.
(i)
_

0
dx
x
3
+ 1
(ii)
_

0
cos x
x
2
+ 1
dx, (iii)
_

0
(log x)
2
1 + x
2
dx
(iv)
_

0
cos(ax)
(x
2
+ b
2
)
2
dx (a, b > 0), (v)
_
π/2
0

a + sin
2
θ
(a > 0), (vi)
_

0
x
2
dx
x
4
+ 5x
2
+ 6
(vii)
_

−∞
dx
(1 + x
2
)
n+1
(viii)
_

0
log x
(1 + x
2
)
2
dx (ix)
_

0

(a + cos θ)
2
(a > 1).

3), (ii) πe
−1
/2, (iii) π
3
/8, (iv) π(1+ab)e
−ab
/(4b
3
), (v) π/(2

a
2
+ a),
(vi) (

3−

2)π/2, (vii) 1·3·5 · · · (2n−1)π/(2·4·6 · · · (2n)), (viii) −π/4, (ix) 2πa/(a
2

1)
3/2
.
(i) We consider the contour in Figure 1 and f(z) = 1/(z
3
+ 1). The only pole of the
denominator x
3
+ 1 = (x + 1)(x
2
−x + 1) = (x + 1)(x −e
πi/3
)(x −e
5πi/3
) inside the
contour is e
πi/3
.
Res(f, e
πi/3
) = lim
z→e
πi/3
(z −e
πi/3
)
1
z
3
+ 1
= lim
z→e
πi/3
1
3z
2
=
1
3e
2πi/3
by L’Hˆopital’s rule. We get on the horizontal segment [0, R] that z(x) = x, on the
segment from 0 to Re
2πi/3
that z(x) = xe
2πi/3
, 0 ≤ x ≤ R. The part of the contour
on a circle of radius R is denoted by γ
R
. These give:
_
R
0
dx
x
3
+ 1
+
_
γ
R
dz
z
3
+ 1

_
R
0
e
2πi/3
dx
x
3
e
2πi
+ 1
= 2πiRes(f, e
πi/3
).
Notice that on the slanted segment z
3
= (xe
2πi/3
)
3
= x
3
e
2πi
= x
3
. This is what makes
this the right contour. So we get
_
R
0
dx
x
3
+ 1
+
_
γ
R
dz
z
3
+ 1
−e
2πi/3
_
R
0
dx
x
3
+ 1
=
2πi
3e
2πi/3
.
The integral over γ
R
tends to 0 as R →∞. This is because on γ
R
for R > 1 we have
¸
¸
¸
¸
1
z
3
+ 1
¸
¸
¸
¸

1
R
3
−1
1
Figure 1: Contours for (i) and (ii)
by the triangle inequality (|z
3
+1| ≥ |z|
3
−1 = R
3
−1). On the other hand the length
of the arc is 2πR/3. This gives
_
γ
R
dz
z
3
+ 1

2πR/3
R
3
−1
→0, R →∞.
The result is
_

0
dx
x
3
+ 1
−e
2πi/3
_

0
dx
x
3
+ 1
=
2πi
3e
2πi/3
=⇒
_

0
dx
x
3
+ 1
=
2πi
3e
2πi/3
(1 −e
2πi/3
)
=
2πi
3(e
2πi/3
−e
4πi/3
)
=
2πi
3 · 2i sin(2π/3)
=

3

3
.
(ii) We use the function f(z) = e
iz
/(1 +z
2
) inside the contour in Figure 1. The only
pole is at i with residue
Res(f, i) = lim
z→i
(z −i)
e
iz
(z −i)(z + i)
=
e
ii
2i
=
e
−1
2i
.
We notice that
_
R
−R
e
iz
z
2
+ 1
dz =
_
R
0
e
ix
x
2
+ 1
dx +
_
0
−R
e
ix
x
2
+ 1
dx =
_
R
0
e
ix
x
2
+ 1
dx +
_
R
0
e
−ix
x
2
+ 1
dx
=
_
R
0
e
ix
+ e
−ix
x
2
+ 1
dx = 2
_
R
0
cos x
x
2
+ 1
dx,
with a change on variable x = −y on [−R, 0]. The semicircle is denoted by γ
R
. On
it |e
iz
| = |e
iRe

| = e
−Rsin θ
≤ 1, because θ ∈ [0, π]. This gives
¸
¸
¸
¸
_
γ
R
e
iz
z
2
+ 1
dz
¸
¸
¸
¸

πR
R
2
−1
→0, R →∞,
2
using the triangle inequality in the denominator (|z
2
+ 1| ≥ |z|
2
−1 = R
2
−1). The
result is that
2
_

0
cos x
x
2
+ 1
dx = 2πie
−1
/(2i) = πe
−1
=⇒
_

0
cos x
x
2
+ 1
dx =
πe
−1
2
.
(iii) We use the function
f(z) =
(log z)
2
z
2
+ 1
with log z = log |z| + i arg z, −π/2 < arg z < 3π/2 (non-principal branch of log).
This works on the upper-half plane, where our contour is located, with the exception
of 0. This is why to make the small semicircle γ

part of our contour. There are two
poles of the integrand, but only one i lies inside the contour.
Res(f, i) = lim
z→i
(z −i)
(log z)
2
(z −i)(z + i)
=
(log i)
2
2i
=
(iπ/2)
2
2i
=
−π
2
8i
.
We call the large semicircle γ
R
and the small one γ
r
both traversed in the positive
sense. The residue theorem gives
_
R
r
(log x)
2
x
2
+ 1
dx+
_
γ
R
(log z)
2
z
2
+ 1
dz+
_
−r
−R
(log |x| + iπ)
2
x
2
+ 1
dx−
_
γr
(log z)
2
z
2
+ 1
dz = 2πi
−π
2
8i
= −π
3
/4,
since on the negative real axis x < 0 the argument is π, which gives log x = log |x|+iπ.
On γ
R
we have | log z| = | log R + i arg(z)| ≤ log R + π, therefore,
¸
¸
¸
¸
_
γ
R
(log z)
2
z
2
+ 1
dz
¸
¸
¸
¸
≤ πR
(log R + π)
2
R
2
−1
→0, R →∞,
since log R and its powers grow slower than any power of R. On γ
r
we have | log z| =
| log r + i arg(z)| ≤ log r + π. This gives
¸
¸
¸
¸
_
γr
(log z)
2
z
2
+ 1
dz
¸
¸
¸
¸
≤ πr
(log r + π)
2
1 −r
2
→0, r →0,
since the triangle inequality in the denominator gives |z
2
− 1| ≥ 1 − |z|
2
= 1 − r
2
,
and r log r, r log
2
r tend to 0 for r → 0. If you are not familiar with this, consider
(change variables x = log r)
lim
r→0
r(log r)
k
= lim
x→−∞
e
x
x
k
= lim
x→−∞
x
k
e
−x
= lim
y→∞
(−1)
k
y
k
e
y
= 0,
since e
y
grows more quickly than any power of y. For the integral on the segment on
the negative axis we have by expanding the numerator
_
−r
−R
(log |x| + iπ)
2
1 + x
2
dx =
_
−r
−R
(log |x|)
2
x
2
+ 1
dx + 2πi
_
−r
−R
log |x|
x
2
+ 1
dx −π
2
_
−r
−R
1
x
2
+ 1
dx.
3
We now change variable in the ﬁrst integral x = −y to get
=
_
R
r
(log y)
2
y
2
+ 1
dy + 2πi
_
R
r
log y)
y
2
+ 1
dy −π
2
_
R
r
1
y
2
+ 1
dy
−→
_

0
(log x)
2
x
2
+ 1
dx + 2πi
_

0
log y
1 + y
2
dy −π
2
_

0
1
x
2
+ 1
dx
as r → 0, R → ∞. The last integral is elementary as arctan(x)

= 1/(1 + x
2
) and
gives
_

0
1
x
2
+ 1
dx =
π
2
.
We do not need to worry about the middle integral. It comes with an imaginary
coeﬃcient, while the integral is real. This means that we can take real parts and its
contribution will be zero. Another approach is to notice that the integral is actually
exactly zero:
_

0
log x
x
2
+ 1
dx =
_
1
0
log x
x
2
+ 1
dx+
_

1
log x
x
2
+ 1
dx = −
_

1
log(1/y)
1/y
2
+ 1
−dy
y
2
+
_

1
log x
1 + x
2
dx,
where we changed variables x = 1/y, dx = −dy/y
2
. Finally this gives
_

0
log x
x
2
+ 1
dx = −
_

1
log y
1 + y
2
dy +
_

1
log x
1 + x
2
dx = 0.
Bringing all the results together we get
2
_

0
(log x)
2
x
2
+ 1
dx −π
2
π
2
= −
π
3
4
=⇒
_

0
(log x)
2
x
2
+ 1
dx =
1
2
π
3
4
=
π
3
8
.
(iv) We consider the function
f(z) =
e
iaz
(z
2
+ b
2
)
2
on the contour in Figure 2. There is only one pole inside the contour and this is at
ib. It is a double pole. We calculate the residue
Res(f, ib) = lim
z→ib
d
dz
(z −ib)
2
f(z) = lim
z→ib
d
dz
e
iaz
(z + iab)
2
= lim
z→ib
iae
iaz
(z + ib) −2e
iaz
(z + ib)
3
=
iae
iaib
(2ib) −2e
iaib
(2ib)
3
=
iae
−ab
2ib −2e
−ab
−i8b
3
=
e
−ab
(2ab + 2)
8ib
3
.
We call the semicircular contour γ
R
and estimate the integral over it (R > b) as
¸
¸
¸
¸
_
γ
R
e
iaz
(z
2
+ b
2
)
2
dz
¸
¸
¸
¸
≤ πR
1
(R
2
−b
2
)
2
→0, R →∞,
4
since |e
iaRe

| = e
−aRsin θ
≤ 1 on the contour. We also have, after splitting the integral
on the negative numbers and substituting x = −y,
_
R
−R
e
iax
(x
2
+ b
2
)
2
dx =
_
0
−R
e
iax
(x
2
+ b
2
)
2
dx+
_
R
0
e
iax
(x
2
+ b
2
)
2
dx =
_
R
0
e
−iay
(y
2
+ b
2
)
2
dy+
_
R
0
e
iax
(x
2
+ b
2
)
2
dx
=
_
R
0
e
−iax
+ e
iax
(x
2
+ b
2
)
2
dx = 2
_
R
0
cos(ax)
(x
2
+ b
2
)
2
dx →2
_

0
cos(ax)
(x
2
+ b
2
)
2
dx, R →∞.
We use the residue theorem in the contour of Figure 2, let R →∞ to get
_

0
cos(ax)
(x
2
+ b
2
)
2
dx = 2πi
e
−ab
(2ab + 2)
8ib
3
=
(ab + 1)e
−ab
π
2b
3
.
(iv) Since
_
π/2
0

a + sin
2
θ
=
1
4
_

0

a + sin
2
θ
,
as sin
2
θ takes the same values in every quadrant, we consider the function
f(z) =
1
a +
_
z−z
−1
2i
_
2
1
z
on the contour of Figure 3 |z| = 1. Notice that we substituted sin θ = (z −z
−1
)/(2i),
since on |z| = 1, i.e. z = e

this holds. Moreover, notice that we multiplied with
1/z, so that dz/z = ie

dθ/e

= idθ. We get
f(z) =
1
a −
(z−z
−1
)
2
4
1
z
=
1
a −z
2
/4 −z
−2
/4 + 2/4
1
z
=
4z
(4a + 2)z
2
−z
4
−1
.
We solve the biquadratic equation −z
4
+ (4a + 2)z
2
−1 = 0.
z
2
= 2a + 1 ±
_
(2a + 1)
2
−1 = 2a + 1 ±2

a
2
+ a.
There are two solutions for z
2
but only is inside the circle, since the solutions are
real and positive and their product is 1. Clearly this is the smaller solution b
2
=
2a +1 −2

a
2
+ a. This gives two solutions for z, z = ±b. The poles are simple. We
set c
2
= 2a + 1 + 2

a
2
+ a.
Res(f, b) = lim
z→b
(z −b)4z
−(z
2
−b
2
)(z
2
−c
2
)
= lim
z→b
4z
−(z + b)(z
2
−c
2
)
=
4b
−2b(b
2
−c
2
)
=
1
2

a
2
+ a
Res(f, −b) = lim
z→−b
(z + b)4z
−(z
2
−b
2
)(z
2
−c
2
)
= lim
z→−b
4z
−(z −b)(z
2
−c
2
)
=
−4b
2b(b
2
−c
2
)
=
1
2

a
2
+ a
Using the parametrization z = e

we get
_
|z|=1
f(z)dz =
_

0
f(e

ie

dθ =
_

0
1
a + sin
2
θ
1
e

ie

dθ =
_

0
1
a + sin
2
θ
idθ
5
= 2πi

Res(f, z
j
) = 2πi
1

a
2
+ a
=⇒
_

0
1
a + sin
2
θ
dθ =

a
2
+ a
=⇒
_
π/2
0
1
a + sin
2
θ
dθ =
π
2

a
2
+ a
.
Alternative method:
_
π/2
0

a + sin
2
θ
=
_
π/2
0

a +
1−cos(2θ)
2
= 2
_
π/2
0

(2a + 1) −cos(2θ)
=
_
π
0
dx
(2a + 1) −cos x
=
_
0
−π
dy
(2a + 1) + cos y
,
with the change of variables x = π −y. Now we use the example in p. 155 of Ahlfors:
we take for a the expression 2a + 1 to get
_
0
−π
dy
(2a + 1) + cos y
=
π
_
(2a + 1)
2
−1
=
π

4a
2
+ 4a
.
(vi) We take
f(z) =
z
2
z
4
+ 5z
2
+ 6
on the contour in Figure 3 We have
z
4
+ 5z
2
+ 6 = (z
2
+ 3)(z
2
+ 2) = (z + i

3)(z −i

3)(z + i

2)(z −i

2).
The poles inside the contour are i

2, and i

3.
Res(f, i

2) =
(i

2)
2
(2i

2)((i

2)
2
+ 3)
=
−2
i2

2
=
i

2
2
.
Res(f, i

3) =
(i

3)
2
(2i

3)((i

3)
2
+ 2)
=
−3
−i2

3
=
−i

3
2
.
The function is even so
_
R
−R
f(x)dx = 2
_
R
0
f(x)dx. The residue theorem gives
2
_
R
0
x
2
dx
x
4
+ 5x
2
+ 6
+
_
γ
R
f(z)dz = 2πi
_
i

2
2

i

3
2
_
= 2π
_

3
2

2
2
_
.
The integral over γ
R
tends to zero:
¸
¸
¸
¸
_
γ
R
f(z)dz
¸
¸
¸
¸
≤ πR
R
2
R
4
−5R
2
−6
→0, R →∞,
since |z
4
+ 5z
2
+ 6| ≥ |z
4
| −|5z
2
+ 6| ≥ |z|
4
−5|z|
2
−6. Taking the limit as R →∞
we get
_

0
x
2
dx
x
4
+ 5x
2
+ 6
=
π(

3 −

2)
2
.
6
Alternative method: This integral can be computed without complex integration. We
use partial fractions
x
2
x
4
+ 5x
2
+ 6
=
A
x
2
+ 3
+
B
x
2
+ 2
which gives A + B = 1, 2A + 3B = 0 and, therefore, A = 3, B = −2.
_

0
x
2
dxx
4
+ 5x
2
+ 6 =
_

0
3
x
2
+ 3

2
x
2
+ 2
dx =
_

0
3

3dy
3(y
2
+ 1)
dy−
_

0
2

2dt
2(t
2
+ 1)
=

3
π
2

2
π
2
,
where we substituted x =

3y and x =

2t.
(vii) We consider f(z) = 1/(z
2
+1)
n+1
and the contour of (ii). The only relevant pole
is at i but it is of multiplicity n + 1. We remark that
d
n
dz
n
(z+i)
−n−1
= (−n−1)(−n−2) · · · (−n−n)(z+i)
−n−1−n
= (n+1)(n+2) · · · (2n)(−1)
n
(z+i)
−2n−1
.
This gives
Res(f, i) =
1
n!
d
n
dz
n
_
(z −i)
n+1
1
(z −i)
n+1
(z + i)
n+1
_
|z=i
=
1
n!
(n+1)(n+2) · · · (2n)(−1)
n
(2i)
−2n−1
=
(n + 1)(n + 2) · · · (2n)
n!
(−1)
n
2
−2n−1
(−i)
2n+1
=
(n + 1)(n + 2) · · · (2n)
n!
(−1)
n
1
2
2n+1
(−i)(−1)
n
= −i
(n + 1)(n + 2) · · · (2n)
n!2
2n+1
.
We estimate that the integral over the semicircle γ
R
tends to 0 as R →∞:
¸
¸
¸
¸
_
γ
R
dz
(1 + z
2
)
n+1
¸
¸
¸
¸
≤ πR
1
(R
2
−1)
n+1
→0, R →∞.
The residue theorem gives
_
R
−R
dx
(1 + x
2
)
n+1
+
_
γ
R
dz
(1 + z
2
)
n+1
= 2πiRes(f, i).
Taking the limit as R →∞ we get
_

−∞
dx
(1 + x
2
)
n+1
= 2πi(−i)
(n + 1)(n + 2) · · · 2n
n!2
n+1
= 2π
1 · 2 · · · n(n + 1)(n + 2) · · · (2n)
2
2n
2 · 1 · 2 · · · n · 1 · 2 · · · n
= π
1 · 2 · · · 2n
2 · 4 · · · (2n) · 2 · 4 · · · (2n)
= π
1 · 3 · · · (2n −1)
2 · 4 · · · 2n
.
Alternative method: The substitution x = tan θ gives, as 1 + x
2
= (cos θ)
−2
, dx =
(cos θ)
−2
dθ,
_

−∞
dx
(1 + x
2
)
n+1
=
_
π/2
−π/2
(cos
2
θ)
n+1

cos
2
θ
=
_
π/2
−π/2
(cos θ)
2n
dθ = π
1 · 3 · · · (2n −1)
2 · 4 · · · (2n)
7
by problem 2a in Homework 4. Notice that cos
2
θ takes the same value on any
(viii) We use the same contour as in (iii) and the function
f(z) =
log z
(1 + z
2
)
2
with nonprincipal branch of log z given by
log z = log |z| + i arg z, −π/2 < arg z < 3π/2.
Inside the contour there is a double pole at i. We compute the residue
Res(f, i) = lim
z→i
d
dz
(z −i)
2
log z
(z −i)
2
(z + i)
2
= lim
z→i
z
−2
(z + i) −2 log z
(z + i)
3
=
i
−1
2i −2 log i
(2i)
3
=
2 −2(iπ/2)
−8i
=
2 −iπ
−8i
.
For the integral over γ
R
we have
¸
¸
¸
¸
_
γ
R
log z
(1 + z
2
)
2
dz
¸
¸
¸
¸
≤ πR
log R + π
(R
2
−1)
2
→0, R →∞,
the same way as in (iii). For the integral over γ
r
we have
¸
¸
¸
¸
_
γr
log z
(1 + z
2
)
2
dz
¸
¸
¸
¸
≤ πr
log r + π
(1 −r
2
)
2
→0, r →0.
The residue theorem gives
_
R
r
log xdx
(1 + x
2
)
2
+
_
−r
−R
log |x| + iπ
(1 + x
2
)
2
dx+
_
γ
R
log z
(1 + z
2
)
2
dz+
_
γr
log z
(1 + z
2
)
2
dz = 2πiRes(f, i).
We take the limit as R →∞, r →0 to get
_

0
log xdx
(1 + x
2
)
2
+
_
0
−∞
log |x|
(1 + x
2
)
2
dx + iπ
_
0
−∞
dx
(1 + x
2
)
2
= 2πi
2 −iπ
−8i
=
(iπ −2)π
4
.
We substitute y = −x in the second integral, take real parts (notice that
_
0
−∞
(1 +
x
2
)
−2
dx is real) to get
2
_

0
log x
(1 + x
2
)
2
dx =
−2π
4
=⇒
_

0
log x
(1 + x
2
)
2
dx = −
π
4
.
(ix) We use the same contour as in (v). The function to integrate is
f(z) =
1
(a + (z + z
−1
)/2)
2
1
z
=
4
(2a + z + z
−1
)
2
1
z
=
4z
(z + z
−1
+ 2a)
2
z
2
=
4z
(z
2
+ 2az + 1)
2
.
8
We solve z
2
+ 2az + 1 = 0 by completing the square
(z + a)
2
+ 1 −a
2
= 0 =⇒z + a = ±

a

1 =⇒z
1,2
= −a ±

a
2
−1.
The two roots are real, as a > 1 is given. They have negative sum and product 1.
This means that only one is inside the circle |z| = 1. Call it z
1
= −a+

a
2
−1, while
z
2
= −a −

a
2
−1 < −1. The pole at z
1
is double. We calculate the residue
Res(f, z
1
) = lim
z→z
1
d
dz
(z −z
1
)
2
4z
(z −z
1
)
2
(z −z
2
)
2
= lim
z→z
1
4(z −z
2
) −2 · 4z
(z −z
2
)
3
= lim
z→z
1
−4(z + z
2
)
(z −z
2
)
3
=
−4(z
1
+ z
2
)
(z
1
−z
2
)
3
=
−4(−2a)
(2

a
2
−1)
3
=
a
(a
2
−1)
3/2
.
The residue theorem gives
_
|z|=1
f(z)dz =
_

0
1
(a + cos θ)
2
1
e

ie

dθ = 2πiRes(f, i) =
2πia
(a
2
−1)
3/2
=⇒
_

0
1
(a + cos θ)
2
dθ =
2πa
(a
2
−1)
3/2
.
2. Prove that

n=−∞
1
(u + n)
2
=
π
2
sin
2
(πu)
(u ∈ Z),

n=1
1
n
2
=
π
2
6
,
using the function f(z) =
π cot(πz)
(u + z)
2
integrated over the boundary of the square
[−(N + 1/2), N + 1/2] ×[−(N + 1/2), N + 1/2], N ≥ |u|, N ∈ N. This is one of the
many derivations of the value

1/n
2
, due originally to Euler. The function
g(z) = π cot(πz) =
π cos(πz)
sin(πz)
has poles at n ∈ Z. Since (sin(πz))

= π cos(πz), which does not vanish at the
integers, the poles are simple. We calculate the residues
Res(g, n) = lim
z→n
(z −n)
π cos(πz)
sin(πz)
= lim
z→n
(z −n)π cos(πz)
sin(πz) −sin(πn)
=
π cos πn
π cos πn
= 1,
using the deﬁnition of the derivative of sin(πz) at n. If u ∈ Z, the function
f(z) = g(z)
1
(z + u)
2
has poles at the integers and has an extra pole at −u. This is a double pole with
residue
Res(f, −u) = lim
z→−u
d
dz
(z + u)
2
f(z) = lim
z→−u
g

(z) = lim
z→−u
−π
2
sin
2
(πz)
= −
π
2
sin
2
(πu)
.
9
Moreover,
Res(f, n) =
1
(n + u)
2
, n ∈ Z.
This formula is true for n = 0 and u = 0 as well.
There is a modiﬁcation needed for u = 0: In this case f(z) has a triple pole at 0. We
have
Res(f, 0) =
1
2!
lim
z→0
d
2
dz
2
z
3
π cot(πz)
z
2
=
π
2
lim
z→0
z cos πz
πz −(πz)
3
/6 +· · ·
=
1
2
lim
z→0
cos πz
1 −π
2
z
2
/6 +· · ·
using the Taylor series of sin πz. The easiest way to proceed is to ﬁnd the reciprocal
the power series in the denominator:
_
1 −
π
2
z
2
6
+
π
4
z
4
5!
−· · ·
_
−1
= 1 +
π
2
6
z
2
+· · ·
The technique is to assume that the reciprocal has a power series

a
n
z
n
and match
coeﬃcients.
_
1 −
π
2
z
2
6
+
π
4
z
4
5!
−· · ·
_
_
a
0
+ a
1
z + a
2
z
2
+· · ·
_
= 1
=⇒1 · a
0
= 1, 1 · a
1
+ 0 · a
0
= 0, 1 · a
2

π
2
6
a
0
= 0, . . .
Now we multiply with the Taylor series of cos(πz) and diﬀerentiate twice to get
Res(f, 0) = lim
z→0
1
2
d
2
dz
2
_
1 −
π
2
z
2
2
+· · ·
__
1 +
π
2
z
2
6
+· · ·
_
= lim
z→0
1
2
d
2
dz
2
_
1 + π
2
(−1/2 + 1/6)z
2
+· · ·
_
=
1
2
· 2π
2
(1/6 −1/2) = −
π
2
3
.
The alternative would be successive diﬀerentiation of z
3
f(z), which is not easier.
If we can show that the integrals over the boundary of the square S
R
tend to 0, then
the residue theorem gives (R > |u|):
_
∂S
R
f(z)dz = 2πi
_
_

|n|<R
1
(n + u)
2

π
2
sin
2
(πu)
_
_
=⇒0 =

n∈Z
1
(n + u)
2

π
2
sin
2
(πu)
,
which gives the result for u ∈ Z. If u = 0, the residue theorem gives:
_
∂S
R
f(z)dz = 2πi
_
_

|n|<R,n=0
1
n
2

π
2
3
_
_
10
and ﬁnally
2

n=1
1
n
2
=
π
2
3
=⇒

n=1
1
n
2
=
π
2
6
.
On the line z = N + 1/2 + iy we have
¸
¸
¸
cos πz
sin πz
¸
¸
¸ =
¸
¸
¸
¸
cos(N + 1/2 + iy)π
sin(N + 1/2 + iy)π
¸
¸
¸
¸
=
¸
¸
¸
¸
cos(N + 1/2)π cos(πiy) −sin(N + 1/2)π sin(πiy)
sin(N + 1/2)π cos(πiy) + sin(πiy) cos(N + 1/2)π
¸
¸
¸
¸
=
¸
¸
¸
¸
sin πiy
cos πiy
¸
¸
¸
¸
=
|e
−πy
−e
πy
|
e
−πy
+ e
πy
which is bounded. On the line z = x ±i(N + 1/2) we have
¸
¸
¸
cos πz
sin πz
¸
¸
¸
2
=
¸
¸
¸
¸
cos(x ±i(N + 1/2))π
sin(x ±i(N + 1/2))π
¸
¸
¸
¸
2
=
¸
¸
¸
¸
cos xπ cos(πi(N + 1/2)) ∓sin xπ sin(πi(N + 1/2))
sin xπ cos(πi(N + 1/2)) ±sin(πi(N + 1/2)) cos xπ
¸
¸
¸
¸
2
Since sin πi(N + 1/2) is purely imaginary and
cos πi(N + 1/2) =
e
−π(N+1/2)
+ e
π(N+1/2)
2
= cosh(π(N + 1/2))
sin πi(N + 1/2) =
e
−π(N+1/2)
−e
π(N+1/2)
2i
=
−1
i
sinh(π(N + 1/2))
we get
¸
¸
¸
cos πz
sin πz
¸
¸
¸
2
=
cos
2
(xπ) cosh
2
(π(N + 1/2)) + sin
2
(πx) sinh
2
(π(N + 1/2))
sin
2
(πx) cosh
2
(π(N + 1/2)) + cos
2
(xπ) sinh
2
(π(N + 1/2))
and this expression is bounded for −(N + 1) ≤ x ≤ N + 1/2 and N →∞. Let K be
an upper bound of | cot(πz)| on the sides of all the squares S
R
= S
R
N
. The length of
the boundary of the square is 4 · 2(N + 1/2). This gives
¸
¸
¸
¸
¸
_
∂S
R
N
f(z)dz
¸
¸
¸
¸
¸
≤ 8(N + 1/2)π
K
(N + 1/2 −|u|)
2
→0, N →∞,
since on ∂S
R
N
we have |z +u| ≥ |z| −|u| ≥ (N +1/2) −|u| (the closest points to the
origin on the sides of the square are the points on the real and imaginary axes).
3. In this problem
_
c+i∞
c−i∞
denotes a contour integral along the vertical line (s) = c
traversed upwards.
(a) Prove that for c > 0 we have
1
2πi
_
c+i∞
c−i∞
x
s
s
2
ds =
_
log x, x > 1,
0, 0 < x ≤ 1.
For x > 1 we use the contour with the semicircle γ
R
on the left in Figure 5. If R
is suﬃciently large, the contour contains the double pole at s = 0. We compute the
residue:
Res(f, 0) = lim
s→0
d
ds
_
s
2
x
s
s
2
_
= lim
s→0
x
s
log x = x
0
log x = log x.
11
On γ
R
we have
¸
¸
¸
¸
_
γ
R
x
s
s
2
ds
¸
¸
¸
¸
≤ πR
1
(R −c)
2
→0, R →∞,
since on γ
R
(t) = c + Re
it
, π/2 ≤ t ≤ 3π/2, |s
2
| = |c + Re
it
|
2
≥ (R − c)
2
and
|x
s
| = |e
s log x
| = e
log x(s)
= e
log x(c+Rcos t)
≤ x
c
since cos t ≤ 0 on the left semicircle,
while log x ≥ 0. The choice of this contour depends exactly on this fact that. We
apply the residue theorem gives
_
γ
R
x
s
s
2
ds +
_
c+iR
c−iR
x
s
s
2
ds = 2πiRes(f, 0) = 2πi log x =⇒
_
c+i∞
c−i∞
x
s
s
2
ds = 2πi log x,
by letting R →∞.
For 0 < x ≤ 1 we use the contour with the semicircle γ
R
on the right in Figure 5. On
γ
R
we have
¸
¸
¸
¸
_
γ
R
x
s
s
2
ds
¸
¸
¸
¸
≤ πR
1
(R −c)
2
→0, R →∞,
since on γ
R
(t) = c + Re
it
, −π/2 ≤ t ≤ π/2, |s
2
| = |c + Re
it
|
2
≥ (R − c)
2
and
|x
s
| = |e
s log x
| = e
log x(s)
= e
log x(c+Rcos t)
≤ x
c
since cos t ≥ 0 on the right semicircle,
while log x ≤ 0. The choice of this contour depends exactly on this fact that.
Inside the contour there is no pole, so Cauchy’s theorem gives
_
γ
R
x
s
s
2
ds +
_
c+iR
c−iR
x
s
s
2
ds = 0 =⇒
_
c+∞
c−i∞
x
s
s
2
ds = 0,
by taking R →∞.
(b) Prove that, for c > 0,
1
2πi
_
c+i∞
c−i∞
x
s
s
ds =
_
_
_
1, x > 1,
1/2, x = 1,
0, 0 < x < 1.
(Perron formula)
We use the same contours as in (a) for the same x with the exception of x = 1.
However, the argument is a bit trickier because we have one power less in the denom-
inator.
For x > 1, inside the contour there is a pole at s = 0, which is simple:
Res(f, 0) = lim
s→0
s
x
s
s
= x
0
= 1.
We need to control the integral on γ
R
. As above, on the left semicircle s(t) = c+Re
it
,
π/2 ≤ t ≤ 3π/2.
|x
s
| = |e
s log x
| = e
log x(c+Rcos t)
We also remark that the inequality sin y ≥ 2y/π holds for 0 ≤ y ≤ π/2. This follows
from the concavity of sin y on [0, π/2]. The secant line 2y/π from (0, 0) to (π/2, 1) is
below the graph. Now
¸
¸
¸
¸
_
γ
R
x
s
s
ds
¸
¸
¸
¸
=
¸
¸
¸
¸
¸
_
3π/2
π/2
x
c
x
Rcos t
c + Re
it
iRe
it
dt
¸
¸
¸
¸
¸
=
¸
¸
¸
¸
_
π
0
x
c
x
−Rsin y
c + Re
i(y+π/2)
Re
iy
dy
¸
¸
¸
¸

_
π
0
x
c
x
−Rsin y
R −c
Rdy
12
with the substitution t = y + π/2. The last integral can be split into two equal
integrals over [0, π/2] and [π/2, π], since sin y takes the same values in both. We get
¸
¸
¸
¸
_
γ
R
x
s
s
ds
¸
¸
¸
¸
≤ 2
_
π/2
0
Rx
c
x
−Rsin y
R −c
dy ≤ 2
_
π/2
0
Rx
c
x
−R2y/π
R −c
dy =
Rx
c
R −c
_
x
−2Ry/π
−R(log x)2/π
_
π/2
0
=
πx
c
(R −c)(log x)2
_
−x
−R
+ 1
_
→0, R →∞,
as x > 1.
For 0 < x < 1 the parametrization of the right semicircle is s(t) = c + Re
it
, −π/2 ≤
t ≤ π/2. We substitute t = y −π/2:
¸
¸
¸
¸
_
γ
R
x
s
s
ds
¸
¸
¸
¸
=
¸
¸
¸
¸
¸
_
π/2
−π/2
x
c
x
Rcos t
c + Re
it
iRe
it
dt
¸
¸
¸
¸
¸

_
π/2
−π/2
R
x
c
x
Rcos t
R −c
dt = 2
_
π/2
0
Rx
c
x
Rsin y
R −c
dy
Now x < 1, so log x < 0 and
x
Rsin y
= e
log xRsin y
≤ e
log xR2y/π
= x
2Ry/π
.
¸
¸
¸
¸
_
γ
R
x
s
s
ds
¸
¸
¸
¸
≤ 2
_
π/2
0
Rx
c
x
R2y/π
R −c
dy =
Rx
c
R −c
_
x
2Ry/π
R(log x)2/π
_
π/2
0
=
πx
c
(R −c)(log x)2
_
x
R
−1
_
→0, R →∞,
as x < 1.
For x = 1 we compute the integral directly:
1
2πi
_
c+i∞
c−i∞
1
s
ds =
1
2πi
_

idt
c + it
=
1

_

−∞
c
c
2
+ t
2

it
c
2
+ t
2
dt =
1

_

−∞
c
c
2
+ t
2
dt
as the function t/(c
2
+ t
2
) is odd. This integral is elementary: substitute t = cu to
get
1
2πi
_
c+i∞
c−i∞
1
s
ds =
1

_

−∞
c · cdt
c
2
+ c
2
u
2
=
1

_

−∞
du
1 + u
2
=
_
arctan(u)

_

−∞
=
1

π =
1
2
.
(c) Let the function f(s) be deﬁned by the absolutely convergent series
f(s) =

n=1
a
n
n
s
, (s) > a ≥ 0.
Show that for x ∈ Z

n≤x
a
n
=
1
2πi
_
c+i∞
c−i∞
f(s)
x
s
s
ds, c > a.
13
Since |n
s
| = n
(s)
and the series converges absolutely for (s) > a, we have that the
series

n=1
|a
n
|
n
(s)
< ∞, (s) > a.
This implies that, if we ﬁx (s) = c > a, then the convergence of the series in the
s variable is uniform (Weierstraß test). Moreover, on the vertical line (s) = c we
have ¸
¸
¸
¸
x
s
s
¸
¸
¸
¸
=
x
c
|s|
,
which is bounded so we get uniform convergence of the series even when multiplied
by x
s
/s. This means we can interchange summation and integration to get
1
2πi
_
c+i∞
c−i∞
f(s)
x
s
s
ds =

n=1
a
n
1
2πi
_
c+i∞
c−i∞
(x/n)
s
s
ds =

n=1
a
n
_
0, x < n,
1, x > n
_
=

n<x
a
n
.
14
Figure 2: Contours for (iii) and (iv)
Figure 3: Contours for (v) and (vi)
15
Figure 4: Contour for Problem 2
Figure 5: Contours for Problem 3: on the left x > 1, on the right x < 1.
16