

Study with the several resources on Docsity
Earn points by helping other students or get them with a premium plan
This page cannot be seen from the preview
Don't miss anything!


Due on Thursday, April 3
a. Find the polynomial of degree 2 that interpolates at the datapoints x 0 = 0, y 0 = 1, x 1 = 1, y 1 = 2, and x 2 = 4, y 2 = 2. You should get p 2 (t) = − 14 t^2 + 54 t + 1.
b. Construct the quadratic polynomial that interpolates y =
x at the nodes x 0 = 14 , x 1 = 169 , and x 2 = 1.
a. Find the polynomial of degree 3 that interpolates y = x^3 at the nodes x 0 = 0.x 1 = 1, x 2 = 2, and x 3 = 3. (This is an easy problem ...)
b. For each function listed below, construct the Lagrange interpolating polynomial for the set of nodes specified. Plot both the function and the interpolating polynomial, and also the error, on the interval defined by the nodes.
x, xi = 0, 1 , 4 ;
In 1973 , the horse Secretariat became the first (and, so far, only) winder of the Kentucky Derby to finish the race in less than two minutes, running the 1 14 mile distance in 1 : 59. 4 seconds. Remarkably, he ran each quarter mile faster than the previous one, as the following table of data shows. Here t is the elapsed time (in seconds) since the race began and x is the distance (in miles) that Secretariat has travelled.
x 0. 0 0. 25 0. 50 0. 75 1. 00 1. 250 t 0. 0 25. 0 49. 4 73. 0 96. 4 119. 4
For this problem, you should write a simple MATLAB code for answering the following problems (You do not need to turn in the code).
f ′(x) ≈ f (x + h) − f (x) h for small h.) (^1) Plot with 1501 points. Suppose p(X) is the MATLAB function for the polynomial. The three-line MATLAB commands are X = 0 : 0.001 : 1 .5;, Y = p(X), and plot(X, Y, ′^ − r′);.
Let f (x) = ex. Define pn(x) to be the Newton interpolating polynomial for f (x) using n + 1 equally spaced nodes on the interval [− 1 , 1]. Thus we are taking higher and higher degree polynomial approximations to the exponential function. Write a MATLAB program that computes pn(x) for n = 2, 4 , 8 , 16 , 32 , and which samples the error f (x) − pn(x) at 501 equally spaced points on [− 1 , 1]. Record the maximum error as found by the sampling as a function of n, that is define En as En = max 0 ≤k≤ 500
|f (tk) − pn(tk)|
where tk = −1 + 5002 k , and plot En versus n.
Show that the error in third degree polynomial interpolation satisfies
||f − p 3 ||∞ ≤
h^4 ||f (4)||∞
if the nodes x 0 , x 1 , x 2 , x 3 are equally spaced, with xi − xi− 1 = h. Hint: Use the change of variable t = x − x 1 − 12 h.