University of Leeds, School of Mathematics MATH 38 Inner product and metric spaces, Solutions. (i) No. If x = (, ), then x,x =, but x is not the zero vector. So the positive definiteness property fails to hold. (ii) Yes. We have to check the inner product axioms: (I) ax + by,z = ( (ax + by )z + (ax + by )z ) = (ax z + ax z + by z + by z ) = a x,z + b y,z. (II) y,x = (y x + y x ) = (x y + x y ) = x,y. (III) x,x = (x + x ) ; if x,x = then x = x = so x =. (iii) Yes. Proof similar to (ii). For the second part of (III), note that, if x,x =, then x + (x + x ) =, from which x = x + x =, so that x = x = and hence x =. (iv) No. For example, if x = (, ) then x,x =, and x,x = 4 x,x. This means that linearity fails to hold.. Again, we have to check the axioms: (I) af+bg, h = et (af(t)+bg(t))h(t) dt = a et f(t)h(t) dt+b et g(t)h(t) dt = a f, h + b g, h. (II) g, f = et g(t)f(t) dt = et f(t)g(t) dt = f, g. (III) f, f = et (f(t)) dt since e t (f(t)) for all t in, ]; f, f = et (f(t)) dt =, so e t (f(t)) = for all t in, ] (because e t (f(t)) is a continuous function of t), from which f(t) (since e t > for all t). If f(t) = t and g(t) = t then f, g = et t( t) dt = (t t )e t dt. Integrate by parts, and we obtain (t t )e t ] ( t)et dt = + by parts: we get (t )e t ] et dt = (e + ) e t ] (t )et dt. Again integrate = e + e + = 3 e. 3. f, g = t( t) dt = t 3 t3]. Also, the lengths of the vectors are given by f = f, f = So the angle θ is given by Therefore θ = π/3. cos θ = t dt = 3 ; g = g, g = f, g f g = /6 (/ 3)(/ 3) =. ( t) dt = 3.
4. Note that we can regard the constant function as being cosnt for n =. For n and m, we have sin mt, cosnt = sin mt cos nt dt = ( ) sin(m + n)t + sin(m n)t dt cos(m+n)t m+n cos(m n)t m n if m n = cos nt n if m = n = in either case. Thus all the cosine functions (including ) are orthogonal to all the sine functions. Similarly, if m, n and m n, then we have cos mt, cosnt = cos mt cos nt dt = ( ) cos(m + n)t + cos(m n)t dt = sin(m+n)t m+n + sin(m n)t m n =, so that all the cosine functions (including ) are orthogonal to each other. Also, if m, n and m n then sin mt, sinnt = sin mt sin nt dt = ( ) cos(m n)t cos(m + n)t dt = sin(m n)t sin(m+n)t =, m n m+n so that all the sine functions are orthogonal to each other. This shows that {, cos t, sin t,..., cos nt, sin nt,... } is an orthogonal set. The norms of these functions are calculated as follows: = dt = π, so = π; cos nt = cos nt dt = π ( + cos nt) dt = ] t + sinnt π = π if n, n so that cos nt = π; sin nt = sin nt dt = ( cos nt) dt = π π, if n, so sinnt = π. 5. Just write the left-hand side in terms of inner products and expand them: v + w + v w = v + w,v + w + v w,v w = v,v + v,w + w,w + v,v v,w + w,w = v,v + w,w = v + w. 6. If v = w, then v + w,v w = v,v v,w + w,v w,w = v w =. Therefore v + w is orthogonal to v w.
University of Leeds, School of Mathematics MATH 38 Inner product and metric spaces, Solutions. (i) The sum of the squares of the sequence is n, the number of non-zero terms, so this sequence is in l (ii) The sum of the squares of this sequence does not converge, so it is not in l. (iii) n < so the sequence is in l. (iv) n does not converge, so the sequence is not in l.. x = + + = 6, so x = 6 and we put e = 6 x = 6 (,, ). We now put e = x x,e e = (,, ) 6 (,, ) = ( /6, 5/6, /3). Then ( /6, 5/6, /3) = /36 + 5/36 + /9 = 5/6, giving e = (/ 3)(, 5, ). Finally, e 3 = x 3 x 3,e e x 3,e e = (,, ) ( + )(,, ) ( 3)(, 5, ) 6 3 = ( 5,, 5 ). We have e 3 = / 5 so e 3 = (/ 5)(,, ). The Gram Schmidt process has given us the following orthonormal basis of R 3 : { 6 (,, ), (, 5, ), (,, )}. 3 5 (You should check that the set you got was orthonormal.) 3. We set e = = ( b a = dt)/ (b a). / (Note that we always assume b > a in the space Ca, b], so we re not dividing by.) Next, set f = t t,e e = t b a t (b a) dt (b + a) = t. / (b a) /
Then Thus f = b a ( t b + a ) ( dt = t b + a ) ] 3 b = 3 a e = ( t b + a ). (b a) 3/ (b a)3. When a = and b =, we get e = / and e = ( 3/)t. For general a = b (and b > ) we have e = / b and e = ( 3/b 3 )t. 4. We have already seen that the functions are orthogonal with the given inner product; also π π dt =, π cos t dt =, π π cos t dt =, π and hence the functions /, cos t, cos t are orthonormal in C, π] with the given inner product. The orthogonal projection of t on span{/, cos t, cos t} is given by t, + t, cost cos t + t, cost cost = t, + t, cost cost + t, cost cost. So we just need to calculate three inner products: t, = t, cost = t, cost = = π = π t dt = 3 π ; t cos t dt = π t( cos t) t cos t dt = π cos t t( ) t sin t cos t dt = π t sin t cos t t sin t dt dt = π Thus the orthogonal projection is 3 π 4 cost + cos t. t cost = 4; sin t t dt t cost =.
5. Because the given vectors form an orthonormal basis of P n, we know that the orthogonal projection of e t on P n is a n + a k cos kt + k= n b k sinkt, where a k = e t, coskt = π π et coskt dt and b k = e t, sinkt = π π et sin kt dt. To calculate these integrals is a messy exercise in integration by parts: e t sin kt dt = t cos kt e k + k = (e π e ) ( )k+ k + k= e t cos kt dt t sin kt e k k e t sin kt dt. ( ) Therefore ( + k ) e t sin kt dt = ( )k+ k sinhπ, from which b k = π e t sin kt dt = k( )k+ π( + k ) sinhπ. Substituting this value for et sin kt dt in (*), we get a k = π e t cos kt dt = k { k( ) k+ sinh π } π + k k ( )k+ sinhπ = ( )k π( + k ) sinhπ. So the orthogonal projection of e t on P n is sinhπ π + n k= ( ) k sinhπ π( + k ) cos kt n k= k( ) k sinhπ π( + k ) sin kt. 3
University of Leeds, School of Mathematics MATH 38 Inner product and metric spaces, Solutions 3. The orthogonal projection of e t on span{, t, t } is a + a t + a t, where the coefficients a, a, a are given by the normal equations a, + a t, + a t, = e t,, a, t + a t, t + a t, t = e t, t, a, t + a t, t + a t, t = e t, t. We already know (see lecture notes) that in C, ], Also, e t, = e t, t = e t, t =, =, t, =, t, = 3, t, t =, t, t = 5. e t dt = e e, te t dt = So the equations are t e t dt = ] te t t e t ] e t dt = (e + e ) (e e ) = e, a + 3 a = e e, te t dt = (e e ) 4e = e 5e. 3 a = e, 3 a + 5 a = e 5e. Solving these, we get a = 3 4 ( e + e ), a = 3e, a = 5 4 (e 7e ). So the orthogonal projection is 3 4 (e e) + 3e t + 5 4 (e 7e )t. (Numerically, this is roughly 996+ 36t+ 5367t. If you have a graphical calculator or computer, you might like to see how well this quadratic compares with e t on the interval, ]. Notice that this process doesn t give the first few terms of the Taylor series.). Taking the columns of the data as vectors, put x = (,,, ), x = (,,, ), x 3 = (,,, ) and y = (,,, ). Then x,x =, x,x =, x,x 3 =, x,x = 3, x,x 3 =, x 3,x 3 = 3, y,x =, y,x =, y,x 3 = 5.
The normal equations c x,x + c x,x + c 3 x 3,x = y,x c x,x + c x,x + c 3 x 3,x = y,x c x,x 3 + c x,x 3 + c 3 x 3,x 3 = y,x 3 or c + c + c 3 = c + 3c c 3 = c c + 3c 3 = 5 give c =, c = 4, c 3 = 7 4. So the best relation to fit the data is y = x 4 x 7 4 x 3. 3. (i) Here there is just one normal equation x, x m = y, x, where x = (5,, 5) and y = (9,, 9). Thus x,x = 35, y,x = 54, so m = 54 35 and the line is y = 54 35 x. (ii) Put y = mx + c = cx + mx. Let x = (,, ), x = (5,, 5), y = (9,, 9). Then x,x = 3, x,x = 3, x,x = 35, y,x = 49, y,x = 54. The normal equations are 3c+3m = 49, 3c+35m = 54, from which c = 9/3, m = and the line is y = x + 9 3. 4. Put y = a x + a x + a 3 x 3, where x = x, x = x and x 3 = x 3. Let x = (,,, ), x = (,, 4, 4), x 3 = (,, 8, 8), y = (,, 7, 4). Then The normal equations are x,x =, x,x =, x,x 3 = 34, x,x = 34, x,x 3 =, x 3,x 3 = 3, y,x = 3, y,x = 5, y,x 3 = 89. a + 34a 3 = 3, 34a = 5, 34a + 3a 3 = 89, giving a = 4, a = 5 34, a 3 = 3 4. So the curve giving the best fit is y = 4 x + 5 34 x + 3 4 x3, or 68y + 7x 3x 5x 3 =. 5. (a) First, d (f, g) = sint dt = ( sin t) dt + sin t dt = sintdt = cos t = 4.
Next, (d (f, g)) = So d (f, g) = π. sin t dt = Finally, d (f, g) = max t,π] sint =. cos t = π. (b) First, d (f, g) = sint cos t dt. To evaluate this integral, we must work out the points in, π] at which sint cos t changes sign (i.e., where sin t = cos t). These are at t = 3π/4 and t = π/4. So sin t cos t dt = 3π/4 + (sin t cos t) dt + π/4 /4 (sint cos t) dt 3π/4 (cost sin t) dt = cos t sin t] 3π/4 + sint + cos t/4 3π/4 + cos t sin t]π π/4 = ( ) + + ( + ) = 4. Hence d (f, g) = 4. Next, (sin t cos t) dt = ( sin t) dt = π. So d (f, g) = π. Finally, d (f, g) = max t,π] sint cost. We get the maximum by differentiating sint cos t which gives cos t + sin t. This is when sin t = cos t = /. So d (f, g) =. 6. d(x, y) = or ; in each case d(x, y). By definition, d(x, y) = iff x = y. Clearly, d(x, y) = d(y, x). If x = z then d(x, z) = d(x, y) + d(y, z), for any y. If x z, then d(x, z) = d(x, y)+d(y, z), unless both d(x, y) = and d(y, z) =, in which case we would have x = y = z which would contradict x z. So d is a metric. 3
University of Leeds, School of Mathematics MATH 38 Inner product and metric spaces, Solutions 4. Throughout, we use a result in the lecture notes: a sequence in (R, d ) converges if and only if the sequences of co-ordinates each converge. (i) /n and /n so (/n, /n ) (, ). (ii) /n and, so the sequence converges to (, ). (iii) ( ) n does not converge, so ((/n, ( ) n ) does not converge. (iv) ( + /n) n e and n sin(/n). (The latter result may be more familiar in the form (/x) sin(x). In this version, I ve substituted /n for x.) So the sequence in R tends to the point (e, ). The convergent series (i), (ii), (iv) are Cauchy sequences, by a result of the course. In (iii) we observe that d (x n, x n+ ) > by just looking at the second co-ordinate, so the sequence is not a Cauchy sequence.. (i) (a) d (f n, f) = n t dt = /n. So f n f in d. (i) (b) d (f n, f) = maxt/n = /n so f n f in d. (i) (c) t/n for each t, ], so f n (t) f(t) pointwise. (ii) (a) d (f n, f) = n t n ( t) dt = n (tn t n+ ) dt = n (/(n+) /(n+)) = n /(n + 3n + ) as n. So f n does not converge to f in d. (ii) (b) d (f n, f) = maxn t n ( t) To find this, we differentiate t n ( t) and set the result to, getting nt n (n + )t n =, which tells us that there s a turning point at t = n/(n +). Now, f n (n/(n+)) = n (n/(n+)) n (/(n+). However, (n/(n + )) n e, so maxf n (t). Thus f n does not converge to f in d. (ii) (c) On the other hand, at and f n (t) = f(t) =, and, for < t <, we have n t n, so f n (t) f(t) pointwise. (iii) (a) d (f n, f) = /n (n n 3 t) dt = /n. So d (f n, f). (iii) (c) Here d (f n, f) = max(n n 3 t) = n, so f n does not converge to f in d. (iii) (c) Here f n () = n which does not tend to, so f n does not converge to f pointwise. 3. We first note that d (f, g) d (f, g) because f(t) g(t) dt max f(t) g(t) dt = max f(t) g(t) = d (f, g).
Thus if (f n ) is a Cauchy sequence in d, it will be a Cauchy sequence in d. So it makes sense to tackle the d part first. (i) (b) (a) d (f n, f m ) = max ( + t /n) ( + t /m) = max t (/n /m) = /n /m. Given ǫ >, when n, m /ǫ, then /n /m < ǫ. Hence (f n ) is a Cauchy sequence for d and hence also for d. (ii) (b) (a) d (f n, f m ) = max (t+/n) 3 (t+/m) 3 = max /n /m (t+/n) + (t + /n)(t + /m) + (t + /m) /n /m. So, by the previous part, (f n ) is a Cauchy sequence for d and hence for d. (iii) (b) We note that f n (t) converges pointwise to the discontinuous function f which is when t and at. On the other hand, each f n is continuous. So f n cannot converge uniformly (i.e., in d ) to f, and thus (f n ) is not a Cauchy sequence for d. (iii) (a) Draw the graph of f n : it is until t = n n, then rises in a straight line to the point (, ). Thus d(f n, ) is the area under the curve, a triangle of height and base /n, that is, d(f n, ) = n. Now d(f n, f m ) d(f n, ) + d(, f m ) = n + m. Given ǫ >, this means that when n, m > /ǫ, we have d (f n, f m ) < ǫ. Thus (f n ) is a Cauchy sequence for d. 4. Suppose that (x n ) satisfies x n = x N for all n N. Then, given ǫ >, d(x n, x m ) = < ǫ whenever n, m N. So the sequence is a Cauchy sequence. (Untypically, the choice of N is independent of ǫ.) Conversely, if (x n ) is a Cauchy sequence, then, taking ǫ = in the definition of Cauchy sequence, we conclude there is an N for which d(x n, x m ) < whenever m, n N. But d(x n, x m ) < d(x n, x m ) =, because the metric takes only the values and. So x n = x m whenever n, m N. This is the required condition. To show that X is complete with the discrete metric, we have to show that each Cauchy sequence converges. But this is obvious, because it is eventually constant. In the notation of the question x n x N.