Help with these questions. 4-6
Here we return to polynomial interpolation, let's assume that we arc given "nodes' x0.x1.x2 = {-1,0.2}. and function value fo.f1.f2 = {1.2.1} corresponding to the three points (-1,1), (0.2) and (2.1). We will try and build a polynomial interpolant through these three points. First, let's try and pass a parabolic interpolant p(x) = p0 + P 1 x -f p1x2 through these three points. Show that such parabolic interpolant must satisfy p(xo) = f0. p(xi) = f1 and p(x1) = f2, which corresponds to p(-l) = 1. p(0) = 2. and p(2) = 1. which corresponds to p0 + (-l)pi+(-lfp2=1 phi. + (+0)phi +{+0fpi=2 Po + (+2) phi + (+2)2 P2=1 Solve this equation using row-reduction and find the vector p (i.e. find p0.p1.p2). Plot p(x) and show that p(x) induce passed through the points (-1,1), (0.2) and (2,1). Find the QR decomposition of A. Can you solve the equation Ap - b using the QR decomposition? Hopefully you get th same answer as you did above. Now let's try and pass a linear interpolant I (x) = lo + '11 through these three points. Show that, ideally, such a linear interpolant should satisfy l (x0) = f0, l(x1) = f 1 and l (x2) = f2, which corresponds to l (-1) = 1, l (0) = 2. and l (2) = 1. which corresponds to l0 + (-l) l1 = l l0 + (+0) l1 = 2 l0 + (+2)l1, = 1 which corresponds to Can you solve this equation exactly? Why or why not? Can you obtain an approximate solution / such that Al is 'close' to b? This is what is referred to as the least-square solution to this problem. Can you show that, when Al is as close to b as possible, the residual f - Al - b is perpendicular to each column of .'1? If we assume such a residual condition, then in what sense is Al close to 6? Can you show that when f is perpendicular to each column of A then f is as short as possible (i.e., the length is as small as possible).