0
answers
0
watching
70
views
9 Nov 2019
Help with these 3 questions.
Here we return to polynomial interpolation, let's assume that we are given 'nodes' x0, x1, x2 = {-1,0,2}, and function values f0, 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. 1. First, let's try and pass a parabolic interpolant p(x) = p0 + P\X + P2X2 through these throe points. Show that such a parabolic interpolant must satisfy p(xo) = /o, p(x f) = f1 and p(x2) = f2, which corresponds to p(-l) = 1, p(0) = 2, and p(2) = 1, which corresponds to PO + (-1)PI + (-1)2P2 = 1 Po + (+0)pi + (+0)2p2= 2 Po + (+2)pi + (+2)2p2= 1 Solve this equation using row-reduction and find the vector p (i.e.,. find Po,Pi,P2)- Plot p(x) and show that p(x) indeed passed through the points (-1,1), (0,2) and (2,1). Find the QR decomposition of A. Can you solve the equation A p = b using the QR decomposition? Hopefully you get the same answer as you did above.
Help with these 3 questions.
Here we return to polynomial interpolation, let's assume that we are given 'nodes' x0, x1, x2 = {-1,0,2}, and function values f0, 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. 1. First, let's try and pass a parabolic interpolant p(x) = p0 + P\X + P2X2 through these throe points. Show that such a parabolic interpolant must satisfy p(xo) = /o, p(x f) = f1 and p(x2) = f2, which corresponds to p(-l) = 1, p(0) = 2, and p(2) = 1, which corresponds to PO + (-1)PI + (-1)2P2 = 1 Po + (+0)pi + (+0)2p2= 2 Po + (+2)pi + (+2)2p2= 1 Solve this equation using row-reduction and find the vector p (i.e.,. find Po,Pi,P2)- Plot p(x) and show that p(x) indeed passed through the points (-1,1), (0,2) and (2,1). Find the QR decomposition of A. Can you solve the equation A p = b using the QR decomposition? Hopefully you get the same answer as you did above.