Due: October 23, 2008
CS 257 (Luke Olson): Homework #7
Problem 1
Problem 1
Consider the following table of values
x
0
2
3
y
7
11
28
1. Write out the interpolating polynomial using a Lagrange basis.
2. Write out the interpolating polynomial using a Newton basis.
3. Rewrite your Newton polynomial so it can be evaluated efficiently using Horner’s method.
4. Simplify both the Newton and the Lagrange polynomials and show that you get the same polynomial
regardless of the basis you use.
Problem 2
Implement both
divided
difference.m
and
newton
interp.m
from the skeleton code given below.
Run these programs on the table data given in the last problem.
Show that your divided difference
script returns results that agree with you hand computations in the previous problem.
Show that your
newton
interp.m
gives the same result as your theoretical polynomial when
t
= 4. Turn in all completed
code and output showing these results.
This preview has intentionally blurred sections. Sign up to view the full version.
View Full Document
This is the end of the preview.
Sign up
to
access the rest of the document.
 Spring '08
 Olson
 Numerical Analysis, Polynomial interpolation, Newton polynomial, ddiff, newton interp.m

Click to edit the document details