

Study with the several resources on Docsity
Earn points by helping other students or get them with a premium plan
Prepare for your exams
Study with the several resources on Docsity
Earn points to download
Earn points by helping other students or get them with a premium plan
A set of homework problems focused on finding interpolating polynomials using calculus and divided differences. The problems involve finding the constants c for given intervals and functions, determining the degree of the lagrange interpolating polynomial, and evaluating the polynomial and its derivative. The document also includes instructions on using matlab to find the coefficients and plot the polynomial.
Typology: Assignments
1 / 2
This page cannot be seen from the preview
Don't miss anything!


Homework #
|f (x) − P (x)| ≤ C for all x ∈ [0, 0 .3], where P (x) is the Lagrange interpolating polynomial for data with nodes x 0 = 0, x 1 = 0. 1 , x 2 = 0.3 and values from the underlying function f (x) = ex+1.
|f (x) − P (x)| ≤ C for all x ∈ [0, 1], where P (x) is the piecewise linear interpolating polynomial for data with nodes xj = j/10, j = 0,... , 10 and values from the underlying function f (x) = x^2 + 1.
1
help polyfit help polyval Read these instructions on how the two functions work. Then enter: x = 0:.1:1; y = [0.95 0.23 0.6 0.48 0.89 0.76 0.45 0.01 0.82 0.44 0.61]; These are the data points. Then enter: a = polyfit(x,y,10); These are the coefficients of the Lagrange interpolating polynomial. Then enter: plot(x,y,’o’) hold on xfine = 0:.005:1; plot(xfine,polyval(a,xfine)) axis([0 1 -3 3]) hold off This is the Lagrange interpolating polynomial. Note the oscillations and the fact that this probably would not be the interpolating function you would draw through the points. Print this plot out and turn it in.