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

10.5. EXERCISES 24712.13.14.15.16.Show directly, using the Weierstrass approximation theorem, that if f is piecewisecontinuous on [a,b], then limy_5.. f° 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 thatIF gl) = maxyefa lf (®) —9(x)| < apg. Then f? sin (nx-+c) f (x)dx =b b/ sin (nx +c) (f (x) —g (art | sin (nx +c) g (x) dx.a aNow the first integral is small. Use integration by parts in the second.Carefully fill in the details of Lemma 10.4.7.Suppose you have f defined, positive, and decreasing on [0,°¢). Then show that f isin L'(0,ce) if and only if Y7_, f (k) is a convergent series. This is called the integraltest.Assume all the integrals make sense as ordinary or improper integrals on (a,b) where—0o <a<b<o, 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 [. ° f (t) dt = 1. Show that(festa) < [oemswoaThis is a case of Jensen’s inequality. Hint: Since @ is convex,o(g(t)) > ([errtvas) +b&([eos0as) (9) [si r09)48).Now multiply by f(t) and do [? dt using [? f (t)dt =1.For n EN, Stirling’s formula says lim,_;0 UintVe" _ /2n. Here DP (n+1) =n!. Thenr+(1/2)idea here is to show that you get the same result if you replace n with x € (0,°°). Todo this, showa(a) n> a s ! de is decreasing on the positive integers. This follows from the prop-erties of the Gamma function and a little work.(b) Show that x > Tarder ig decreasing on (m,m+1) form €N. This is a littlexx+(1/2)harder.Hint: For x € (m,m+1), In (es) _axrt(1/2)1x+InP(x+1)- (x+ 5) Inxx+In(x(x—1)(x—2)-+:(x—m+1)'(x—m)) — (x+5) Intm—1 1= Xx In(x—k)+In(U(x—m)) — | x+ = ] Inx+h n( )+1n (T'( )) (x+5) n