- (6 points) Find the Vandermonde form, the Lagrange form, and the Newton form of the interpolating polynomial for these data
- (Programming by MATLAB) The US census data from 1900 to 2000 are as follows (numbers are in million):
- (8 points) Spline interpolation
- Find the natural cubic spline function S to interpolate the data.ii. Find the population estimate for 1985 by the spline function
iii. Find the population estimate for 2010 by the spline function.
You do not need to write an explicit expression for S(x). Just plot y = S(x), the given 10 data points, and the 2 points of the population estimates on the same graph. Print your MATLAB codes.
Note: For reference, see us_census.m on the course website: https://www.cs.mcgill.ca/∼chang/teaching/cs350/doc.php
- (6 points) LS approximation
- Find the straight line which best fits the data in the least-squares sense.
- Find the population estimate for 1985 by this straight line.iii. Find the population estimate for 2010 by this straight line.
Plot the straight line, the given 11 data points, and the 2 points of the population estimates on the same graph. Print your MATLAB codes.
Note: You are not allowed to use MATLAB built-in functions polyfit, polyval, and spline.