Survey
* Your assessment is very important for improving the workof artificial intelligence, which forms the content of this project
* Your assessment is very important for improving the workof artificial intelligence, which forms the content of this project
Sketch of Lecture 36 Wed, 4/19/2017 Example 184. Here is a brief follow-up on the notion of countability: is the set of rational numbers in [0; 1] countable? Does the diagonal argument apply? 0 1 1 1 2 Solution. Yes, the set of rational numbers is countable: we can make a complete list as follows 1 ; 1 ; 2 ; 3 ; 3 ; 1 3 1 2 3 4 ; ; ; ; ; ; ::: 4 4 5 5 5 5 So, why does the diagonal argument not apply? Well, the argument runs ne until we construct the new number x = 0:x1x2x3::: such that the decimal digit xi diers from the ith digit of number #i on our list. We can certainly construct this number. However, in general, this will not be a rational number (because the digits of a rational number must eventually repeat). 11.1 An inner product on function spaces On the space of, say, (piecewise) continuous functions f : [a; b] ! R, it is natural to consider the dot product Z b hf ; gi = f (t)g(t)dt: a Why? A (sensible) dot product provides a (sensible) notion of distance between functions. The dot product P n above is the continuous analog of the usual dot product hx; y i = n t=1 xtyt for vectors in R . Do you see it?! As a consequence, once we have the dot product, we can orthogonally project functions onto spaces of simple functions. In other words, we can compute best approximations of functions by simple functions (for instance, best quadratic approximations). Why continuous? We need that any product f (x)g(x) is integrable. That means we cannot work with all functions. Continuity is certainly sucient. In fact, the right condition is that f (x)2 should be integrable on [a; b] (i.e. f (x) is square-integrable). Such a function is said to be in L2[a; b]. Example 185. What is the orthogonal projection of f : [a; b] ! R onto the space of constant functions (that is, spanf1g)? Solution. The orthogonal projection of f : [a; b] ! R onto spanf1g is Rb Z b f (t)1dt hf ; 1i 1 1 = aR b = f (t)dt: h1; 1i b¡a a 12dt a This is the average of f (x) on [a; b]. Comment. Makes perfect sense, doesn't it? Intuitively, the best approximation of a function by a constant should indeed be the one where the constant is the average. p Example 186. (homework) Find the best approximation of f (x) = x on the interval [0; 1] using a function of the form y = ax. Solution. The orthogonal projection of f : [0; 1] ! R onto spanfxg is R1 Z 1 f (t)tdt hf ; xi x = 0R 1 x = 3x tf (t)dt: hx; xi t2dt 0 0 In our case, the best approximation is 3x Z 1 p t t dt = 3x 0 Z 1 0 Armin Straub [email protected] 1 5/2 1 6 3/2 t dt = 3x t = x: 5/2 5 0 1.2 1.0 0.8 0.6 0.4 0.2 0.2 0.4 0.6 0.8 1.0 76 p Example 187. Find the best approximation of f (x) = x on the interval [0; 1] using a function of the form y = a + bx. Important observation. The orthogonal projection of f : [0; 1] ! R onto spanf1; xg is not simply the projection onto 1 plus the projection onto x. That's because 1 and x are not orthogonal: Z 1 1 h1; xi = tdt = = / 0: 2 0 Solution. To nd an orthogonal basis for spanf1; xg, following GramSchmidt, we compute x¡ hx; 1i 1 projection of =x¡ 1=x¡ : x onto 1 h1; 1i 2 1 Hence, 1; x ¡ 2 is an orthogonal basis for spanf1; xg. n o 1 The orthogonal projection of f : [0; 1] ! R onto spanf1; xg = span 1; x ¡ 2 therefore is D R1 1 Z 1 f (t) t ¡ dt hf ; 1i 1 1 0 E x¡ 22 1+ D = f (t)dt + R x¡ 1 1 1 1 h1; 1i 2 2 0 x ¡ 2; x ¡ 2 t ¡ 2 dt 0 Z 1 Z 1 1 = f (t)dt + (12x ¡ 6) f (t) t ¡ dt: 2 0 0 1 f;x ¡ 2 E In our case, this best approximation is Z 1 Z 1 p p 1 1 3/2 1 1 5/2 1 1 3/2 1 t dt + (12x ¡ 6) t t¡ dt = t + (12x ¡ 6) t ¡ t 2 3/2 5/2 2 3/2 0 0 0 0 2 2 1 = + (12x ¡ 6) ¡ 3 5 3 4 1 = x+ : 5 3 The plot below conrms how good this linear approximation is (compare with the previous example): 1.0 0.8 0.6 0.4 0.2 0.2 0.4 Armin Straub [email protected] 0.6 0.8 1.0 77