G: Uniform Convergence of Fourier

From previous work on the prototypical problem (and other problems)   ut = Duxx 0 < x < l , t > 0 u(0, t) = 0 = u(l, t) t > 0 (1)  u(x, 0) = f(x) 0 < x < l we developed a (formal) series solution

∞ ∞ X X 2 2 2 nπx u(x, t) = u (x, t) = b e−n π Dt/l sin( ) , (2) n n l n=1 n=1

2 R l nπy with bn = l 0 f(y) sin( l )dy. These are the Fourier coefficients for the initial data f(x) on [0, l]. We have no real way to check that the series representation (2) is a solution to (1) because we do not know we can interchange differentiation and infinite summation. We have only assumed that up to now. In actuality, (2) makes sense as a solution to (1) if the series is uniformly convergent on [0, l] (and its also converges uniformly1). So we first discuss conditions for an infinite series to be differentiated (and integrated) term-by-term. This can be done if the infinite series and its derivatives converge uniformly. We list some results here that will establish this, but you should consult Appendix B on calculus facts, and review definitions of convergence of a series of numbers, of such a series, and uniform convergence of and series of functions. Proofs of the following results can be found in any reasonable or advanced calculus textbook.

0.1 Differentiation and integration of infinite series Let I = [a, b] be any real interval.

Theorem 1 (term-by-term differentiation): If, on the interval I, P∞ a) f(x) = n=1 fn(x) converges uniformly; P∞ 0 b) n=1 fn(x) converges uniformly; 1We can get away with less restrictive conditions, but the analysis is beyond the level of these Notes.

1 0 c) fn(x) is continuous. P∞ 0 Then the series n=1 fn(x) can be differentiated term-by-term; that is, f (x) = P∞ 0 n=1 fn(x).

Theorem 2 (term-by-term integration): If, on the interval I, P∞ a) f(x) = n=1 fn(x) converges uniformly; 0 b) each fn(x) is integrable. P∞ R b Then the series n=1 fn(x) can be integrated term-by-term; that is, a f(x)dx = P∞ R b n=1 a fn(x)dx.

Remark: Note the weaker conditions needed for integration versus differ- entiation.

Theorem 3 (Weirstrass M-test for uniform convergence of an infi- nite series of functions): Suppose {fn}n≥1 is a of functions defined on I, and suppose |fn(x)| ≤ P∞ Mn for all x ∈ I, n ≥ 1. Then n=1 fn(x) converges uniformly in I if the P∞ series of numbers n=1 Mn converges absolutely.

Theorem 4 (): P∞ A series of numbers n=1 Mn converges absolutely if, for some N ≥ 1, and some constant 0 < ρ < 1, |Mn+1/Mn| ≤ ρ < 1, for all n ≥ N.

Now fix t0 > 0 and consider series (2) for all t ≥ t0, 0 ≤ x ≤ l, and also R l assume f is absolutely integrable (i.e. 0 |f(x)|dx < ∞); f being piecewise continuous on 0 ≤ x ≤ l is more than sufficient. Then we have

2 2 2 nπx 2 2 2 |u (x, t)| = |b |e−n π Dt/l | sin( )| ≤ |b |e−n π Dt0/l , n n l n

2 2 2 R l R l −n π Dt0/l where |bn| ≤ (2/l) 0 |f(y)|dy. Define Mn := ((2/l) 0 |f(y)|dy)e . Then, for all t ≥ t0, |un(x, t)| ≤ Mn. Also,

2 2 2 −(n+1) π Dt0/l Mn+1 e 2 2 2 2 2 2 2 2 = = e[n −(n+1) ]π Dt0/l = e−(2n+1)π Dt0/l ≤ e−π Dt0/l < 1 . −n2π2Dt /l2 Mn e 0

2 2 2 −π Dt0/l P∞ Thus, with ρ := e , n=1 Mn converges absolutely, by Theorem 4, P∞ and by Theorem 3, n=1 un converges uniformly on [0, l], t ≥ t0 > 0. A similar argument holds for the convergence of derivatives ut, uxx. So, for t ≥ t0, the series (2) for u can be differentiated term-by-term. Since each term, un(x, t), satisfies the pde and b.c.s, so does u. After our discussion of the properties of the , and the uniform convergence result on the Fourier series, the convergence of u holds all the way down to t = 0 (given the appropriate conditions on u(x, 0) = f(x)). For the latter argument we turn to the uniform convergence of the trig series.

0.2 Uniform convergence of classical Fourier series Let2 f be piecewise smooth on (−1, 1), continuous on [−1, 1], with f(−1) = f(1). Thus, when f is considered extended to the whole real line, it is continuous everywhere, and is a 2-periodic function on R. Then its Fourier series converges everywhere (pointwise) to f. For purposes below we will also 0 R 1 0 2 assume f is square-integrable; that is, −1(f (x)) dx < ∞. Let ∞ a0 X S (x) = + {a cos(nπx) + b sin(nπx)} , N 2 n n n=1 where {an, bn} are the Fourier coefficients for f :     an Z 1 cos(nπx)   = f(x)   dx . −1 bn sin(nπx)

The purpose here is to show the sequence of partial sums {SN }N≥1 is a , which is sufficient for the Fourier series for f to converge uniformly to f. Recall that {SN }N≥1 is a Cauchy sequence if, for any ε > 0, ∗ ∗ there is an N such that for any N, M > N , |SN (x) − SM (x)| < ε for all x ∈ (−1, 1). Assume without loss of generality that N > M; from the definition of SN , N X SN (x) − SM (x) = {an cos(nπx) + bn sin(nπx)} . (3) n=M+1 2For convenience only we have scaled the interval to have semi-length unity by redefin- ingx ˜ = x/l, then dropping the tilde notation.

3 The essential “trick” is to write the right side of (3) as a dot product of two vectors:

SN (x) − SM (x) = (4)

(π(M + 1)aM+1, π(M + 1)bM+1, . . . , πNaM+1, πNaM+1)· cos((M + 1)πx) sin((M + 1)πx) cos(Nπx) sin(Nπx) ( , ,..., , ) . π(M + 1) π(M + 1) πN πN Now we need three pieces of information, namely,

P∞ 1 2 A. n=1 n2 = π /6 .

N N B. (Schwarz’s inequality): given sequences {cn}n=1, {dn}n=1, then N N N X X 2 1/2 X 2 1/2 | cndn| ≤ ( cn) ( dn) . n=1 n=1 n=1 0 C. (Bessel’s inequality): if {an, bn} are the Fourier coefficients of f, where f is square-integrable on (−1, 1), then ∞ Z 1 2 X 2 2 2 0 2 π n (an + bn) ≤ (f (x)) dx . n=1 −1 Remark: In the last section of this appendix are proofs of these three state- ments.

Now apply Schwarz’s inequality B to (4):

N N X X 1 |S (x) − S (x)| ≤ ( (πn)2(a2 + b2 ))1/2( [cos2(nπx) + sin2(nπx)])1/2 N M n n (nπ)2 n=M+1 n=M+1 N N X X 1 = ( n2(a2 + b2 ))1/2( )1/2 n n n2 n=M+1 n=M+1 N 1 Z 1 X 1 ≤ ( |f 0(x)|2dx)1/2( )1/2 π2 n2 −1 n=M+1 using Bessel’s inequality C in the last step. Since, from fact A, N M N π2 X 1 π2 X 1 X 1 0 < − = − − , 6 n2 6 n2 n2 n=1 n=1 n=M+1

4 then

1/2 M !1/2  1 Z 1  π2 X 1 |S (x) − S (x)| ≤ |f 0(x)|2dx − , (5) N M π2 6 n2 −1 n=1 where the first factor on the right side of the inequality is just a constant, and the second factor can be made arbitrarily small if M is taken sufficient large. Hence, {SN } is a Cauchy sequence.

Remark: We can let N → ∞ in (5) to obtain

1/2 M !1/2  1 Z 1  π2 X 1 |f(x) − S (x)| ≤ |f 0(x)|2dx − . M π2 6 n2 −1 n=1

Example: f(x) = x2 on [−1, 1]; computing the Fourier coefficients, we have ∞ 1 4 X (−1)n f(x) = + cos(nπx) . 3 π2 n2 n=1 (Note: the equality is fully justified in this case.) Now,

Z 1  Z 1 1/2 0 2 8 1 0 2 ∼ (f (x)) dx = , so 2 (f (x)) dx = 0.519798 . −1 3 π −1 Then for

π2 PM 1 1/2 M (0.519798)( 6 − n=1 n2 ) 2 0.32667 10 0.16035 50 0.07314 100 0.05185 1000 0.01643 100000 0.00164

Remark: In actuality the theory gives very conservative estimates. You only need a small number of terms usually to get a high order accurate approxi- mation for series that converge uniformly.

5 Exercise: Compute estimates of |f(x) − SM (x)| for f(x) = 1 − |x| on [−1, 1], for M = 10, 100, 1000.

0.3 Proofs of statements A, B, and C 1. Showing A For f(x) = x2 defined on (−1, 1) and extended to the real line, its Fourier 1 4 P∞ (−1)n series is f(x) = 3 + π2 n=1 n2 cos(nπx), which converges uniformly to f, so

∞ 1 4 X 1 1 = f(1) = + since (−1)n cos(nπ) = (−1)n(−1)n = 1 . 3 π2 n2 n=1

P 1 2 Solving for n2 gives π /6.

2. Showing B First, for two arbitrary real numbers c, d, and for any α > 0, 1 1 0 ≤ (α|c| − |d|)2 = α2c2 − 2|cd| + d2 (6) α α2

1 2 2 2 2 so |cd| ≤ 2 {α c + d /α }. Second, for real vectors (c1, c2, . . . , cN ), (d1, d2, . . . , dN ), and α,

N N N X X 1 X 1 |(c , c , . . . , c )·(d , d , . . . , d )| = | c d | ≤ |c d | ≤ {α2c2 + d2 } 1 2 N 1 2 N n n n n 2 n α2 n n 1 1

PN 2 where we have applied (6) to each term in the sum. If 1 cn 6= 0, define

6 2 PN 2 PN 2 1/2 α := ( 1 dn/ 1 cn) . Then N N N X 1 X 1 X | c d | ≤ α2 c2 + d2 n n 2 n 2α2 n 1 1 1 N N N N 1 P d2 X 1 P c2 X = ( 1 n )1/2 c2 + ( 1 n )1/2 d2 2 PN 2 n 2 PN 2 n 1 cn 1 1 dn 1 N N N N 1 X X 1 X X = ( d2 )1/2( c2 )1/2 + ( c2 )1/2( d2 )1/2 2 n n 2 n n 1 1 1 1 N N X 2 1/2 X 2 1/2 = ( cn) ( dn) , (7) 1 1

PN 2 which is B. (Note: if 1 cn = 0, then cn = 0 for all n, which implies (7) automatically.)

3. Showing C We first want the Fourier coefficients for f 0(x), given

∞ a0 X f(x) ∼ + {a cos(nπx) + b sin(nπx)} . 2 n n n=1 By integration-by-parts, Z 1 Z 1 0 1 f (x) cos(nπx)dx = f(x) cos(nπx)|−1 + nπ f(x) sin(nπx)dx . (8) −1 −1 Since f(−1) = f(1), there is no contribution from the first term on the right (1) (1) side of (8). With {an, bn} being the Fourier coefficients of f, let {an , bn } 0 (1) be the Fourier coefficients for f (x). Then (8) just states that an = nπbn. R 1 0 (1) Similarly, integrating-by-parts the integral −1 f (x) sin(nπx)dx yields bn = 0 −nπan. Therefore, the Fourier series for f (x) is ∞ 0 X (1) (1) f (x) ∼ {an cos(nπx) + bn sin(nπx)} n=1 ∞ X = π n{bn cos(nπx) − an sin(nπx)} . n=1

7 Let N (1) X SN (x) = π n{bn cos(nπx) − an sin(nπx)} . n=1 Now Z 1 0 (1) 2 0 ≤ (f (x) − SN (x)) dx −1 Z 1 Z 1 Z 1 0 2 0 (1) (1) 2 = (f (x)) dx − 2 f (x)SN (x)dx + (SN (x)) dx −1 −1 −1 Z 1 N Z 1 N Z 1 0 2 X 0 X 0 = (f (x)) dx − 2π nbn f (x) cos(nπx)dx + 2π f (x) sin(nπx)dx −1 n=1 −1 n=1 −1 N N Z 1 2 X X + π nm{bnbm cos(nπx) cos(mπx) − bman cos(mπx) sin(nπx) n=1 m=1 −1

− ambn cos(nπx) sin(mπx) + aman sin(nπx) sin(mπx)}dx Z 1 N N 0 2 2 X 2 2 2 2 X 2 2 2 = (f (x)) dx − 2π n (an + bn) + π n (an + bn) −1 n=1 n=1 Z 1 N 0 2 2 X 2 2 2 = (f (x)) dx − π n (an + bn) , −1 n=1 so that N Z 1 2 X 2 2 2 0 2 π n (an + bn) ≤ (f (x)) dx . n=1 −1 Since this holds for all N ≥ 1, then this gives C on page 4. We have made use of the fact that the single summations combine and the double summation collapses because of the orthogonality property of {sin(nπx), cos(nπx)} on (−1, 1).

8