10.5. EXERCISES 247
12. Show directly, using the Weierstrass approximation theorem, that if f is piecewisecontinuous on [a,b] , then limn→∞
∫ ba sin(nx+ c) f (x)dx = 0. Hint: Show it suf-
fices to suppose f is continuous. For f continuous, let g be a polynomial such that∥ f −g∥ ≡maxx∈[a,b] | f (x)−g(x)|< ε
2(b−a) . Then∫ b
a sin(nx+ c) f (x)dx =
∫ b
asin(nx+ c)( f (x)−g(x))dx+
∫ b
asin(nx+ c)g(x)dx.
Now the first integral is small. Use integration by parts in the second.
13. Carefully fill in the details of Lemma 10.4.7.
14. Suppose you have f defined, positive, and decreasing on [0,∞). Then show that f isin L1(0,∞) if and only if ∑
∞k=1 f (k) is a convergent series. This is called the integral
test.
15. Assume all the integrals make sense as ordinary or improper integrals on (a,b) where−∞ ≤ a < b ≤ ∞. Also let φ : (a,b)→ R be convex and differentiable. Convexityhere means that φ
′ is an increasing function. Thus the graph of φ “smiles” and φ isalways at least as large as any tangent line. Suppose
∫ ba f (t)dt = 1. Show that
φ
(∫ b
ag(t) f (t)dt
)≤∫ b
aφ (g(t)) f (t)dt
This is a case of Jensen’s inequality. Hint: Since φ is convex,
φ (g(t)) ≥ φ
(∫ b
ag(s) f (s)ds
)+
φ′(∫ b
ag(s) f (s)ds
)(φ (g(t))−
∫ b
ag(s) f (s)ds
).
Now multiply by f (t) and do∫ b
a dt using∫ b
a f (t)dt = 1.
16. For n ∈N, Stirling’s formula says limn→∞Γ(n+1)en
nn+(1/2) =√
2π . Here Γ(n+1) = n!. Theidea here is to show that you get the same result if you replace n with x ∈ (0,∞). Todo this, show
(a) n→ Γ(n+1)en
nn+(1/2) is decreasing on the positive integers. This follows from the prop-erties of the Gamma function and a little work.
(b) Show that x→ Γ(x+1)ex
xx+(1/2) is decreasing on (m,m+1) for m ∈ N. This is a littleharder.
Hint: For x ∈ (m,m+1) , ln(
Γ(x+1)ex
xx+(1/2)
)=
x+ lnΓ(x+1)−(
x+12
)lnx
= x+ ln(x(x−1)(x−2) · · ·(x−m+1)Γ(x−m))−(
x+12
)lnx
= x+m−1
∑k=0
ln(x− k)+ ln(Γ(x−m))−(
x+12
)lnx